Open E0lee opened 1 year ago
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.
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"
io.flutter.1.ui (9): EXC_BAD_ACCESS (code=1, address=0x10ebac000)
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:
dart::BootstrapNatives::DN_TypedData_GetInt8(dart::Thread*, dart::Zone*, dart::NativeArguments*) + 300 Flutter
dart::BootstrapNatives::DN_TypedData_GetInt8: -> 0x1043110f4 <+300>: ldrsb x8, [x0, x21] 0x1043110f8 <+304>: lsl x0, x8, #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