Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[469d] Crash on closing game - CloseUWindow related #1398

Closed
guitronimo opened this issue Oct 3, 2023 · 14 comments
Closed

[469d] Crash on closing game - CloseUWindow related #1398

guitronimo opened this issue Oct 3, 2023 · 14 comments
Labels
bug This is a confirmed bug memory-management This is a garbage collection or general memory management issue
Milestone

Comments

@guitronimo
Copy link

guitronimo commented Oct 3, 2023

I experience a crash and it`s a very odd one.

It only occurs when both following condions are met:

  • When i close the game via Window X Button
  • When i put a global variable to my custom console 🤣
    ( feel the need to mention that there are already alot of custom variables )
    Almost looks like i cannot further extend this...

I am not 100 percent sure if this is caused by the console that im running or if this is a 469d bug.

It appears that the problem is triggered when UWindowDialogClientWindow calls CloseUWindow() in the root console.
But only when closing the game via the X button. Disconnect, Reconnect, Exit work just fine.
So chance is good that the Menu bar is involved here, since you typically press escape and then hit the X button.

On 469C and back to 436 this is not an issue at all.

469D Client log:

Exit: Exit OpenGLRenderDevice0
Exit: Destroying locals...
Exit: Delete GL (0)
ScriptLog: TO_GUIBaseMgr::Destroyed
ScriptLog: destroying scoreboard
ScriptLog: destroying scoreboard
Critical: (Transient.TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.Close)
Critical: (TO-RapidWaters.TOSTPlayer0 TOSTBase45.TO_Player.Destroyed)
Critical: UObject::ProcessEvent
Critical: (TOSTPlayer TO-RapidWaters.TOSTPlayer0, Function TOST45.TOSTPlayer.Destroyed)
Critical: ProcessDestroyed
Critical: ULevel::DestroyActor
Critical: (TOSTPlayer TO-RapidWaters.TOSTPlayer0)
Critical: UPlayer::Destroy
Critical: UViewport::Destroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: UWindowsViewport::Destroy
Critical: UObject::ConditionalDestroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: WM_DESTROY
Critical: UWindowsViewport::ViewportWndProc
Critical: WWindow::StaticWndProc (Message=WM_DESTROY)
Critical: MessagePump
Critical: MainLoop

469c Client log - normal:

ScriptLog: TO_GUIBaseMgr::Destroyed
ScriptLog: destroying scoreboard
ScriptLog: destroying scoreboard
ScriptLog: s_Player::Destroyed
ScriptLog: destroying TOSTPlayerHUD
ScriptLog: destroying hud
Log: Closed viewport
Log: All Windows Closed
Log: appRequestExit(0)
Exit: Preparing to exit.
Log: Collecting garbage
Log: Purging garbage
Log: Unbound to Engine.dll
Log: Unbound to Core.dll
Log: Unbound to Window.dll
Log: Unloading: Package Engine
Log: Unloading: Package Core
Exit: Game engine shut down
Log: Unbound to WinDrv.dll

Custom Console part:

var bool bMyTestVariable;
function CloseUWindow()
{

	if(!bQuickKeyEnable)
		Viewport.Actor.SetPause( False );
		
	bNoDrawWorld 	= False;
	bQuickKeyEnable = False;
	bUWindowActive 	= False;
	Viewport.bShowWindowsMouse = False;

	if(Root != None)
		Root.bWindowVisible = False;

	zzmystate=0;
	Viewport.bSuspendPrecaching = False;

}

469D-CrashOnExit

@SeriousBuggie
Copy link
Collaborator

Can you turn utrace on, make crash and post last lines of log here? There must be utrace records.

@guitronimo
Copy link
Author

Good morning,

find below the log with UTrace activated

ScriptLog: destroying scoreboard
UTrace:         BEGIN TOST_GUITabScores0 s_SWAT.TO_GUIBaseTab.Close
UTrace:           BEGIN TOST_GUITabScores0 UWindow.UWindowClientWindow.Close
UTrace:             BEGIN TOST_GUITabScores0 UWindow.UWindowWindow.Close
UTrace:               BEGIN TOST_GUITabScores0 UWindow.UWindowWindow.SaveConfigs
UTrace:               END   TOST_GUITabScores0 UWindow.UWindowWindow.SaveConfigs
UTrace:             END   TOST_GUITabScores0 UWindow.UWindowWindow.Close
UTrace:           END   TOST_GUITabScores0 UWindow.UWindowClientWindow.Close
UTrace:         END   TOST_GUITabScores0 s_SWAT.TO_GUIBaseTab.Close
UTrace:       END   TOST_GUITabScores0 s_SWAT.TO_GUITabScores.Close
UTrace:     END   TO_GUIBaseMgr0 s_SWAT.TO_GUIBaseMgr.Destroyed
UTrace:     BEGIN TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.Close
UTrace:       BEGIN TOST_TeamSelect0 UWindow.UWindowWindow.GetPlayerOwner
UTrace:       END   TOST_TeamSelect0 UWindow.UWindowWindow.GetPlayerOwner
UTrace:       BEGIN TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.DelMeshActor
UTrace:       END   TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.DelMeshActor
Critical: (Transient.TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.Close)
Critical: (TO-RapidWaters.TOSTPlayer0 TOSTBase45.TO_Player.Destroyed)
Critical: UObject::ProcessEvent
Critical: (TOSTPlayer TO-RapidWaters.TOSTPlayer0, Function TOST45.TOSTPlayer.Destroyed)
Critical: ProcessDestroyed
Critical: ULevel::DestroyActor
Critical: (TOSTPlayer TO-RapidWaters.TOSTPlayer0)
Critical: UPlayer::Destroy
Critical: UViewport::Destroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: UWindowsViewport::Destroy
Critical: UObject::ConditionalDestroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: WM_DESTROY
Critical: UWindowsViewport::ViewportWndProc
Critical: WWindow::StaticWndProc (Message=WM_DESTROY)
Critical: MessagePump
Critical: MainLoop
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Warning: glxStopOutput() failed: 6
Log: DirectDraw End Mode
Exit: Exiting.
Log: Log file closed, 10/03/23 10:57:42

@SeriousBuggie
Copy link
Collaborator

Please post code of TOSTBase45.TOST_TeamSelect.Close.

@guitronimo
Copy link
Author

guitronimo commented Oct 3, 2023

function Close (optional bool bByParent)
{
	local	PlayerPawn	P;

	P = GetPlayerOwner();
	if ( (P != None) && P.IsA('TO_SysPlayer') )
		TO_SysPlayer(P).StartMenu = None;

	// Cleanup
	if ( Credits != None )
	{
		Credits.Destroy();
		Credits = None;
	}

	DelMeshActor();

	if ( Root != None )
	{
		Root.Console.bQuickKeyEnable = false;
		Root.Console.CloseUWindow();
		Root.bAllowConsole = true;
	}

	Super.Close(bByParent);
}

function DelMeshActor ()
{
	if ( MeshActor != None )
	{
		MeshActor.Destroy();
		MeshActor = None;
	}
}

If i dont call the close function in TOST_TeamSelect then the error still is there but caused by TO_MenuBar which also calls CloseUWindow();

@guitronimo
Copy link
Author

ScriptLog: destroying scoreboard
Critical: (Transient.TO_MenuBar0 UWindow.UWindowMenuBar.Close)
Critical: (Transient.TO_RootWindow0 UWindow.UWindowWindow.Close)
Critical: (Transient.TOST_TeamSelect0 UWindow.UWindowClientWindow.Close)
Critical: (Transient.TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.Close)
Critical: (TO-RapidWaters.TOSTPlayer0 TOSTBase45.TO_Player.Destroyed)
Critical: UObject::ProcessEvent
Critical: (TOSTPlayer TO-RapidWaters.TOSTPlayer0, Function TOST45.TOSTPlayer.Destroyed)
Critical: ProcessDestroyed
Critical: ULevel::DestroyActor
Critical: (TOSTPlayer TO-RapidWaters.TOSTPlayer0)
Critical: UPlayer::Destroy
Critical: UViewport::Destroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: UWindowsViewport::Destroy
Critical: UObject::ConditionalDestroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: WM_DESTROY
Critical: UWindowsViewport::ViewportWndProc
Critical: WWindow::StaticWndProc (Message=WM_DESTROY)
Critical: MessagePump
Critical: MainLoop
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Warning: glxStopOutput() failed: 6
Log: DirectDraw End Mode
Exit: Exiting.
Log: Log file closed, 10/03/23 12:54:29

@SeriousBuggie
Copy link
Collaborator

Show full Console code. Do you modify stock Console or create custom one as subclass?
Where you put new variable? At end in middle of other variables?

@guitronimo
Copy link
Author

guitronimo commented Oct 3, 2023

Two thousand lines of code... Here we go.
Disclaimer: Code was not written by me. This is code that was created by the original crew. I just did minor changes to it and took away unrequred stuff that was once there for anti cheat reasons before ACE was a thing.

The Variabe is zzbMyTestVariable. It doesnt matter if its on top, the end or in the middle ... I tested that a few times.
The crash also occurs when i put that test variable to the Motherclass TOConsole.
It doesnt matter if i put zz in fromt of it or not. I am not using Obfuscation on this at the moment.
The Motherclass is TO 3.5 Console for Colored Chat support.

Edit: Stripped out again

@SeriousBuggie
Copy link
Collaborator

Did you recompile all subclasses of this class, after change it?

@guitronimo
Copy link
Author

Yes of course. I recompile the whole Project.
There is no former version of these classes known to the client. Also cleared cache folders

@SeriousBuggie
Copy link
Collaborator

What about type variable? only bool cause this? try other common types.
What about more different vars? If there be 2-3-4-5-6 of it?

@guitronimo
Copy link
Author

Looks like i found the issue:

var TO_Player MyPlayer;

If i remove the line its just working fine....
Its just there for Compatibility at the moment. I may end up needing it again some day.

Why this is only the case for 469D and not lower i dont know.

@guitronimo
Copy link
Author

I can just use TO_Player(ViewPort.Actor) for my stuff. So its not required for future use.

Thanks for your Precious support anyway.

@guitronimo
Copy link
Author

Infortunately the issue isnt fixed.

Extending the console still leads into crashes only on 469D.
I will do some investigation and hope finding the cause - then report back here.

Cheers

@guitronimo
Copy link
Author

guitronimo commented Oct 7, 2023

Regarding my Client crash problem...
I think its not fault of my custom packages - although my custom packages trigger the problem.

I ran a few tests for logging:
Setup a clean TO Client with latest 469D Release Candidate 3 and copied the whole game 6 times, then dropped different engine versions on top. Each game works flawlessly until i press escape and hit X Button to close:

469C-RC4  (no crash)
469C-Release (no crash)
469D Preview 1 (crash)
469D Preview 11 (crash)
469D RC 2 (crash)
469D RC 3 (crash)

I tried a couple of other lower versions like 469b and 436 and dont have any crash at all.
From my point of view something between 469C Release and 469D Preview 1 has changed in the Destroying method.

Attached is a log that shows:
Main Playerclass destroy start - end
Player Motherclass Destroy start - end
You can see in 469C logs how its supposed to look like.

Log from 469C-RC4

Init: Version: 469
Init: Compiled: Aug 10 2022 12:44:54
...
Exit: Exit OpenGLRenderDevice0
Exit: Destroying locals...
Exit: Delete GL (0)
ScriptLog: TOSTPlayer::Destroyed() - start
ScriptLog: TO_Player::Destroyed() - start
ScriptLog: TO_GUIBaseMgr::Destroyed
ScriptLog: destroying scoreboard
ScriptLog: destroying scoreboard
ScriptLog: TO_Player::Destroyed() - end
ScriptLog: Going to destroy PlayerPawn
ScriptLog: destroying TOSTPlayerHUD
ScriptLog: destroying hud
ScriptLog: TOSTPlayer::Destroyed() - end
Log: Closed viewport
Log: All Windows Closed
Log: appRequestExit(0)
Exit: Preparing to exit.
Log: Collecting garbage

Log from 469C-Release

Init: Version: 469
Init: Revision: c (Release)
Init: Compiled: Oct 29 2022 10:10:27
...
Exit: Exit OpenGLRenderDevice0
Exit: Destroying locals...
Exit: Delete GL (0)
ScriptLog: TOSTPlayer::Destroyed() - start
ScriptLog: TO_Player::Destroyed() - start
ScriptLog: TO_GUIBaseMgr::Destroyed
ScriptLog: destroying scoreboard
ScriptLog: destroying scoreboard
ScriptLog: TO_Player::Destroyed() - end
ScriptLog: Going to destroy PlayerPawn
ScriptLog: destroying TOSTPlayerHUD
ScriptLog: destroying hud
ScriptLog: TOSTPlayer::Destroyed() - end
Log: Closed viewport
Log: All Windows Closed
Log: appRequestExit(0)
Exit: Preparing to exit.
Log: Collecting garbage

Log from 469D Preview 1

Init: Version: 469
Init: Revision: d (Preview)
Init: Compiled: Jan 22 2023 23:57:02
...
Exit: Exit OpenGLRenderDevice0
Exit: Destroying locals...
Exit: Delete GL (0)
ScriptLog: TOSTPlayer::Destroyed() - start
ScriptLog: TO_Player::Destroyed() - start
ScriptLog: TO_GUIBaseMgr::Destroyed
ScriptLog: destroying scoreboard
ScriptLog: destroying scoreboard
Critical: (Transient.TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.Close)
Critical: (TO-Thunderball.TOSTPlayer0 TOSTBase45.TO_Player.Destroyed)
Critical: UObject::ProcessEvent
Critical: (TOSTPlayer TO-Thunderball.TOSTPlayer0, Function TOST45.TOSTPlayer.Destroyed)
Critical: ProcessDestroyed
Critical: ULevel::DestroyActor
Critical: (TOSTPlayer TO-Thunderball.TOSTPlayer0)
Critical: UPlayer::Destroy
Critical: UViewport::Destroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: UWindowsViewport::Destroy
Critical: UObject::ConditionalDestroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: WM_DESTROY
Critical: UWindowsViewport::ViewportWndProc
Critical: WWindow::StaticWndProc (Message=WM_DESTROY)
Critical: MessagePump
Critical: MainLoop
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Warning: glxStopOutput() failed: 6
Log: DirectDraw End Mode
Exit: Exiting.
Log: Log file closed, 10/07/23 10:05:38

Log from 469D Preview 11

Init: Version: 469
Init: Revision: d (Preview)
Init: Compiled: Jul 24 2023 19:44:46
...
Exit: Exit OpenGLRenderDevice0
Exit: Destroying locals...
Exit: Delete GL (0)
ScriptLog: TOSTPlayer::Destroyed() - start
ScriptLog: TO_Player::Destroyed() - start
ScriptLog: TO_GUIBaseMgr::Destroyed
ScriptLog: destroying scoreboard
ScriptLog: destroying scoreboard
Critical: (Transient.TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.Close)
Critical: (TO-Thunderball.TOSTPlayer0 TOSTBase45.TO_Player.Destroyed)
Critical: UObject::ProcessEvent
Critical: (TOSTPlayer TO-Thunderball.TOSTPlayer0, Function TOST45.TOSTPlayer.Destroyed)
Critical: ProcessDestroyed
Critical: ULevel::DestroyActor
Critical: (TOSTPlayer TO-Thunderball.TOSTPlayer0)
Critical: UPlayer::Destroy
Critical: UViewport::Destroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: UWindowsViewport::Destroy
Critical: UObject::ConditionalDestroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: WM_DESTROY
Critical: UWindowsViewport::ViewportWndProc
Critical: WWindow::StaticWndProc (Message=WM_DESTROY)
Critical: MessagePump
Critical: MainLoop
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Warning: glxStopOutput() failed: 6
Log: DirectDraw End Mode
Exit: Exiting.
Log: Log file closed, 10/07/23 10:06:59

Log from 469D RC 2

Init: Version: 469
Init: Revision: d (Preview)
Init: Compiled: Aug 21 2023 16:37:05
...
Exit: Exit OpenGLRenderDevice0
Exit: Destroying locals...
Exit: Delete GL (0)
ScriptLog: TOSTPlayer::Destroyed() - start
ScriptLog: TO_Player::Destroyed() - start
ScriptLog: TO_GUIBaseMgr::Destroyed
ScriptLog: destroying scoreboard
ScriptLog: destroying scoreboard
Critical: (Transient.TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.Close)
Critical: (TO-Thunderball.TOSTPlayer0 TOSTBase45.TO_Player.Destroyed)
Critical: UObject::ProcessEvent
Critical: (TOSTPlayer TO-Thunderball.TOSTPlayer0, Function TOST45.TOSTPlayer.Destroyed)
Critical: ProcessDestroyed
Critical: ULevel::DestroyActor
Critical: (TOSTPlayer TO-Thunderball.TOSTPlayer0)
Critical: UPlayer::Destroy
Critical: UViewport::Destroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: UWindowsViewport::Destroy
Critical: UObject::ConditionalDestroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: WM_DESTROY
Critical: UWindowsViewport::ViewportWndProc
Critical: WWindow::StaticWndProc (Message=WM_DESTROY)
Critical: MessagePump
Critical: MainLoop
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Warning: glxStopOutput() failed: 6
Log: DirectDraw End Mode
Exit: Exiting.
Log: Log file closed, 10/07/23 10:08:27

Log from 469D RC 3

Init: Version: 469
Init: Revision: d (Preview)
Init: Compiled: Aug 21 2023 16:37:05
...
Exit: Exit OpenGLRenderDevice0
Exit: Destroying locals...
Exit: Delete GL (0)
ScriptLog: TOSTPlayer::Destroyed() - start
ScriptLog: TO_Player::Destroyed() - start
ScriptLog: TO_GUIBaseMgr::Destroyed
ScriptLog: destroying scoreboard
ScriptLog: destroying scoreboard
Critical: (Transient.TOST_TeamSelect0 TOSTBase45.TOST_TeamSelect.Close)
Critical: (TO-Thunderball.TOSTPlayer0 TOSTBase45.TO_Player.Destroyed)
Critical: UObject::ProcessEvent
Critical: (TOSTPlayer TO-Thunderball.TOSTPlayer0, Function TOST45.TOSTPlayer.Destroyed)
Critical: ProcessDestroyed
Critical: ULevel::DestroyActor
Critical: (TOSTPlayer TO-Thunderball.TOSTPlayer0)
Critical: UPlayer::Destroy
Critical: UViewport::Destroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: UWindowsViewport::Destroy
Critical: UObject::ConditionalDestroy
Critical: (WindowsViewport Transient.WindowsClient0.WindowsViewport0)
Critical: WM_DESTROY
Critical: UWindowsViewport::ViewportWndProc
Critical: WWindow::StaticWndProc (Message=WM_DESTROY)
Critical: MessagePump
Critical: MainLoop
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Warning: glxStopOutput() failed: 6
Log: DirectDraw End Mode
Exit: Exiting.
Log: Log file closed, 10/07/23 10:10:00

@stijn-volckaert stijn-volckaert added bug This is a confirmed bug memory-management This is a garbage collection or general memory management issue labels Oct 12, 2023
@stijn-volckaert stijn-volckaert added this to the 469d milestone Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a confirmed bug memory-management This is a garbage collection or general memory management issue
Projects
None yet
Development

No branches or pull requests

3 participants