Error handling - stacktrace full of question marks

Hello community!

I have set up a basic error handling in my app, code looks like this (main.lua):

local function unhandledErrorListener(event) FLURRY\_ANALYTICS\_SERVICE:logIosError(event.errorMessage, event.stackTrace) --- Display native dialog to user and go to startup screen local function reloadAlertListener(event) if "clicked" == event.action then timer.performWithDelay(100, function() storyboard.gotoScene("scenes.startupScreen") end) end end native.showAlert("It's a Bug!", "Sorry, but an error has occured.\n\nWe will do our best to fix it as soon as possible with the next update!", { "Reload the App", }, reloadAlertListener) return true end Runtime:addEventListener("unhandledError", unhandledErrorListener)

The problem is, all stacktraces being reported have question marks instead of .lua file names/functions all over the place:

stack traceback: [C]: ? ?: in function '?' ?: in function '?' ?: in function '\_listener' ?: in function \<?:141\> ?: in function \<?:218\>

There is no way to find out in which .lua file it happened. How to get all function names instead of question marks?

Maybe some tips on how to get a meaningful stacktrace?

Thanks in advance

Unfortunately, this is how stack trace looks like when application runs on device (not simulator). As far as I know there is no way to get meaningful message if "?"s are present (it doesn’t mean there always are "?"s on runtime error on device)

Yup…

I’ve ended up adding a call to log service on the first line of every scene function, including anonymous functions in timers and transitions. It is very ugly, but now I have my own “stack trace”  :P  (which is not a stack trace really, but well, whatever…)

Unfortunately, this is how stack trace looks like when application runs on device (not simulator). As far as I know there is no way to get meaningful message if "?"s are present (it doesn’t mean there always are "?"s on runtime error on device)

Yup…

I’ve ended up adding a call to log service on the first line of every scene function, including anonymous functions in timers and transitions. It is very ugly, but now I have my own “stack trace”  :P  (which is not a stack trace really, but well, whatever…)