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

Crash on iPhone 4S: FormatException: Invalid radix-16 number #75

Closed
ryanhz opened this issue Sep 12, 2018 · 4 comments
Closed

Crash on iPhone 4S: FormatException: Invalid radix-16 number #75

ryanhz opened this issue Sep 12, 2018 · 4 comments

Comments

@ryanhz
Copy link

ryanhz commented Sep 12, 2018

FormatException: Invalid radix-16 number
ffffffff82d6375e
Image provider: CachedNetworkImageProvider("https://appdemo.gymmasteronline.com/static/m-img/bda2c80000feeb515a22821b1c4364f4.jpg", scale: 1.0)
Image key: CachedNetworkImageProvider("https://appdemo.gymmasteronline.com/static/m-img/bda2c80000feeb515a22821b1c4364f4.jpg", scale: 1.0)#0      int._throwFormatException (dart:core/runtime/libintegers_patch.dart:130:5)
#1      int._parse (dart:core/runtime/libintegers_patch.dart:104:14)
#2      int.parse (dart:core/runtime/libintegers_patch.dart:61:12)
#3      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:396:22)
#4      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:365:12)
#5      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:432:39)
#6      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:365:12)
#7      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:546:27)
#8      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
<asynchronous suspension>
#9      SharedPreferences.getInstance (package:shared_preferences/shared_preferences.dart:25:27)
<asynchronous suspension>
#10     CacheManager._init (package:flutter_cache_manager/flutter_cache_manager.dart:51:38)
<asynchronous suspension>
#11     CacheManager.getInstance.<anonymous closure> (package:flutter_cache_manager/flutter_cache_manager.dart:33:29)
<asynchronous suspension>
#12     Lock._runTask (package:synchronized/src/synchronized_impl.dart:149:27)
#13     LockBase._createAndRunTask.run (package:synchronized/src/synchronized_impl.dart:64:14)
#14     LockBase._createAndRunTask (package:synchronized/src/synchronized_impl.dart:74:17)
#15     Lock.synchronized (package:synchronized/src/synchronized_impl.dart:142:12)
#16     CacheManager.getInstance (package:flutter_cache_manager/flutter_cache_manager.dart:29:19)
<asynchronous suspension>
#17     CachedNetworkImageProvider._loadAsync (package:cached_network_image/cached_network_image.dart:471:43)
<asynchronous suspension>
#18     CachedNetworkImageProvider.load (package:cached_network_image/cached_network_image.dart:462:16)
#19     ImageProvider.resolve.<anonymous closure>.<anonymous closure> (package:flutter/src/painting/image_provider.dart:266:86)
#20     ImageCache.putIfAbsent (package:flutter/src/painting/image_cache.dart:143:20)
@renefloor
Copy link
Collaborator

I guess this is related to this flutter issue: flutter/flutter#21313
Not sure if I can do anything about it, but it is a good reason to move away from using shared_preferences for the storage of cache data.

@ryanhz
Copy link
Author

ryanhz commented Sep 15, 2018

Yes, it only happens on 32-bit machines and when you are using integers or booleans. It is actually a bug for SharedPreferences.

@renefloor renefloor added the bug label Sep 17, 2018
@hariprasadiit
Copy link

I've modified the code to use ISO string dates to work around this issue.

@romatroskin
Copy link

romatroskin commented Nov 3, 2018

I guess this is related to this flutter issue: flutter/flutter#21313
Not sure if I can do anything about it, but it is a good reason to move away from using shared_preferences for the storage of cache data.

you can try to migrate to https://pub.dartlang.org/packages/flutter_mmkv

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

Successfully merging a pull request may close this issue.

4 participants