DirextX8 crashes

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

DirextX8 crashes

Post 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?
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post 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.
Guest

Post by Guest »

Yea, thats what I did already and I can compile, no problem. It crashes when running program, not compiler.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

...that Guest its me, I forgot to log in...
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post 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).
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post 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...
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post 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.
guest1

Post 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...
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post 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++)
Jedive
Posts: 146
Joined: Wed Apr 28, 2004 5:51 pm

Post 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.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

:shock: ahh ...OK thanks a lot Jedive I'll try that... :P
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post by Domarius »

Well post here if it works! I'd like to know.
Jedive
Posts: 146
Joined: Wed Apr 28, 2004 5:51 pm

Post by Jedive »

You don't trust me, uh? :)
Well, at least it worked perfectly for me.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post 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...
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post 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.
Post Reply