Memory Exception

RacingDog

Active Member
Licensed User
OK, I was going to the pub tonight anyway, but if I hadn't been, this would have driven me there!

I had a working app, yes the previously buggy one we've been looking at elsewhere, but it is fixed now. I changed the buttons for image buttons and got hold of some freeware icons....

It still works on the desktop.

Compiled or interpreted, it won't load on the device (but it used to). I get "Error loading program. OutOfMemoryException. The prog is < 0.5 MB and my device has 59.5 MB free.

I know, it's probably my fault again, but buggered if I can see it given there is no problem on the desktop.

If it runs on your device then you can't see the problem, because it is initial run time on mine.

I run much bigger programs on the device. And yes I made sure I'd stopped other active programs via Settings.

Right, now where's that damn pub!!!
 

RacingDog

Active Member
Licensed User
I take it you mean the button icons, not the main app icon.

That info should be in the help file in all the places a graphic file can be specified. I've just this minute, finally found the info in part of the help file that doesn't apply to what I am doing, to whit Image under the obsolete method LoadPicture. No wonder I hadn't looked there!

Thanks for the info. I have a freebie called IcoFx which fortunately allows export to all your supported formats, which is lucky for me! :)

EDIT: Having done that, I can advise not converting to bmp format, you lose any transparent bits. I settled on gif which worked fine.
 
Last edited:

RacingDog

Active Member
Licensed User
P.S. Strange one to leave out, icons, given it's pretty damn common for button images. If you search for say tool bar images, you'll most likely find icon sets.
 
Hi. Nice and very useful prog there.:sign0060:
I understand B4P applications can only target Windows Mobile devices...(not to
mention desktops)
Right?
It would be good to compile the prog and share it with some friends of mine(after I
finally buy the liscence.:)
 

JOTHA

Well-Known Member
Licensed User
Longtime User
... the same problem ...

Hi Erel,
The icon format is not supported on the device.
The exception is thrown when it tries to load the icons images.

I have the same problem.
In the help-file it was said 256 colours and 32 x 32 pixels (I think so ...)
I changed every icon in this sizes, but the problem exists anyway.

On the desktop the app works fine, but not on the device.

The error message is very confusing in this case, and it will be fixed.
... when will this be?

Thanks in advance!
 

JOTHA

Well-Known Member
Licensed User
Longtime User
Hi Erel,
You cannot load icon files (.ico) as regular images. You can only use it as the program icon.
... I did only use one icon as program icon.

The rest of the ImageButtons I used as JPG-Files.

So what is the reason for this error message?

Should I send you the app, that you can take a look on it? :sign0085:
 

JOTHA

Well-Known Member
Licensed User
Longtime User
Hi Erel,

thank you for your help. Now it works!
How many images do you load?
The amount of the images was not the problem, I've loaded 7 images...
How large are those images?
... but they where only 1k size.

The problem was the first "Start-Image". The size of this image was 728kB with 2246 x 2246 pixels as JPG-File ... and this was naturally "out of memory".

Thanks again for your support! :sign0098:
 
Top