Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2021.2.X
Votes
0
Found in
2019.3.0a1
2021.2.0a18
2022.1
Issue ID
1358413
Regression
Yes
[Behavior change] mono_debug_find_method returns non-null object for not compiled methods
Steps to reproduce:
1. Download the attached "UIToolkitSamples-master.zip" project
2. Open the Trade scene
3. Open profiler, activate "Call Stacks" with GC.Alloc option
4. Enter play mode and wait for a few frames to be recorded
5. Pause the game
6. Select the first frame
7. In the Timeline view of the profiler look through Magenta tiles called "GC.Alloc"
Expected result: The stack trace shows the correct stack for the allocation.
Actual result: The top line of the stack trace is unrelated
Reproducible with: 2021.2.0a18, 2021.2.0b7, 2022.1.0a5
Not reproduce with: 2019.4.29f1, 2020.3.16f1, 2021.1.17f1, 2021.2.0a17
Incorrect stack traces:
"get_rawType()"
"set_isPaused()"
This is a sibling of https://fogbugz.unity3d.com/f/cases/1355812/ bug which I've created to track mono behavior change.
The core issue is that mono_debug_find_method started returning non NULL data for methods which are not compiled. The old behavior is much more preferred as it saves useless allocation deallocation IMHO
I've added an extra null check in the PR https://ono.unity3d.com/unity/unity/pull-request/130782/_/profiler/bugfixes/1355812
but for profiler it would be much more performant to avoid any allocs.
Please see for the repro project and more information https://fogbugz.unity3d.com/f/cases/1355812/
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Objects with Universal Render Pipeline/Particles/Lit shader are always lit up when changing their Rendering Layer Mask
- PolySpatial “Trying to set shader on a Material Variant.” error is printed in the console when entering Play Mode
- Error “Shader error in 'YSCloudCover': call to 'tex3D' is ambiguous at Assets/YSCloudCoverText.shader(606) (on d3d11)“ is present when compiling tex3D shader with DXC
- Placeholder asset is not loaded with Advertisement Legacy sample when using the latest version of the package
- Addressables content build fails but the Player build is successful when building a development build
Resolution Note (fix version 2022.1):
Fixed memory leak that occurred when mono_debug_find_method could not find the requested method.