Application exiting with an exit code of -1073740771
Asked Answered
C

0

7

I have a WPF application, which sometimes is exiting with an exit code of -1073740771. The issue is not occurring in any pattern and it's varying from system to system. In some system the issue is occurring for less that 10% of the total cases and in other system I am seeing it occurring at a rate of almost 30% of the total cases. I haven't been able to form any solid repro steps and it seems to be happening at random.

The symptoms include that after I have clicked the close button, the application exits but in task manager I could still see the process lingering for about 20-30 seconds, and then it exits. The application seems to be shutting gracefully (from a functional point of view) so it might not have much effect on customers using it, but the error code is getting logged in the logs which is pretty annoying.

This issue is also happening when I am debugging from Visual Studio, but no exception is getting caught in the try - catch block.

Caracaraballo answered 13/3, 2015 at 12:7 Comment(11)
Convert large decimal values to hex to find Google hits. STATUS_FATAL_USER_CALLBACK_EXCEPTION is quite nasty, it is entirely unclear what you did to disable the exception backstop in the WPF dispatcher loop. You'll need to get a repro so you can debug it with unmanaged debugging enabled, tick the Thrown checkbox for Win32 exceptions in the Debug + Exceptions dialog. Post the stack trace you get. If this only happens while debugging then it is pretty normal, same problem as this one.Stealing
Thanks for the pointer. The issue reproduced and I was able to take a process dump. Its a crash dump and on analysis with debug diag, I found that an exception 0xc0020001 has ocured on thread 0, and the finalizer thread seems to be blocked. Any pointers on what might be the issue?Caracaraballo
Well, that's very nasty too, the CLR is asked to execute managed code after it has already terminated. That usually happens in a process that has C++/CLI code, PresentationCore has some. Nice job showing that stack trace btw.Stealing
Its a pretty big project and we are using Native methods. Is it an issue where native methods are not being deferenced after application has exited? Can there be any other reason for this issue other than improper dereferencing of native methods, because in my initial analysis I found that all the WndProcs are getting removed when the application closes.Caracaraballo
Pratik, have you found any solution for that problem? (I realize that the post is old).Fictional
I am facing the same error code 1073740771 for a Java application. It occurs randomly while running my application and my entire application crashes. Is there any pointers how to resolve that?Apraxia
We get this exit code too randomly from our c++/cli windows forms app. It's very annoying and does affect customers. It coincides with exceptions that occur in the shutdown process after all of our code has completed. I've been searching on this for years and haven't found a solution yet.Horodko
@Jeevan: I face the same problem with my Java application. Were you able to resolve it? Thanks in advance.Claudell
@Daniel: Windows 10 version 1809 has solved it. Check your windows version. Type winver in your search to find it out.Apraxia
@Jeevan: Incorrect. Can still reproduce. I fixed it by adding a DisposeListener to my shells that place the focus to a non-textfield-control just before dispose. Oh, I am using Java with SWT, not WPF, but the bug is still there. Maybe WPF worked around it also.Claudell
guys, I'm running into the same issue. It always happens while exiting my application. What makes it hard to debug is, that it only happens in about 1% of all exiting processes.Utopia

© 2022 - 2024 — McMap. All rights reserved.