LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

fatal run time error: unknown source position

I am getting a fatal run-time error when using CVI 8.0.1.  I get the error when any program I write is exiting.  Here's an example source:

#include <ansi_c.h>

int main(void)
{  
    char buf[512];

    printf("press enter to exit\n");
    gets(buf);
    return 0;
}

after I press enter to exit, the program hangs for a few seconds and then I get the error.  This only started happening after I upgraded to CVI 8.0.1.  I have tried uninstalling / reinstalling / going back to earlier versions and I always have the problem now.
0 Kudos
Message 1 of 42
(10,122 Views)
It sounds like something went wrong with the initial install or possibly there was problems with removing previous versions. Since uninstalling and reinstalling did not fix this, I would suggest you to use a utility called MSI Blast. This will show all installations that are on your machine and allow you to remove these installations. This is a last resort program and should never be used to replace Add/Remove Programs, but since something sounds as if it is corrupt, I feel it is best to use this. Here is the link.

ftp://ftp.ni.com/outgoing/msiblast.zip

You will need to remove and reinstall all NI components to assure that we remove the corrupt file. It is definitely something local to your machine as I was not able to replicate the problem with your provided code. Please run this utility and let me know once you have pick this up off of the ftp, as we do not leave this utility up for long.

Message Edited by Brandon V on 10-10-2006 02:22 PM


Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 2 of 42
(10,079 Views)

thanks, I have the file now...however, I won't be able to try it till tomorrow.

 

 

0 Kudos
Message 3 of 42
(10,072 Views)
I have the same problem. It also happened with version 7.0.
Tried uninstalling everything and reinstall, but no change.
Msiblast found nothing to uninstall.

"FATAL RUN-TIME ERROR: Unknown source position, thread id 0x00000F5C: The program has caused a 'General Protection' fault at 001B:10003D70"

Message Edited by Hårek on 11-25-2006 07:23 AM

0 Kudos
Message 4 of 42
(9,978 Views)
Update: When I use a 'print' statement (which opens a console window) the problem goes away. Then my application exits as normal.
0 Kudos
Message 5 of 42
(9,964 Views)
Howdy Harek,

Do you see this behavior on multiple machines or just one? Is this code reproducible with LabWindows/CVI 8.0.1? Can you run any shipping examples? If you copy your code to a new source file, can you compile and run that fine? Have you started placing breakpoints in your code to see where its yelling at you? Is the code as simply as the previous user posted?

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 6 of 42
(9,936 Views)
This happens only on my home PC, not at work. So it is not that critical.
It's a long time since I first saw this happen, and last week when I wanted to do a small program at home it happened again.
Tried to remove all NI installed programs, and installed 8.01. No change.

If I put a breakpoint on the final "return 0;" the problem does not appear.

The code in the first post triggers the problem.

I assume it is a conflict of some sort with my Windows XP SP2, which has acumulated lots of 'debris' since installed in April 04.
0 Kudos
Message 7 of 42
(9,928 Views)
Hi Harek,
 
What happens if you run any of our shipping example? What about copying the contents of the source file to another source file? Do you experience the behavior in Release or Debug modes? When you used MSIBlast, did you also delete all the National Instruments registry keys? Sometimes the registry might get corrupt and needs to be fixed.
 
Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 8 of 42
(9,911 Views)
The message I mentioned earlier is in Debug mode. I then have to press the IDE Stop button to exit.
In Release mode I get this famous ambiguous message:
The instruction at "0x100003d70" referenced memory at "0x00000000". The memory could not be "read".

MSIblast does not list any registry values? Anyway, before I installed 8.01 the list was empty.

Just found one example, TrayIcon, which works OK. Most samples I have tried also fail on exit.
0 Kudos
Message 9 of 42
(9,901 Views)
Hi Harek,
 
It is possible that your registry got corrupted so what I would suggest is
 
1) Uninstall all NI Software
2) Open up your registry (Start >> Run and type "regedit")
3) Export your current registry settings by selecting File >> Export and selecting ALL for the Export range.
4) Then remove the following registry components from the Windows Registry:
       
        HKEY_CURRENT_USER\Software\National Instruments Delete the entire tree!
        HKEY_LOCAL_MACHINE\Software\National Instruments Delete the entire tree!
5)Reinstall NI Software
 
Let me know what happens!

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 10 of 42
(9,878 Views)