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

queue = 'ProviderImageSurfaceCacheQueue', stop reason = EXC_BAD_ACCESS #62

Open
sparkmobi opened this issue Sep 14, 2023 · 4 comments
Open

Comments

@sparkmobi
Copy link

hello

I am getting this error after approving the camera permission

thread #43, queue = 'ProviderImageSurfaceCacheQueue', stop reason = EXC_BAD_ACCESS (code=1, address=0x127b00000)
frame #0: 0x000000022c20310c libsystem_platform.dylib_platform_memmove + 188 libsystem_platform.dylib:
-> 0x22c20310c <+188>: ldnp q0, q1, [x1]
0x22c203110 <+192>: add x1, x1, #0x20
0x22c203114 <+196>: subs x2, x2, #0x20
0x22c203118 <+200>: b.hi 0x22c203104 ; <+180>

here is my code example

return Scaffold(
body: SafeArea(
child: Stack(
children: [
ScanKitWidget(
controller: _controller,
continuouslyScan: true,
boundingBox: rect, ),
Align(
alignment: Alignment.topCenter,
child: GlassContainer.clearGlass(
blur: 8,
borderColor: Colors.transparent,
margin: EdgeInsets.only(top: 60.h),
elevation: 2,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(5),
color: Colors.white12,
height: 50.h,
width: 150.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
IconButton(
onPressed: () {
_controller.switchLight();
},
icon: const Icon(
Icons.lightbulb_outline_rounded,
color: Colors.white,
size: 25,
)),
SizedBox(
width: 0.075.sw,
),
IconButton(
onPressed: () async {
_controller.pickPhoto();
},
icon: Image.asset(
'assets/images/photo.png',
width: 25,
height: 25,
color: Colors.white,
),
)
],
),
),
),
Align(
alignment: Alignment.center,
child: CustomPaint(
painter: QrScanBoxPainter(
boxLineColor: Colors.cyanAccent,
animationValue: _animationController?.value ?? 0,
isForward:
_animationController?.status == AnimationStatus.forward,
),
child: SizedBox(
width: qrScanSize,
height: qrScanSize,
),
),
),

                  ],
                )),
          ),
      ],
    ),
  ),
);

I even tested the example project then clicked on customized view and also crashed

@mdddj
Copy link

mdddj commented Sep 14, 2023

有同样的问题,controller.dispose 函数在ios上面会闪退 ,2.0.0

@arcticfox1919
Copy link
Owner

@sparkmobi
If you are using the flutter_easy_permission plugin to request permissions, then you may want to try using a different Flutter plugin, as flutter_easy_permission is not actively maintained and may have compatibility issues on higher versions of iOS.

@sparkmobi
Copy link
Author

using

no I am not using this library, i run your example project and still getting the same error

@arcticfox1919
Copy link
Owner

@sparkmobi
What I mean is that I am using the flutter_easy_permission plugin in my example project. I can't reproduce the issue with my iOS device here, perhaps you can provide, for reference, the model number of the device reporting the error, the system version, and the Flutter SDK version. I think this issue is most likely caused by not successfully obtaining access to the camera, and you should call ScanKit after obtaining authorization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants