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 Professional Discussion / Runtime Error 502 ; image does not exist .. is this a bug?

Author
Message
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 25th Jun 2012 05:58
Hello,

I have this issue coming up when I try to force my application to go into full screen.

So I reproduced it in this small program here



Notice at the beginning I check if the resolution is supported and if so then I set the "set window off" command to force it to launch full screen.

ONLY if my screen resolution is set to something OTHER than 1024x768 then my application crashes with the "Runtime Error 502 ; image does not exist"

IF I either set my resolution to 1024x768 before I launch the application or just use the "set window on" then no problem occurs.

This is a HUGE deal for me because I can not submit my game to most of the sites I want to send it to due to this issue ; they want the game to launch in 1024x768 full screen mode. If any customer or QA tester's video mode is not already on that my application will crash every single time.

So any assistance on to why this is happening or how to work around it is GREATLY appreciated.

Image attached should go in a /media subfolder.

Thank you in advance for any insight.

NOTE: I did search the forums and found a couple of 502 errors but they appeared to be legitimate image missing issues -- whereas mine clearly is not missing the image something else is going on.
French gui
22
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 25th Jun 2012 09:47 Edited at: 25th Jun 2012 09:56
I had a quick look, but I can't help as it works fine here...

NB: Strangely if the image file doesn't exist , I don't get any error, just a blank screen with the program still running. Maybe a new feature I'm not aware of.
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 25th Jun 2012 15:07 Edited at: 25th Jun 2012 15:09
@ French gui: That's interesting I'll have to test it on more computer systems then.

And doubly interesting that the error / symptom can vary per system.

Actually to be clear: When you said "when the image doesn't exist you get a black screen" did you mean that you manually removed the image?

Or something else?


Can you share your basic system stats?

I'm on:

Windows 7 64 bit
NVIDIA GeForce GTX 460 1GB
Driver 8.17.13.142
Direct X 11
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Jun 2012 20:05
Quote: "Strangely if the image file doesn't exist , I don't get any error"


There used to be a bug where certain image file types didn't give an error message when they were missing at load time. Perhaps you used one of those? You can easily do a bit of testing to see whether your version of DBPro has that bug. [Just checked - it's still there with U77 and jpg files are one of the types that aren't detected correctly]

@erebusman

I can't get the program to fail either. Perhaps you have an unusual set of project settings that affect the issue? I vaguely recall this issue being reported before but I don't recall the cause. Perhaps a search will find it? It might be something to do with 32 bit not being supported by certain display modes - but that's a pure guess.

Also, I wasn't quite sure what you meant by

Quote: "ONLY if my screen resolution is set to something OTHER than 1024x768 then my application crashes with the "Runtime Error 502 ; image does not exist""


Where exactly are doing this setting? Control panel? DBPro project setting? In your dba code? Or something else?
French gui
22
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 25th Jun 2012 20:28
Quote: "Actually to be clear: When you said "when the image doesn't exist you get a black screen" did you mean that you manually removed the image? "


Just set load image "filenamethatdoesnotexist.jpg"

my stats:

Vista home ed
Nvidia Gforce GT430
driver 8.17.0012.6677
direct x10
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Jun 2012 20:33
Did you read my post?
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 25th Jun 2012 20:41
@green gandalf -

Sorry my reproduction steps were unclear let's try this

1: set you computers desktop resolution to 1024x768 and run my example program - no problem should be found.
2: Change you computers desktop resolution to 1280x1024 (or any resolution other than 1024x768)
3: run my example program
4: program crashes with noted error

You might be on to something with the image type I will check other images when I get home tonight.

As far as project settings I believe it's all on default except to launch my active project on default, to set certain icons for executables, and to name the executable a particular name.

Thanks for the tips at least I have some things to test now!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Jun 2012 22:04 Edited at: 25th Jun 2012 22:05
Quote: "As far as project settings I believe it's all on default "


I've tried changing them as well as changing the screen resolutions in Control Panel and everything works smoothly with every combination tested.

Could you check to see whether your machine supports 32 bit colours for the resolutions you tested? Mine supports 32 bit for all supported screen resolutions.

Annoying thing is that I've seen this problem before in an old post and I'm sure there was an explanation (other than the image not actually existing).

Edit Which DBP update are you using? I'm using U77RC7.
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 25th Jun 2012 22:14 Edited at: 25th Jun 2012 22:40
I believe I'm on u77 also but will have to verify when I get home this evening as I'm still at work for the next 4 hours.

Will post an update as I test further.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 25th Jun 2012 23:45
Just out of curiosity, are you loading in your image and then switching to full-screen?

If so, switching to full-screen or changing resolution will dump all loaded media.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jun 2012 00:00
Quote: "Just out of curiosity, are you loading in your image and then switching to full-screen?"


Not in the snippet he posted, and he says that fails. But I can't get it to fail. Perhaps he didn't test the snippet he actually posted?
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 26th Jun 2012 00:32
The snippet I posted is written in the same order as my program.

I ran the snippet on my machine and duplicated the issue before uploading it here.

I find that when I try to make a simple program to prove a problem half the time I solve it myself because I find the error in the process of making a new program to demonstrate it.

I leave work in about an hour , very eager to test some ideas out now.
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 26th Jun 2012 01:50
Ok first test(s) when I got home

- change image to .png, same problem
-change image to 32 bit .bmp , same problem
-change image to16 bit bump, and change video mode to 16 bit, same problem

Will continue testing... The quest goes on!
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 26th Jun 2012 01:53
In case their is a chance it is my project settings could some one compile and attach it so I can test your exe vs mine?

Thanks
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 26th Jun 2012 02:28
Okay I think I have it:

My desktop resolution was set to 32 bit depth when the application crashes with the 502 image error.


When I set my desktop to 16 bit depth, the application no longer crashes.

Interestingly I can set the application to launch in 32bit mode and it still works.. I just can not have my native desktop in 32bit mode when I launch it.


Can anyone else verify this behavior?

1: Go to your display settings
2: Change to any screen resolution that supports 32 bit color mode
3: Run the game and see if it gives the 502 error?

Thank you!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jun 2012 02:40
I tried that earlier - and everything worked whatever combination I used.

I don't know why the 16/32 bit issue is relevant but I vaguely recall it cropping up some time ago. Unfortunately I can't find the thread or remember exactly what the issue was - it was probably one of those "Please Help!" threads.

Anyway, here's my project including exe. It seems to work whichever setting I use in Control Panel.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jun 2012 02:50
Quote: "When I set my desktop to 16 bit depth, the application no longer crashes."


That's strange.

1/ Try updating your Graphic Card Drivers.

2/ Reinstall your codec pack if you have one.

WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Jun 2012 03:08
I can't get it to crash on mine (which is prob a good thing really). My specs: Win7, 2Gb ram, Intel 965 graphics.

It could be one of a few reasons why the image isn't being loaded or being dumped, but by the look of your system specs it shouldn't be a problem at all. If this is the first few times that you've tried running DBP programs on your computer, then have you installed the DirectX9.0c runtime libraries?

Apart from that, I'm flummoxed...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 26th Jun 2012 03:30
I was able to find a thread with another user, in another program having the same issue in 32bit screen mode:

http://forum.thegamecreators.com/?m=forum_view&t=181249&b=5&msg=2158228#m2158228

@Green Gandalf : thanks will test that out too just in case
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 26th Jun 2012 03:33
@Green Gandalf; using your .exe I was able to duplicate my issue


- when my desktop is 32 bit mode I get 502 error
- when my desktop is 16 bit mode I get your 'splash' green& red screen

Will work on graphics drivers updates to see if that resolves next.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jun 2012 12:58
That is weird. It certainly sounds like something to do with your machine/drivers.

Quote: "I was able to find a thread with another user, in another program having the same issue in 32bit screen mode:"


Yes, that sounds like the same problem although I hadn't seen that particular thread so there must be other threads reporting the same problem. You probably need someone who has a better idea of the inner workings of DBPro/Windows to help with this.

It could be a DX9 version issue I suppose. I'm not sure which version I'm using. Is there an easy way to find out? Dxdiag doesn't give the relevant details in an obvious way.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jun 2012 14:03 Edited at: 26th Jun 2012 14:06
DX9c is the last version, and should be downloaded from Microsoft. There are versions on other download sites that don't work properly.

DXDiag should say this....
DirectX Version: DirectX 9.0c (4.09.0000.0904)

erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 26th Jun 2012 16:26
Well I'm on windows 7 with DX11

Is it possible this is a DX11 compatibility issue I wonder?

I'll do some more research because 32 bit mode is require for Aero effects on my desktop I suspect other people could run into this even though on the forums here it seems to be a small amount of people seeing it.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jun 2012 16:53
@Pincho Paxto

That's what I meant - there are many versions of "DirectX 9.0c (4.09.0000.0904)" and DXDIAG doesn't tell you which one you have. You need specific ones for DBPro to work correctly. The details used to be spelled out on IanM's sticky in the Bug Reports board.

Quote: "Well I'm on windows 7 with DX11

Is it possible this is a DX11 compatibility issue I wonder?
"


I doubt DX11 has anything to do with it (since DBPro uses DX9) - but W7 might. Your code works perfectly on my 64bit Vista and 32bit XP machines.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Jun 2012 21:36
You're safe to install DirectX 9.0c on a machine that has DX11 as it will not interfere with it at all. The DX9 runtimes will just allow programs that require it to run. I'm on Win 7 now with both DX11 and DX9.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
erebusman
14
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 27th Jun 2012 02:52
Installing Directx 9.0c directly from Microsot did not resolve this issue for me. Still researching.

Login to post a reply

Server time is: 2026-07-07 15:11:01
Your offset time is: 2026-07-07 15:11:01