Skip to content

Project crashes with gc bridge tarjan and runs fine with the old or new gc bridge implementation. #2518

@lexboss777

Description

@lexboss777

Steps to Reproduce

  1. Run a sample project.
  2. Swipe ImageView left and right.
  3. See app crashes with one of the following:
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Android.Widget.Toast'.
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Android.Graphics.Matrix'.
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Android.Views.GestureDetector'.

then:
4. open /objdisposed/environment.txt and change it's contents to:
MONO_GC_PARAMS=bridge-implementation=new
or
MONO_GC_PARAMS=bridge-implementation=old
5. Clean project.
6. Run project again.
7. Make sure bridge implementation has switched to new (or old), i.e. see GC_NEW_BRIDGE tag in console:
[Mono] GC_NEW_BRIDGE num-objects 15.....
8. Swipe ImageView left and right.
9. See app runs okay.

Expected Behavior

App doesn't crash when using tarjan gc

Actual Behavior

App crashes when using tarjan gc, but runs fine with old and new gc

Version Information

gist

Log File

gist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions