R
R
Rasse2020-12-09 21:45:42
C++ / C#
Rasse, 2020-12-09 21:45:42

C# wf how not to close or restart an issue on critical error?

So - the application works with a tesseract, it works for itself and works - the essence is taking a photo, cutting it into pieces - processing it with a tesseract after the cropped image is destroyed.
But from time to time - the situation -AccessViolationException happens when trying to get a screen and the application crashes.
I already put everything in a try-catch, it didn't help.
How to restart the application in case of a critical error or just restart the thread? because the error occurs in 1 thread - breaks the work of all. I would like to fix this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2020-12-10
@vabka

It's impossible to say exactly what the problem is. You need to look at the code, debug, test.
Somewhere, something terrible is most likely happening, such as accessing null in native.
And another error may well occur in the hardware - for example, when the RAM is unstable.
It is impossible to intercept and somehow process this error.
There is also a good report about these "special" exceptions https://youtu.be/WLSrYgMWif4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question