iOS Question [NSConcreteMutableData initWithLength:]: absurd length. Please explain

tsteward

Well-Known Member
Licensed User
Longtime User
So I have started a new app. Use the hosted server.
This app was running fine on my iPhone.
I went and had a coffee then came back and run again but now it keeps crashing, but I didn't change anything.
I tried cleaning the project but same result
 

jahswant

Well-Known Member
Licensed User
Longtime User
*** -[NSConcreteMutableData initWithLength:]: absurd length: 18446744073709540416, maximum size: 9223372036854775808 bytes
seem you have a huge varable !
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
*** -[NSConcreteMutableData initWithLength:]: absurd length: 18446744073709540416, maximum size: 9223372036854775808 bytes
seem you have a huge varable !
No I don't but just trying to load xGridListView with a few items
B4X:
'----Shortcuts----
    xGridLVShortCuts.SetCol(2)
    xGridLVShortCuts.ItemWidth=(xGridLVShortCuts.Width/2)-35dip
    xGridLVShortCuts.AddWithImage("Cars","","",1,xui.LoadBitmap(File.DirAssets,"sc-car.gif"),True)
    xGridLVShortCuts.AddWithImage("Bikes","","",2,xui.LoadBitmap(File.DirAssets,"sc-bike.gif"),True)
    xGridLVShortCuts.AddWithImage("Trucks","","",3,xui.LoadBitmap(File.DirAssets,"sc-truck.gif"),True)
    xGridLVShortCuts.AddWithImage("Tools","Decoding tools","",4,xui.LoadBitmap(File.DirAssets,"sc-lishi.png"),True)
    xGridLVShortCuts.AddWithImage("Codes","Bitting from Key Code","",5,xui.LoadBitmap(File.DirAssets,"sc-codes.png"),True)
 
Upvote 0

emexes

Expert
Licensed User
Longtime User
just trying to load xGridListView with a few items

My first guess would be to make sure that .ItemWidth isn't being set to a negative value:

B4X:
'----Shortcuts----
    xGridLVShortCuts.SetCol(2)
    xGridLVShortCuts.ItemWidth=(xGridLVShortCuts.Width/2)-35dip
    xGridLVShortCuts.AddWithImage("Cars","","",1,xui.LoadBitmap(File.DirAssets,"sc-car.gif"),True)
    xGridLVShortCuts.AddWithImage("Bikes","","",2,xui.LoadBitmap(File.DirAssets,"sc-bike.gif"),True)
    xGridLVShortCuts.AddWithImage("Trucks","","",3,xui.LoadBitmap(File.DirAssets,"sc-truck.gif"),True)
    xGridLVShortCuts.AddWithImage("Tools","Decoding tools","",4,xui.LoadBitmap(File.DirAssets,"sc-lishi.png"),True)
    xGridLVShortCuts.AddWithImage("Codes","Bitting from Key Code","",5,xui.LoadBitmap(File.DirAssets,"sc-codes.png"),True)
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
So I have added even more to this app and it has compiled and run maybe 8 times now without changing any code I get the above error again.

I have cleaned the project. Sometimes this helps sometimes not.

It's making writing a program almost impossible.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…