Ticket Created
over 5 years ago

WERETECH-8672

ERA Backtrace points to a function that is never called

I was recently looking through some ERA backtraces and came across with a few that looked strange in two respects:

1) The backtrace consisted of only one line

2) The exception reference seemed to be impossible within the code that is pointed to by the backtrace

After pushing out a bunch of releases with small tweaks trying to narrow in on the issue, I finally came across an interesting finding: the backtrace *always* points to the last function in the module--even if it's never called!

Looking through the debug XML for my app, I believe I can see why: the last function in the module is also the last symbol referenced in the pcToLineNum mapping.

So I'm guessing the PC for the backtrace is outside the bounds of my code, and the failure mode for the backtrace-prettification is to not print 'Unknown' or just the PC, but instead to default the the highest (or possibly lowest) addressed symbol in the pcToLineNum mapping.

This is a big problem because, well, it causes developers to spend a large number of frustrating hours trying to disprove something that in reality never actually happened!

A better solution IMHO would be to print something like <Unknown Symbol> or <PC is outside application scope> or something to let the developer know that yes it's a problem, but not *your problem*.

 Examples from ERA: (NOTE: lastFunctionInModule is never called, it was added just to prove the theory that the backtrace was erroneous)

Error Name: Too Many Arguments Error
Occurrences: 3
First Occurrence: 2020-03-03
Last Occurrence: 2020-03-03
Devices:
fēnix® 6S Pro / 6S Sapphire: 3.00
App Versions: 4.6.8
Languages: deu
Backtrace:
DownloadSpeed.lastFunctionInModule:65

Error Name: Symbol Not Found Error
Occurrences: 1
First Occurrence: 2020-03-03
Last Occurrence: 2020-03-03
Devices:
Forerunner® 945: 2.80
App Versions: 4.6.8
Languages: deu
Backtrace:
DownloadSpeed.lastFunctionInModule:65

Parents
  • I think this is due to the bug where users with an out of date firmware can download an app and run it from the app store when they shouldn't be able to Slight smile I see the same 2 errors as well in Era, and it is always for firmware which is not the latest (so I assumed it is that bug …) If it is something else then I would like to know what it is too!

Comment
  • I think this is due to the bug where users with an out of date firmware can download an app and run it from the app store when they shouldn't be able to Slight smile I see the same 2 errors as well in Era, and it is always for firmware which is not the latest (so I assumed it is that bug …) If it is something else then I would like to know what it is too!

Children
No Data