Closed jasonhe88 closed 11 months ago
when try to deserialize following data
['k0'=>'', 'k1'=>'', 'k2'=>'', .... 'k999'=>'']
will always get crash
when unpack following array:
['k0'=>'v0', 'k1'=>'v1', 'k2'=>'v2', .... 'k999'=>'v999']
it's ok
after tracing source code, found line 182 @ deserializer.dart trigger the problem.
tried on intel Mac OS, it's ok
Not much I can do about this - seems like a dart VM problem. Best course of action would be to report this to
https://github.com/dart-lang/sdk/issues
preferably with fully reproducible example.
Yeah, now i think it may be dart VM problem, thank you for your nice plugin!
finally I found if i change line 175 in deserializer.dart from
final list = _readBuffer(length);
to
final list = length==0 ? Uint8List(0) : _readBuffer(length);
will resolve the problem !!
The workaround is nice to have, but this still should not crash the VM. This needs to be fixed in dart SDK. Btw. Does this happen in release mode?
The workaround is nice to have, but this still should not crash the VM. This needs to be fixed in dart SDK. Btw. Does this happen in release mode?
No, it only happens in debug mode in android emulator on apple silicon chip
understood it's dart VM problem, will use this workaround until get fix in dart.
OS: Mac Mini M2 13.4.1 Flutter: 3.10.6 Dart: 3.0.6
error message:
code:
summary:
this crash ONLY happens on combination of following conditions:
very interesting .....