-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[5.0.101] Published single file binary crashes on startup with 0x80070002 in EnableVisualStyles() #4397
Comments
I'm having problems reproducing this. Can you provide a call stack for the exception? |
It does not give a stacktrace. Download the zip from appveyor and click the exe. I had multiple people report this issue, and I get it myself too. Using Windows 10.0.19042 Build 19042 |
Okay, now I am able to reproduce this issue. I agree, it appears to be somewhat intermittent. Application: VRF.exe |
So my assumption about #4177 appears to be correct? How did you get the stacktrace by the way? |
@xPaw Your assumption could be correct. I think someone on the team will confirm. I got the stacktrace from the Event Viewer -> Application logs. |
Looks like there might be a race condition in the .NET runtime. Looking... For startup crashes like this I often use WinDbg to launch existing exes. You can do it with VS as well by temporarily setting the startup for the project in the properties to be the published exe. |
@vitek-karas / @agocke any idea why this would happen intermittently in single file? Module module = typeof(Application).Module;
IntPtr moduleHandle = Kernel32.GetModuleHandleW(module.Name);
@xPaw Setting the |
Appears to have helped, although it is slower because it has to extract into temp (afaik). |
@xPaw Another workaround you can do is remove the call to Fyi: We'll definitely root cause the problem and fix it, but I suspect it is unlikely that we'll get approval to service it for 5.0 as there are workarounds. |
Well 5.0.0 release worked, but failed to apply styles, 5.0.1 crashes. Does that not warrant a fix for 5.0 release? |
I double checked it myself and it does work for me- presuming your edit applies to both statements and you can get the manifest to work and not use
The bar is pretty high, they might take it, but I wouldn't be surprised if they don't as there are multiple workarounds. Even one workaround would make it hard to get through. |
|
This is basically a duplicate of dotnet/runtime#40103. I honestly don't see how this ever worked after #4149 in single-file since the fact that |
I verified, this issue has been fixed in 5.0.4. P.S. If your app is dependent on |
5.0.101
No
Problem description:
Publishing a single file binary produces a binary that just crashes on startup when launched from explorer. Launching cmd and then starting the exe from there, actually runs.
Not publishing for single file also works correctly.
This worked on 5.0.0 release.
Expected behavior:
App works
Minimal repro:
cd GUI && dotnet publish
We have builds on appveyor as well (GUI.zip) that are broken: https://ci.appveyor.com/project/xPaw/valveresourceformat/builds/36727211/artifacts
I created this issue in winforms because I suspect #4177 could be the culprit. If not, could this be moved to runtime repo please.
The text was updated successfully, but these errors were encountered: