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

stop reason = EXC_BAD_ACCESS (code=1, address=0x1062d8000) #61

Open
E0lee opened this issue Dec 29, 2022 · 2 comments
Open

stop reason = EXC_BAD_ACCESS (code=1, address=0x1062d8000) #61

E0lee opened this issue Dec 29, 2022 · 2 comments

Comments

@E0lee
Copy link

E0lee commented Dec 29, 2022

i want to print a qrcode.

insert the code outside of class
final result = zx.encodeBarcode( 'Text to encode', format: Format.qrCode, width: 300, height: 300, margin: 10, eccLevel: 0, );

put this code in the _MyHomePageState build function
final imglib.Image img;
Uint8List encodedBytes = Uint8List.fromList([0]);
if (result.isValid && result.data != null) {
img = imglib.Image.fromBytes(300, 100, result.data!.toList());
encodedBytes = Uint8List.fromList(imglib.encodeJpg(img));
// use encodedBytes as you wish
}

console:

  • thread Bump actions/setup-java from 3.4.0 to 3.4.1 #9, name = 'io.flutter.1.ui', stop reason = EXC_BAD_ACCESS (code=1, address=0x1062d8000)
    frame #0: 0x00000001043110f4 Flutterdart::BootstrapNatives::DN_TypedData_GetInt8(dart::Thread*, dart::Zone*, dart::NativeArguments*) + 300 Flutterdart::BootstrapNatives::DN_TypedData_GetInt8:
    -> 0x1043110f4 <+300>: ldrsb x8, [x0, x21]
    0x1043110f8 <+304>: lsl x0, x8, Image in memory, points QRCODE #1
    0x1043110fc <+308>: ldp x29, x30, [sp, #0x20]
    0x104311100 <+312>: ldp x20, x19, [sp, #0x10]
    Target 0: (Runner) stopped.

flutter version:3.3.10
library version:^0.9.0
ios:15.1

@khoren93
Copy link
Owner

khoren93 commented Jan 9, 2023

Hello @E0lee,

Thank you for your suggestion. As a temporary workaround, you could try using a smaller image size such as 120x120 for generating QR codes. This should help avoid any issues with large image sizes on iOS.

I am still working on finding a more permanent solution to this issue and will keep you updated as soon as I have any progress to report.

@QuangHieu0611
Copy link

QuangHieu0611 commented Feb 20, 2023

Hello @khoren93,
I also encountered a similar error, and this error still exists in version 1.0.2. As your suggestion, I tried to create a code128 with a size of 174x87 without any errors. However, as soon as I increased the size to 175x88 or larger, the error occurred.

I am running my code on an iOS 16.2 simulator and I am able to generate large Code128 barcodes (300x150) without any issues. However, when I try to run the same code on a real device such as an iPad 12.5.7 or iPhone 16.2, I encounter these errors.

I have also noticed that the application ZXScanner (https://apps.apple.com/am/app/zxscanner/id1629106248) is experiencing the same issue when generating Code128 barcodes.

[Common] _BSMachError: port 11007; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"
#0 0x00000001038345f4 in dart::BootstrapNatives::DN_TypedData_GetInt8(dart::Thread*, dart::Zone*, dart::NativeArguments*) ()
io.flutter.1.ui (9): EXC_BAD_ACCESS (code=1, address=0x10ebac000)
Capture

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