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
  • Former Member
    Former Member over 5 years ago

    I'm also seeing the same 2 errors reported by ERA for watches without the latest firmware. In my case the backtrace says the error is in Rez.MainLayout; very odd. Like @markdotai - If it is something else then I would like to know what it is too!

Comment
  • Former Member
    Former Member over 5 years ago

    I'm also seeing the same 2 errors reported by ERA for watches without the latest firmware. In my case the backtrace says the error is in Rez.MainLayout; very odd. Like @markdotai - If it is something else then I would like to know what it is too!

Children
No Data