sentry-unity
sentry-unity copied to clipboard
IL2CPP line number incorrect on some platforms
From tests of 0.22.0 and Unity 2020.3.37f1
with our dogfooding game:
The feature works on iOS as expected.
An issue on Android: Only displays C++ line numbers: https://sentry.io/organizations/sentry/issues/3464200251/events/d61109bbe5d14daf852ec50da4f98504/?project=5905698&query=is%3Aunresolved
A similar issue on the main branch: Only displays C++ line numbers:
Windows on Unity 2021.3.7f1
: https://sentry.io/organizations/sentry-sdks/issues/3463873374/events/7ea51475921f4ed19e5af22857b1a306/?project=5439417
Android on Unity 2020.3.37f1
: https://sentry.io/organizations/sentry-sdks/issues/3261854748/events/bf65b11404ae4b478d1ea6745d62d51c/?project=5439417
The Android event has source context, and makes it obvious why the mapping fails:
I can take a closer look at the debug info for this particular function, but it might as well be possible that the way C++ exceptions work, they will point to other places in the C++ code.
Can you by any chance look at the generated code for the other examples?
I wonder why that code is not being uploaded. Probably we are running into the file size limit that we discovered recently. @kamilogorek Can you remind me which CLI option I need to update (via config file, or via cli flag?) to upload larger files? I bet these generated C++ files can be huge.
It's dif.max_item_size=1048576
with properties
file, or if using ini
[dif]
max_item_size=1048576
(with 1024*1024
being a default 1MB
).
https://docs.sentry.io/product/cli/configuration/#configuration-values
The size limit might be the culprit because just looking at the largest files in our sample app:
However, doesn't the CLI print any warnings when it's skipping files due to the limit? I think I would have noticed that and it would have saved a lot of time if it really is the issue.
CLI currently does not print any warning when it skips the files prior to upload.
so updating the max_item_size
indeed fixes the issue for Windows Unity 2021 build: https://sentry.io/organizations/sentry-sdks/issues/3464053353/events/01be4c17c231430f8ceae02abefa3dc0/?project=5439417
It is still c++ instead of the expected c#, though
Maybe it's because for some reasons the c# sources don't get uploaded? I can't access the uploaded files on https://sentry.io/settings/sentry-sdks/projects/sentry-unity/debug-symbols/ so can't tell what's really in there.
In that case il2cpp does not seem to generate a line mapping, so there is nothing we can do :-(
CLI currently does not print any warning when it skips the files prior to upload.
Is this something you could add @kamilogorek ? Seems like it took some effort to find out what happened because there was no logging.
In that case il2cpp does not seem to generate a line mapping, so there is nothing we can do :-(
@Swatinem we can raise an issue with Unity if we can give them a repro. But we need a way to document this behavior for the current versions as this will be a source of bug reports
Closing this as 0.22.1 seems to have resolved this issue. Thanks, everyone!