سؤال

I am using a FluorineFx 1.0.0.17 in my project and working with NetConnection to connect to a RTMP host (Flash Media Server). I am creating a RTMP monitoring probe for PRTG.

There is always an error at the end of the main application process on the line 173 of WorkItemsQueue.cs file (second code line shown here)

// Prepare array of wait handle for the WaitHandle.WaitAny()
WaitHandle [] waitHandles = new WaitHandle [] { WaitEntry.WaitHandle, cancelEvent };

// Wait for available resource, cancel event, or timeout.
int index = WaitHandle.WaitAny(waitHandles, millisecondsTimeout, true);

This is what debugger shows me:

enter image description here

Call stack:

[In a sleep, wait, or join] 
[External Code] 
FluorineFx.dll!FluorineFx.Threading.WorkItemsQueue.DequeueWorkItem(int millisecondsTimeout, System.Threading.WaitHandle cancelEvent) Line 173 + 0xd bytes   C#
FluorineFx.dll!FluorineFx.Threading.ThreadPoolEx.Dequeue() Line 329 + 0x2c bytes    C#
FluorineFx.dll!FluorineFx.Threading.ThreadPoolEx.ProcessQueuedItems() Line 378 + 0x8 bytes  C#
[External Code] 
kernel32.dll!749c3677()     
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]  
ntdll.dll!770e9f42()    
ntdll.dll!770e9f15()    

By at the end of the process I mean whole program works as it should, but when at the end of Main method debugger throws this unmanaged-code error (shows only if Enable unmanaged code debugging is enabled).

enter image description here

I have no idea how to debug this, nor how to avoid it. Any help would be appreciated.

UPDATE 1:

enter image description here

Main threads stopps at:

 Environment.Exit(0);
هل كانت مفيدة؟

المحلول

Visual studio could be lying to you in case of Multi-Threaded debugging. It is not possible for the waitHandles to be null.

You seem to have a corrupted heap.

Detail

You get access violation when process attempted to access a memory location not within its memory space. This happens with buffer overruns, ... you name it. If you use an unmanaged code, this could easily do it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top