-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] App crashing with condition `xref_count == xref_index' not met #106410
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
@jonathanpeppers could you or someone on Android team have a look? |
I don't think this is related to dotnet/android. It says it's on this line: If I look on the
I think we can transfer to runtime. |
Tagging subscribers to this area: @BrzVlad |
@BrzVlad could you please take a look? |
I've seen reports for crashes like this for a few years now, ever since we switched to the tarjan bridge implementation as default, but we havent yet received a repro project so that we can investigate. The recommended solution is to use the |
We are having the same issue at the moment, version 8.0.91 |
We were able to fix the issue using the suggestion above. We added an Environment.txt file with the following: And added this to the project file:
|
Are you suggesting to use the Environment.txt file approach rather than code approach mentioned below? We tried setting the bridge implementation like below but it didnt work. |
Follows the recommendation from dotnet/runtime#106410 (comment)
Also having this issue /__w/1/s/src/mono/mono/metadata/sgen-tarjan-bridge.c:1176, condition xref_count == xref_index' not met, function:processing_build_callback_data, xref_count is 137 but we added 133 xrefs The problem arises when browsing some pages of the application for a while. In the .Net 8 version this same problem did not seem to happen. The application closes without throwing debugger-level exceptions. Among the suggestions, is there any appropriate action to try to resolve the problem? |
I have a pretty good idea why is this happening. This code path can introduce duplicates into the runtime/src/mono/mono/metadata/sgen-tarjan-bridge.c Lines 795 to 798 in b658cd2
Then we get to the code that counts runtime/src/mono/mono/metadata/sgen-tarjan-bridge.c Lines 1101 to 1114 in b658cd2
It uses the runtime/src/mono/mono/metadata/sgen-tarjan-bridge.c Lines 131 to 139 in b658cd2
The runtime/src/mono/mono/metadata/sgen-tarjan-bridge.c Lines 1126 to 1130 in b658cd2
|
I managed to reproduce the scenario in my synthetic tests: https://github.com/filipnavara/runtime/tree/standalone-gc-bridge-test Presumably it can be further simplified. |
Repro: |
Description
This is happening when using shell navigation to navigate to a bunch of pages. Unfortunately I was unable to reproduce it on a simpler project to post. So I'm uncertain exactly what's causing this. However, it was working on MAUI version 8.0.40 and broke on subsequent versions.
I was able to reproduce on the Android emulator
Others have posted about this as well:
dotnet/maui#23827
dotnet/maui#23634
dotnet/maui#23826
Steps to Reproduce
See description
Link to public reproduction project repository
No response
Version with bug
8.0.60 SR6
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.40 SR5
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: