Something wrong with device->closeDevice or device->ru

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Dark Saint
Posts: 1
Joined: Sat Oct 06, 2007 4:42 pm

Something wrong with device->closeDevice or device->ru

Post by Dark Saint »

Hi. Maybe it is a bug. When i trying to run the example 05 from irrlicht SDK and press button "Quit" the program cannot finishing. The main window is destroyed by console window is still alive. Why? :?:
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The quit message is not properly handled. Niko will fix this issue anytime soon.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 1:49 pm, edited 1 time in total.
GnarlyHotep
Posts: 10
Joined: Tue Aug 14, 2007 6:35 pm

Post by GnarlyHotep »

I just stumbled across this as well, I believe. The problem appears to be that the window is destroyed in closeDevice() before the message is posted/retrieved. Changing

Code: Select all

 DestroyWindow(HWnd);
 PostQuitMessage(0);
 MSG msg;
 GetMessage(&msg, NULL, WM_QUIT, WM_QUIT);
to

Code: Select all

 PostQuitMessage(0);
 MSG msg;
 GetMessage(&msg, NULL, WM_QUIT, WM_QUIT);
 DestroyWindow(HWnd);	
fixes the process failing to terminate (although I don't understand what the PostQuitMesage / GetMessage are doing here).
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 1:49 pm, edited 1 time in total.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 1:49 pm, edited 1 time in total.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If this change does not fix the closeDevice/createDevice problem what is it for? I thought that it is for exactly this purpose!?
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 1:50 pm, edited 1 time in total.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Not the recent change, the one I've added in 1007 or so. What is it good for? I thought that it would avoid the problems with wrongly received quit messages.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 1:50 pm, edited 1 time in total.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ah, ok, then it's like I thought. Thanks.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 1:50 pm, edited 1 time in total.
mnunesvsc
Posts: 22
Joined: Sun May 28, 2006 9:04 pm
Contact:

Post by mnunesvsc »

all this means the recent releases ( 1.3.1, 1.4 ) are still bugged, and we cannot drop the devices until these issues are fixed ?
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can drop the devices, but creation of a second device might be a problem. These problems will be fixed before the final 1.4 release.

Spintz, is there a way to check if DestroyWindow was already called on a HWND? That would be the best way to fix run(), because it would also fix cases where the user called DestroyWindow on the handle.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Last edited by Spintz on Mon Dec 10, 2007 1:50 pm, edited 1 time in total.
Post Reply