LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

FATAL RUN-TIME ERROR: Unknown source position, thread id 0x00000EB4: The program has caused a 'General Protection' fault at 0x00459B9D.

Solved!
Go to solution

I'm using cvi 2009 and OS is windows 7. The program can start and operate normally. But when I quit the program, a fatal run-time error occurred. 

The error code is "FATAL RUN-TIME ERROR:   Unknown source position, thread id 0x00000EB4:   The program has caused a 'General Protection' fault at 0x00459B9D."

error

 

Please help me.

 

0 Kudos
Message 1 of 5
(11,630 Views)

Is it possible for you to post an example of the code section you believe to be the cause of this behavior.  Can you say anything about the general architecture of the application?  i.e. is it single or multi-threaded, is it using only the cvi run time engine for functionality, or have you included outside libraries, is it a console app, or one that has a user interface.  Any descriptions about the nature of what you are doing will help someone to reply, and perhap help.

 

Regards,

Ryk

0 Kudos
Message 2 of 5
(11,620 Views)

Thanks for your help!

It is a single-thread,run-time program that is developed by two persons. Before combining two parts, they runs without any errors.

 Excel,password, Microsoft data time picker and some other activeX controls (fp) are used. It also has a user interface including several panels, tool bar and a menu. 

Does 'Unknown source position' mean some panel or pointers are not released when quit the program?  I doubt some functions of menu are missed. However, I checked some times and didn't find such mistakes.

 

 

 

 

 

0 Kudos
Message 3 of 5
(11,613 Views)
Solution
Accepted by zm123

Hello,

 

Without looking at your source code, I can only offer one idea:  Maybe there is some mis-handled memory.  If you haven't done so already, use Resource Tracking to see if some clue will appear during run-time.  If you are not familiar with this feature, I have included the steps below to help you.

 

Set your Debugging level to Extended (Options->Build Options menu).  Select Resource Tracking (Window->Resource Tracking menu).  Before running your project, place a breakpoint somewhere early in your program flow, preferable in the main function before RunUserInterface();  When execution stops at the break point, hit the F5 key to resume normal execution flow.  This will simply result in your ability to see all of the resources being allocated during the execution.  If when you exit the program, not all resources are de-allocated, then you have a problem.  Looking at the resulting log and click on any remaining resources to go to that area of the code.

 

Again, without seeing your project source code, this is all I can do.  Hope it helps

 

Regards,

Ryk

0 Kudos
Message 4 of 5
(11,602 Views)

I experienced a similar bug when using threads with active-x controls on LabWindows 2010 (Windows 7, 64-bit operating system)

 

I noticed that the error did not occur when running in Release mode.

 

There was a known issue related to linking to mixed-mode DLLS that generates the crash you describe.  NI states that it's been fixed in 2010.  This didn't solve the problem for me in LabWindows 2010.  You can still see article here: http://digital.ni.com/public.nsf/allkb/14B6D031F7AC4B53862577AE0060F844

 

I believe that the error occurs with the MSVCR80.dll that is used with displaying Active-X controls on the panels.  Each time I was able to link the crash to this file.  See if the crash links back to the same file by following the instructions here: https://decibel.ni.com/content/docs/DOC-2423

 

Let me know if you fix this issue.

Message 5 of 5
(11,597 Views)