Skip to main content
gamedev.net
🔒 Locked

Weird thread error

Started by dynamicman Oct 11, 2001 at 5:53 PM 3 replies 300+ views
Original Post
dynamicman
dynamicman
Hi, I''m new to the forum but here goes my question... I''ve initialized DirectX and when I close the application I delete the draw device and object (in that order)... I trace the application to the end when it jumps out of WinMain and for some reason a thread returns -1..... There seems to be two threads running (but I don''t use threads in my program)... Direct3D8: (INFO) :======================= Hal SWVP device selected Direct3D8: (INFO) :Using P3 PSGP The thread 0xFFF8E367 has exited with code -1 (0xFFFFFFFF). The thread 0xFFF65A0F has exited with code 0 (0x0). Can anybody tell me why this happens? I thought it was my directx code but I DO properly release them when they are not being used... I''m stumped.. Thanks in advance!
dynamicman
dynamicman
and then it dissapears... weird..... seems random.... I''ve stripped my program to the bare minumum but its still kinda random...... huh.....
dynamicman
dynamicman
and then it dissapears... weird..... seems random.... I''ve stripped my program to the bare minumum but its still kinda random...... huh.....
WarMachine
WarMachine
DX uses its own threads, and they mostly return -1, even if nothing is wrong, so if everything seems to be working, don''t worry about it, it happens to everyone using DX.
"You can get out of prison, but not out of the cemetery"
Lotan
Lotan
I had the same problem for a long time, and searched for the answer, but could never get one. What I noticed was that if my program ran for awhile the thread would exit a few seconds into it and return 0. What is even weirder is that while my game was running, I could sometimes notice a little stutter/slow down when it exited.

If I remember correctly, if I ran in Release mode, it didn''t appear to be there.

Also, when I switched to developing in Windows 2000, the problem went away.

I''m sure none of this helps, but I wanted to let you know that you''re not alone.

Lotan

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.