Unhandle Memory Exception on Win98
BlitzMax Forums/BlitzMax Programming/Unhandle Memory Exception on Win98
| ||
Any idea why this code, which runs fine on XP, doesn't run on my son's Win98SE PC? He has DirectX 9, a non-3D video card because it's a 166MHz Packard Bell with 64Mb RAM! My Blitz Plus apps run fine. Is it just the video card must be Direct X 7 compatible? If so it would be nice if Max gave a nice error message for users like, "sorry you need upgrade your video card" etc.Graphics 800,600,16 Cls DrawText "hello",0,0 Flip WaitKey you download the .exe from here: www.greyaliengames.com/misc/ba.zip (558k) I compiled with debug off and also with Build GUI App off (what does that do anyway?) Any ideas what's wrong? If anyone else has Win98 can they please test. |
| ||
a non-3D video card I think you answered your own question.I agree about the error message. [edit] I'd of thought a check with GraphicsModeExists() would return false though and CountGraphicsModes() also? [/edit] |
| ||
It's a bit odd for sure. In fact the original program I tried on the PC DID call GraphicsModeExists like this:'Try 32 bit, failing that try 16 bit, failing that use windowed mode If GraphicsModeExists(ScreenWidth, ScreenHeight,32,60) Graphics ScreenWidth, ScreenHeight,32,60 ElseIf GraphicsModeExists(ScreenWidth, ScreenHeight,16,60) Graphics (ScreenWidth,ScreenHeight,16,60) Else ForceWindowedMode = 1 FullScreen = 0 'Code will continue after EndIf and call Graphics in windowed mode EndIf EndIf 'No else on purpose If FullScreen = 0 Then Graphics (ScreenWidth,ScreenHeight,0) EndIf Anyway, I've just changed the video card to a 1997 Matrox, we'll see if that fares any better. |
| ||
You not checking the windowed mode. How about...If GraphicsModeExists(ScreenWidth, ScreenHeight,32,60) Graphics ScreenWidth, ScreenHeight,32,60 ElseIf GraphicsModeExists(ScreenWidth, ScreenHeight,16,60) Graphics(ScreenWidth,ScreenHeight,16,60) Elseif Graphics (ScreenWidth,ScreenHeight,0) ForceWindowedMode = 1 FullScreen = 0 Else Runtimeerror "No 3D Hardware Found" EndIfOr a simple... If Not(CountGraphicsModes()) then Runtimeerror "No 3D Hardware Found"...At the top of the program? I'm shooting in the dark a bit here, I'm afraid, as I can't test any of this. :o/ |
| ||
yeah and I've gone and changed the video card now haha. I'll put the code in anyway. |