Note that there are some explanatory texts on larger screens.

plurals
  1. POApplication freezes outside of Visual Studio. While starting it from Visual Studio it works
    primarykey
    data
    text
    <p>slowly I'm overworked...</p> <p>I have a huge application with threading, timers, invoke (not BeginInvoke, so it is synchronous) and Application.DoEvents.</p> <p>It is too much to post here and I don't know where the problem really is.</p> <p>Every Method of mine is inside a try catch. Every catch is logged.</p> <p>If I start my application from Visual Studio (F5) or while profiling it via Ants there is no Problem. The Application runs since some days. But as soon as I start the same debug version via windows explorer it freezes every few hours. It freezes without any exception or so. If I attach visual studio to this application and break it, it stops on Application.Run(new Form1());</p> <p>I'm really confused and have no idea to repair it.</p> <p>It is a .net 3.5 winforms application</p> <p>It looks like one thread hangs here:</p> <pre><code>if (grabber.InvokeRequired) { Console.WriteLine("grabber.InvokeRequired"); this.Invoke((MethodInvoker) delegate { grabber.Navigate("http://www.google.de"); }); // &lt;-- hang } else { grabber.Navigate(ig.StartUrl); } </code></pre> <p>this snippet is part of an timer event</p> <pre><code>_timeout = new System.Timers.Timer(10000); _timeout.Elapsed += new ElapsedEventHandler(OnWatchDogBark); </code></pre> <p><strong><em>Edit</em></strong></p> <p>A sample for DoEvents(). This is in a lock() and in an invoke</p> <pre><code>grabber.DocumentCompleted -= grabber_DocumentCompleted; grabber.Navigate("http://www.google.de"); while (grabber.ReadyState != WebBrowserReadyState.Complete) { timeout--; Application.DoEvents(); Thread.Sleep(200); if (timeout &lt; 0) { timeout = 50; grabber.Navigate("http://www.google.de"); } } </code></pre> <p>Currently I use the System.Windows.Forms.Timer and some locks but there is no improvement.</p> <p>Okay I used WinDbg to get some informations</p> <h1>Edit: 14.06.2012</h1> <p><strong>!threads</strong></p> <pre><code> PreEmptive GC Alloc Lock ID OSID ThreadOBJ State GC Context Domain Count APT Exception 0 1 37ec 007cab18 6020 Enabled 00000000:00000000 007c8510 0 STA System.ArgumentException (02762ba8) 2 2 85b8 007d7c38 b220 Enabled 00000000:00000000 007c8510 0 MTA (Finalizer) XXXX 3 0 06e9f548 9820 Enabled 00000000:00000000 007c8510 0 Ukn 21 5 3464 0d6dc598 200b020 Enabled 28cb5820:28cb5fe8 007c8510 0 MTA 22 6 62b0 0d6db9e0 200b220 Enabled 00000000:00000000 007c8510 0 MTA 23 7 8e58 0d6db5f8 80a220 Enabled 00000000:00000000 007c8510 0 MTA (Threadpool Completion Port) XXXX 4 0 06f62d40 1801820 Enabled 00000000:00000000 007c8510 0 Ukn (Threadpool Worker) XXXX f 0 132a3290 1801820 Enabled 00000000:00000000 007c8510 0 Ukn (Threadpool Worker) XXXX 10 0 132a3678 1801820 Enabled 00000000:00000000 007c8510 0 Ukn (Threadpool Worker) XXXX e 0 132a26d8 1801820 Enabled 00000000:00000000 007c8510 0 Ukn (Threadpool Worker) XXXX 9 0 0d6db210 1801820 Enabled 00000000:00000000 007c8510 0 Ukn (Threadpool Worker) </code></pre> <p><strong>!dlk</strong></p> <pre><code>Examining SyncBlocks... Scanning for ReaderWriterLock instances... Scanning for holders of ReaderWriterLock locks... Scanning for ReaderWriterLockSlim instances... Scanning for holders of ReaderWriterLockSlim locks... Examining CriticalSections... Could not find symbol ntdll!RtlCriticalSectionList. No deadlocks detected. </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload