How to kill TimerThread

I’d like to use root clases TTree and TFile in LabView 8.2.

#include "TFile.h"
extern "C" _declspec(dllexport) Int_t OpenTofTree();
Int_t OpenTofTree()
  TFile *f = TFile::Open("c:/test.root","RECREATE"); 
  return 0;

When I load the .dll into LV, everything works fine until the dll is unloaded. While unloading the LV crashes with un unhandled exception.
I’ve debugged this and found a bug in the TWinNTSystem class. The libcore.dll that is also loaded runs TimerThread thread (and also GUIThreadMessageProcessingLoop) when initializing the gSystem class during library loading. When dll is unloaded, the thread is NOT stopped and Lv crashes (however GUIThreadMessageProcessingLoop is stopped correctly).
Is it possible to fix the the destructor of gSystem class so it stops(kills) the TimerThread?


Hi Petr,

This has been fixed in svn trunk. Thanks for reporting this, and sorry for the trouble… :blush: