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:
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).
I have no idea how to debug this, nor how to avoid it. Any help would be appreciated.
UPDATE 1:
Main threads stopps at:
Environment.Exit(0);