0

I am having issues with a small application that I have written where it is randomly crashing out without any major error. I only get the 'Do you want to send this information....' error pop up, but I don't get any error detail. I have checked the event viewer and have found the following entry everytime my application crashes:

EventType clr20r3, P1 dm_update.exe, P2 1.0.0.0, P3 525748d0, P4 system.drawing, P5 2.0.0.0, P6 506bef25, P7 15e, P8 17, P9 system.invalidoperationexception, P10 NIL.

I have added logging to all of my try,catch statements, but for some reason, my application doesn't seem to push anything into these catch areas.

The only error I've successfully managed to catch in my logs is:

The object is currently in use elsewhere

But I have no idea what this is referring to. When I run this application in debug mode on my development PC, I can't get the application to fall over, but when it runs standalone on a client PC, I keep getting this random crash.

Is there anyway I can implement a better method of catching this error? Any advice appreciated.

Riples
  • 1,167
  • 2
  • 21
  • 54
  • Just after posting this thread, I managed to catch (what I think is the cause) to the issue on my development PC under debug mode. It looks like I'm trying to modify an image control whilst running under a different thread and getting a cross-thread error. My question is: what is the best way of modifying an image control with different pictures whilst running on different threads? I basically put my code inside the backgroundworker_progresschanged event, but it doesn't seem to like it. Thanks – Riples Oct 11 '13 at 07:03
  • This is a whole other question now and should be in another post. Look into "Invoking" a method on your UI thread. – Steve Oct 11 '13 at 14:50
  • Use a delegate to invoke on the UI thread. See [this answer](https://stackoverflow.com/questions/10170448/how-to-invoke-a-ui-method-from-another-thread) – Nooby-Noob Aug 26 '20 at 07:20

0 Answers0