Android Question size limit on CreateMap? (Caused by: java.lang.VerifyError: Verifier rejected class xxx: java.lang.String)

Alessandro71

Well-Known Member
Licensed User
Longtime User
is there a size limit on CreateMap?
as soon as I cross element number 354, the app crashes with

Caused by: java.lang.VerifyError: Verifier rejected class xxx: java.lang.String

splitting the Map in two, and then merging them, seem to solve the issue
 

LucaMs

Expert
Licensed User
Longtime User
is there a size limit on CreateMap?
as soon as I cross element number 354, the app crashes with

Caused by: java.lang.VerifyError: Verifier rejected class xxx: java.lang.String

splitting the Map in two, and then merging them, seem to solve the issue
354 items is really too few; the content of each could be "heavy" or "large," but you'd get a different error message, "out of memory."
Check the data types.
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
354 items is really too few; the content of each could be "heavy" or "large," but you'd get a different error message, "out of memory."
Check the data types.
it'a a Map of
String: Double
about 6KB of text and 800 Doubles
it should be way under 64K
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
I just solved by splitting in 2 CreateMap statements, and then B4XCollections.MergeMaps
I'm puzzled if this same limit applies to iOS also, where just adding a syntax-correct line to an already working statement can trigger a runtime crash with no warnings in the IDE.
It won't be nice to discover it in the wild after a public release
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
Issue happens in Release mode.
I already experienced that Debug mode behave differently in some cases, because of added code/data from the debugger itself (for example on try/catch statements).
Since issue is solved by splitting (and probably I will implement data loading from a DB at a later date), I'm not going to invest any more time on this.
Thank you anyway
 
Upvote 0
Top