WinForms Application that disappears

Hi,

I'm developping a MDI application, after few hours of running it disappears with no exception thrown nor any kind of message. Any idea




Answer this question

WinForms Application that disappears

  • FoxProg9

    Glenn, I don't know what you mean when you say I'm cleaning up resources. The applications serves to view trade information, the user open severals mdi windows child and, usually, keeps several hours only viewin the real time information, no action is usually taken.

  • zivco

    Do you get a Watson crash where it asks if you want to send information to Microsoft
  • Talsiter

    I've been plagued by this behaviour too. My app is huge (for a User Interface app). Sometimes the UserInterface just vanishes without a clue, and the UserInterface process continues running (as shown from Task Manager, and further supported by background worker threads in the UI logging normal events). Other times it presents the mysterious dialog:

    Setup Error

    Failed to load resources from resource file

    Please check your setup

    When OK is pressed for the above dialog, the UI vanishes.

    Other posts have eluded to this being a .Net runtime mis-handled error condition, hiding a real error like stack overflow or a networking error.

    Aside from EventViewer, are there any logs generated by the .Net runtime that might contain clues

    -Roy


  • braillemaker

    Can it be a call to Application.Exit() somewhere

    What kind of operations does it do



  • 71EFBB98-D1FE-4eff-BAC5-F94AC74

    I would make sure that you ae cleaning up resources it is finished with during the running of the application. This way you could reduce the load on the app and surrounding resources.



  • gabriel_333

    No, it cannot be an Application.Exit() call

    each MDIChild form in application consumes an activeX control. This control can fire several events per second (about 200), at the event handler method of these a Form.BeginInvoke call is needed (InvokeRequired is true). I don't know what happens when th thread pool queue is full, coub be that the reason

    thanks.



  • BillWestphal

    No logs at EventViewer related, the last log I found was 3 hours before the application disappears.

    The process doesn't continue running at brackground (Is no presesnt at Task Manager).

    thanks



  • kbabaria

    Thanks Roy, I agree with you, this can be one possible reason, but by the moment, looking at TaskManager we have not noticed that we are running out of memory, we will monitorize it

  • jeremy.jarrell

    Nothing in the event viewer,

    it's possible to have about 10 child windows with aobout 200 events per second per window.



  • ScottyD

    I don' get a Watson crash, the applcation simply disappears.

  • JoelAirsoft

    Nothing in the event viewer either

    It fires alot of events. How many open child windows would you have Is that 200 events per child window It doesn't leave many ms for processing over, though if the processing is fast it should be able to handle it on a reasonable machine.



  • PK_SSIS

    Have you noticed the memory profile of your system when the UI vanishes

    In my scenario over this past weekend we noticed that we were running out of virtual memory (or close to it) when the UI vanishes. It was particularly obvious on one system where virtual memory was disabled, and we were running the system with 2GB of RAM. We started our apps with the TaskManager running, watching the Performance tab show all physical memory being consumed.

    We have a C++ real-time priority process and 3 C# WinForms applications. For performance reasons we experimented with the 3 C# apps running in the same AppDomain. One of these C# apps is our UserInterface app. When we ran all three from the same app domain with virtual memory disabled, we saw the UserInterface vanish with no warning. When we separated each app into it's own process then the UserInterface would still vanish, but would usually throw up the error dialog I described earlier in this thread ("Failed to load resources" "Please check your setup").

    I suspect the .Net runtime was really trying to say "Help! I'm out of system memory!" but was unable cough up that message.

    This is just my opinion; your scenario sounds similar enough to mine that I though I'd share my thoughts and experiences.

    -Roy


  • WinForms Application that disappears