Skip to content
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

Bridge SCC at index must NOT be alive #22811

Closed
yma44 opened this issue Jun 3, 2024 · 2 comments
Closed

Bridge SCC at index must NOT be alive #22811

yma44 opened this issue Jun 3, 2024 · 2 comments
Labels
platform/android 🤖 t/bug Something isn't working

Comments

@yma44
Copy link

yma44 commented Jun 3, 2024

Description

Since we updated our app from Xamarin android to .NET MAUI android, we started to have a crash Bridge SCC at index must NOT be alive coming from:
xamarin-android/src/monodroid/jni/osbridge.cc:963 (gc_cleanup_after_java_collection)
when our app opens a third party scanning camera, Scandit.

Looks like this happens when the camera opens and our app goes in background and garbage collection runs.
Always this GC log can be seen before the crash.
zygote64: Explicit concurrent copying GC freed 44801(2MB) AllocSpace objects, 53(9MB) LOS objects, 58% free, 8MB/20MB, paused 96us total 41.578ms

We have reported this to Scandit, but I wonder whether we can get some input from you.

Steps to Reproduce

this

`       
        private DataCaptureContext _dataCaptureContext;
        private DataCaptureView _captureView;
        private BarcodeCapture _capture;
        private Camera _camera;
        private BarcodeCaptureOverlay _overlay;
        private SaveableScanditOverlayView _overlayView;
        private BarcodeCaptureSettings _settings; 

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            RequestWindowFeature(WindowFeatures.NoTitle);
            Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);
            var key = Intent.GetStringExtra(LICENSE_KEY);
            _dataCaptureContext = DataCaptureContext.Builder(key).DeviceName(DeviceSerialNumber).Build();

            _dataCaptureContext.AddListener(this);
            _camera = Camera.GetDefaultCamera(BarcodeCapture.RecommendedCameraSettings);
            if (_camera != null)
            {
                _dataCaptureContext.SetFrameSourceAsync(_camera);
            }
            _settings = BarcodeCaptureSettings.Create();
            var captureDuplicate = Intent.GetBooleanExtra(CAPTURE_DUPLICATE, false);
            _capture = BarcodeCapture.Create(_dataCaptureContext, _settings);

            // set vibrate mode
            var vibrateModeEnabled = Intent.GetBooleanExtra(VIBRATE_ENABLED_KEY, false);
            _capture.Feedback.Success = vibrateModeEnabled ? new Feedback(Vibration.DefaultVibration, null) : new Feedback(null, null);
            _capture.AddListener(this);
            _captureView = DataCaptureView.Create(this, _dataCaptureContext);

            _captureView.AddControl(new TorchSwitchControl());

            _overlay = BarcodeCaptureOverlay.Create(_capture, _captureView);

            // Set laser mode
            _overlay.Viewfinder = new LaserlineViewfinder(LaserlineViewfinderStyle.Legacy);
            _overlayView = new SaveableScanditOverlayView(this);
            _overlayView.SaveButttonClicked += (a, s) =>
            {
                ReturnBarcodes(false);
            };
            SetContentView(_captureView);
        }

        protected override void OnResume()
        {
            base.OnResume();
            _capture.Enabled = true;
            _camera.SwitchToDesiredStateAsync(FrameSourceState.On);
        }
`

Link to public reproduction project repository

No response

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 14, 13, 12,11,10 and 9.

Did you find any workaround?

Not a workaround but this does not happen with our Xamarin app.

Relevant log output

No response

@yma44 yma44 added the t/bug Something isn't working label Jun 3, 2024
Copy link
Contributor

github-actions bot commented Jun 3, 2024

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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@yma44 yma44 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
@yma44
Copy link
Author

yma44 commented Jun 4, 2024

duplicate item was created accidentally

@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants