Page 1 of 2

DirextX8 crashes

Posted: Tue Apr 27, 2004 4:37 pm
by arras
I compiled my code in DevC++ why using DirectX8 (I have DX pack for Dev and recompiled source as stays in FAQ board) Afther succesfull compilation I got project running but only for a while, under WinXP it runs for about 60 seconds then crases. Under Win2000 it even dont run and crashes imidiately.

When compiled with OpenGL it runs OK, no problems.

Does anybody else have such problems?

Posted: Wed Apr 28, 2004 7:09 am
by Domarius
Assuming you're using Dev-C++, this is a known problem.

Read the "How to get DirectX8 in Dev-C++" thread in the FAQ forum.

Posted: Wed Apr 28, 2004 8:39 am
by Guest
Yea, thats what I did already and I can compile, no problem. It crashes when running program, not compiler.

Posted: Wed Apr 28, 2004 8:42 am
by arras
...that Guest its me, I forgot to log in...

Posted: Thu Apr 29, 2004 7:26 am
by Domarius
That's the crash it's supposed to fix. The crash happens when it starts to use DirectX, after the program has started. You get some console output (Irrlicht loading, etc.) and tou get a blank window (that is your program), and then right when it's supposed to say "using DirectX" on the console window, you get a "windows illegal operation" type error.

The only other things I can suggest is check that you're using the DLL that came in the latest Irrlicht download, and not a previous version. Otherwise I don't know. I'm getting a different sort of crash after trying that solution, that I will post about soon. (Cause after trying that solution, I get a crash no matter what renderer I use, and it happens AFTER the renderer is activated, acording to the console window).

Posted: Thu Apr 29, 2004 11:22 am
by arras
OK try it yourself please if you can spare some time:

http://members.lycos.co.uk/arras1/downl ... hooter.zip

its just test program. Use A/D/W/S to move around.
Please let me know if it crashes...

Posted: Fri Apr 30, 2004 2:15 am
by Domarius
I'd like to, but it'll be a day or more before I can download it.

And I'm stuck with OpenGL too sorry (didn't really say that specifically in my last post), so I don't know how much it would prove, since I'm getting crashes with DirectX myself, but a different one than you're describing. From what I've heard though, the solution on the FAQ forum has worked for some.

I'm only going to be posting about my crash soon anyway, so we're probably in the same boat. But yours is a different crash, so I'll try downloading your program when I can.

Posted: Fri Apr 30, 2004 4:29 am
by guest1
did you try DIRECTX9 with the latest dev pack?

I'm on windows XP also and it works perfectly. I've even tried the executable on multiple machines and all worked good. I can send you my project file if that'll help...

Posted: Fri Apr 30, 2004 6:57 am
by arras
no I was just triing DirextX8 as described in FAQ/Howe to's -author is writing there, that its working only with DX8, so I wasnt triing 9.

Did you recompiled Irrlicht as described there? (I have latest DX patch for Dev++)

Posted: Fri Apr 30, 2004 9:27 am
by Jedive
The demo works perfectly for me, but it was obvious, because you haven't included the IrrLicht Dll, and I had to use my IrrLicht Dll, which has DX support compiled perfectly, so the crash won't be reproduced ;)

I compiled my Dll with both DX8 and DX9 support in Dev-C++ without problems. Just remember to:

1) Have the LATEST version of Dev-C++ (use the Tools->Check for Updates/Packages menu in Dev-C++ IDE).

2) Add -D_IRR_COMPILE_WITH_DIRECTX_8_=1 and -D_IRR_COMPILE_WITH_DIRECTX_9_=1 to the Parameters tab in the Project Options dialog, on the C++ Compiler field :). Also add -ld3dx8d to the Linker field

3) Link with the zlib and jpeglib libraries which are on the /lib/DevCpp folder of IrrLicht (i tried linking with other versions of the libraries first, and that made my program crash).

4) I suggest enabling optimizations for the compiler, to get some extra FPS.

Posted: Fri Apr 30, 2004 9:08 pm
by arras
:shock: ahh ...OK thanks a lot Jedive I'll try that... :P

Posted: Wed May 05, 2004 7:07 am
by Domarius
Well post here if it works! I'd like to know.

Posted: Wed May 05, 2004 7:46 am
by Jedive
You don't trust me, uh? :)
Well, at least it worked perfectly for me.

Posted: Wed May 05, 2004 8:39 am
by arras
I was not trying it yet since I have lot or work right now ...once I'll do it, I let you know...

Posted: Wed May 05, 2004 4:16 pm
by arras
I was triing to recompile Irrlicht.dll again on my computer in work but it gave me error 255 in Makefile.win. May be its because I had Windows2000.

At home I have WinXP and it was compiling without problems. So I have to wait untill weekend when I will get home ...will see then.