Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Severe exception when loading image into graphics RAM

Author
Message
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 20th Sep 2008 18:50 Edited at: 20th Sep 2008 19:08
I am trying to load eight tiny images into VRAM. Fresh off Paint. The images are fine. I have more than enough VRAM. Darn thing throws a "severe exception" on the east image.

These are, right now, the only images being loaded. What's the deal? Looked at the other posts and there was a reason, the VRAM being overloaded. This CANNOT be happening here, the images are 256 colour 64x72 PNGs! I've got more into a DS!

Granted, the slightly odd sizes might be a cause. But why would the first lot load fine?



Image is attached.

I often run Elite Force on this slightly pitiful machine, which uses loads of textures much larger. 64x72x8=36.6kb.

Addition: if I remove the immediately add to VRAM parameter, the images just don't load. I can load others, just none at that time.

Attachments

Login to view attachments
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 21st Sep 2008 02:00
Well seeing as how darkbasic doesn't give accurate feedback as to what line of code was wrong, it probably glitches on the first line. Try remming out all of the lines then test it after un-remming them one line at a time, to figure out where it REALLY messes up.

What happens if you load the images without the flag and then try to make sprites with them.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 21st Sep 2008 10:15
Quote: "Addition: if I remove the immediately add to VRAM parameter, the images just don't load."


What is your test to see if the images are loaded or not?

Severe Exceptions can happen for a lot of reasons. Often, there is a formatting issue with some form of media. Try loading your png files into some other paint or photo editing program and resave them as png (or as another format like bmp or jpg etc.) See if that makes any difference.

Also try checking your video memory after each image load just to see if something's going wacky. Use something like:

result=SYSTEM DMEM AVAILABLE()
print result

Sometimes, if you forget to add an endfunction to the end of a function you can get a severe exception depending on what the function is trying to do.

Enjoy your day.
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 21st Sep 2008 13:36
I fixed it by removing sprites from the program. The sprite system was doing something major bad. By not loading, I mean sprites showing them were blank and pasting the image threw an error of "Image does not exist".

Login to post a reply

Server time is: 2025-06-07 06:46:16
Your offset time is: 2025-06-07 06:46:16