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

Clicking OK on the crash message does not terminate NWN #673

Open
lazworks opened this issue Oct 8, 2024 · 2 comments
Open

Clicking OK on the crash message does not terminate NWN #673

lazworks opened this issue Oct 8, 2024 · 2 comments
Labels
crash Game crashes.

Comments

@lazworks
Copy link

lazworks commented Oct 8, 2024

OS

Windows

Game version

88.8193.36-13

Describe the crash

Start any game and type ##PleaseCrash in the chat box.

Answering OK to the message about the crash closes the message, which is displayed again.

This means you need to use the Task Manager to close NWN, rather then clicking OK to close the game.

Custom content or overrides used

Customize Character Override Hak Extended Edition (CCOHEE)

@lazworks lazworks added the crash Game crashes. label Oct 8, 2024
@lazworks
Copy link
Author

lazworks commented Oct 8, 2024

I just noticed that the PleaseCrash only reproduces the issue on the latest development build (89).

To reproduce the issue on the retail release, run the following script after starting any game to cause a crash...

json jPC = ObjectToJson(GetFirstPC());
JsonObjectSetInplace(jPC, "Age", JsonInt(18)); // wrong
JsonToTemplate(jPC, "crash", RESTYPE_UTC);

@lazworks
Copy link
Author

lazworks commented Oct 9, 2024

Some additional information that may be relevant. I am using a program to launch NWN. Here is the VB.net snippet used...

	Using run As New Process
		run.StartInfo.FileName = "D:\Beamdog Library\00785\bin\win32\nwmain.exe"
		run.StartInfo.Arguments = "-userDirectory """D:\Enhanced Edition Mods""""
		run.StartInfo.UseShellExecute = True
		run.StartInfo.CreateNoWindow = True
		
		Try
			run.Start()
		Catch ex As Exception

			' Probably user cancelled operation via UAC prompt
			Return ex.HResult
		End Try

		If options.HasFlag(RunOptions.WaitForCompletion) Then
			run.WaitForExit()

			' This can help to avoid a process hanging on to file
			If Not run.HasExited Then
				run.WaitForExit(1000)
				Try
					run.Kill()
				Catch ex As Exception
					' Ignore - I think if it fails, a Kill was probably not required
				End Try
			End If

			' Need this to deal with trying to get an Exit code when the program is still running
			Try
				exitCode = run.ExitCode
			Catch ex As Exception
				' Ignore - means the process has not finished so you can't get the exit code.
				exitCode = RunExitCode.Not_Available
			End Try
		Else
			exitCode = RunExitCode.Wait_Not_Set
		End If

	End Using

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Game crashes.
Projects
None yet
Development

No branches or pull requests

1 participant