RetroBASIC

Retrogamecoding(.org) => EGSL => Topic started by: gaulthunter on April 24, 2013, 11:53:24 AM

Title: Access Violation
Post by: gaulthunter on April 24, 2013, 11:53:24 AM
OK, so for some reason, this code is crashing when It reaches the last line (the 2nd loadimage).

The code:


Code: [Select]
V="4R1B0"
openwindow(300,300,32,"Revival "..V)
face = loadimage("Resources/Faces/FPlayersad.png")
diabox = loadimage("Resources/Dialogue.png")

The error:


Quote
An unhandled exception occurred at $68127926 :
EAccessViolation : Access violation
  $68127926
  $6812989B
  $68129D33
  $00418D4D
  $00403440
  $10006B31
  $10011A17
  $10006E4F
  $100023D9
  $10006076
  $100060D9
  $10002313
  $00417E84
  $00417F57
  $0040AB38



I've been trying to find the flaw here for months, and have reached a point where I'm literally screaming vulgarity at my computer. Why is it doing this and how can I fix it?
Title: Re: Access Violation
Post by: Cybermonkey on April 24, 2013, 12:09:45 PM
Is the image in RGB format?
Title: Re: Access Violation
Post by: gaulthunter on April 24, 2013, 12:17:13 PM
I don't know how to tell, But it was created and saved (like the first image, which I remind you works) in Paint.net
Title: Re: Access Violation
Post by: Cybermonkey on April 24, 2013, 04:08:50 PM
Maybe you can attach the image here?
Title: Re: Access Violation
Post by: gaulthunter on April 24, 2013, 04:42:02 PM
sure thing.
Title: Re: Access Violation
Post by: Cybermonkey on April 24, 2013, 07:18:40 PM
Yes, it was what I thought: the image was indexed and not in RGB format. I converted it to the correct format with GIMP. Please try the attached image.
Title: Re: Access Violation
Post by: gaulthunter on April 25, 2013, 01:57:22 AM
Thanks! How can I solve this in the future?
Title: Re: Access Violation
Post by: Cybermonkey on April 25, 2013, 08:34:50 AM
Hm, the only program I know which shows that and can convert it with one menu point is the GIMP. But it's free software OTOH.