Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Conversation

@agocke
Copy link

@agocke agocke commented Sep 21, 2023

If the folder doesn't exist, the config variable will be 'ILSpy.xml', and the parent directory name will be an empty string. This will cause CreateDirectory to throw, and the application to potentially crash due to an exception in a background thread. This manifests as a native crash, NSInternalInconsistencyException, on my machine, with the message 'Terminating app due to uncaught exception
'NSInternalInconsistencyException',reason: 'NSWindow drag regions should only be invalidated on the Main Thread'.

By passing 'DoNotVerify' to Environment.GetFolderPath we can avoid the check for directory existence and avoid the crash.

If the folder doesn't exist, the config variable will be 'ILSpy.xml',
and the parent directory name will be an empty string. This will cause
CreateDirectory to throw, and the application to potentially crash due
to an exception in a background thread. This manifests as a native
crash, NSInternalInconsistencyException, on my machine, with the message
'Terminating app due to uncaught exception
'NSInternalInconsistencyException',reason: 'NSWindow drag regions should
only be invalidated on the Main Thread'.

By passing 'DoNotVerify' to Environment.GetFolderPath we can avoid the
check for directory existence and avoid the crash.
@agocke
Copy link
Author

agocke commented Sep 21, 2023

VSCode removed all trailing whitespace here as well -- you can ignore that if you want.

@agocke
Copy link
Author

agocke commented Sep 21, 2023

Fixes #117

@agocke
Copy link
Author

agocke commented Sep 28, 2023

fyi @christophwille

@christophwille
Copy link
Member

To be honest, I have a hard time connecting the crash with that fix, and I have no way to verify it either. So I will punt on merging this until this repository has a maintainer again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants