Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist > Bug Reports
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.

Memory Exception

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-06-2010, 08:41 PM
RacingDog's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Fleet, Hants, UK
Posts: 183
Send a message via Yahoo to RacingDog
Default Memory Exception

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!!!
Reply With Quote
  #2 (permalink)  
Old 07-07-2010, 04:11 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,714
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

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

The error message is very confusing in this case, and it will be fixed.
Reply With Quote
  #3 (permalink)  
Old 07-07-2010, 12:27 PM
RacingDog's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Fleet, Hants, UK
Posts: 183
Send a message via Yahoo to RacingDog
Default

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 by RacingDog : 07-07-2010 at 12:58 PM.
Reply With Quote
  #4 (permalink)  
Old 07-07-2010, 03:45 PM
RacingDog's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Fleet, Hants, UK
Posts: 183
Send a message via Yahoo to RacingDog
Default

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.
Reply With Quote
  #5 (permalink)  
Old 07-07-2010, 08:00 PM
Knows the basics
 
Join Date: May 2010
Posts: 92
Default

Hi. Nice and very useful prog there.
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.
Reply With Quote
  #6 (permalink)  
Old 09-23-2010, 08:28 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Exclamation ... the same problem ...

Hi Erel,
Quote:
Originally Posted by Erel View Post
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.

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

Thanks in advance!
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #7 (permalink)  
Old 09-24-2010, 01:08 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,714
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You cannot load icon files (.ico) as regular images. You can only use it as the program icon.
Reply With Quote
  #8 (permalink)  
Old 09-24-2010, 02:19 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

My ImageLibEx library has an Icon object that can load the default icon from most icon files and has a ToBitmap method to convert it to a bitmap for use as a normal Basic4ppc image.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #9 (permalink)  
Old 09-24-2010, 02:28 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Exclamation

Hi Erel,
Quote:
Originally Posted by Erel View Post
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?
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #10 (permalink)  
Old 09-24-2010, 05:13 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,714
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

How many images do you load? How large are those images?
Note that even if the file is saved as jpg it will (roughly) consume the same memory as an equivalent bmp file.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Out of memory exception JB7TS Questions (Windows Mobile) 6 11-11-2009 05:45 PM
Win32 Exception HARRY Questions (Windows Mobile) 5 11-02-2009 09:32 AM
Out of Memory Exception Error on Load willisgt Questions (Windows Mobile) 9 03-01-2008 11:18 AM
SIP Exception davidmw Bug Reports 8 07-05-2007 04:32 PM
Exception Handling Astragali Questions (Windows Mobile) 2 05-23-2007 12:44 AM


All times are GMT. The time now is 04:07 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0