Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Apps are crashing on Windows Shutdown
Apps are crashing on Windows Shutdown [message #52909] Sat, 11 January 2020 16:23 Go to next message
zsolt is currently offline  zsolt
Messages: 603
Registered: December 2005
Location: Budapest, Hungary
Contributor
I tested it with 2019.1, 2019.2 and current (2020-01-11) upp versions Mith MSC 2017 toolchain.
When an upp app is running, shutting down windows stops with a window like attached.
Re: Apps are crashing on Windows Shutdown [message #52925 is a reply to message #52909] Mon, 13 January 2020 15:15 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12157
Registered: November 2005
Ultimate Member
Filed in redmine. I have noticed this too, from time to time, but then we are shutting down windows so rarely these days...

There is a mechanism that reports shutdown to the application, so that it should quit itself properly, probably something is wrong with it.

If you have some spare time for this, search for "OverwatchEndSession" and "EndSession". Maybe moving OleUninitialize at the end of ExitWin32 would help...

Mirek
Re: Apps are crashing on Windows Shutdown [message #52929 is a reply to message #52925] Tue, 14 January 2020 05:36 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 603
Registered: December 2005
Location: Budapest, Hungary
Contributor
Yes the problem is there.
So the proposed patch would be the fix of a mistyping in Ctrl::OverwatchWndProc():

 		ONCELOCK {
 			if(HMODULE hDLL = LoadLibrary ("user32")) {
 				AutoCast(ShutdownBlockReasonCreate, GetProcAddress(hDLL, "ShutdownBlockReasonCreate"));
-				AutoCast(ShutdownBlockReasonDestroy, GetProcAddress(hDLL, "ShutdownBlockReasonCreate"));
+				AutoCast(ShutdownBlockReasonDestroy, GetProcAddress(hDLL, "ShutdownBlockReasonDestroy"));
 			}
 		}
 		if(ShutdownBlockReasonCreate)
 			ShutdownBlockReasonCreate(hwnd, ~WString(t_("waiting for user response")));
 		EndSession();
 		ELOGW("WM_QUERYENDSESSION 1");
 		OverwatchEndSession.Wait();


[Updated on: Tue, 14 January 2020 05:36]

Report message to a moderator

Re: Apps are crashing on Windows Shutdown [message #52931 is a reply to message #52929] Tue, 14 January 2020 10:38 Go to previous message
mirek is currently offline  mirek
Messages: 12157
Registered: November 2005
Ultimate Member
OMFG, thank you!

Mirek
Previous Topic: GTK backend now requires hb.h to be presented in include paths (Manjaro)
Goto Forum:
  


Current Time: Sat Jan 25 21:56:02 CET 2020

Total time taken to generate the page: 0.00906 seconds