LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI app terminates under Win XP when file select popup is open, but everything works fine on Win 98

If anyone knows of a way to fix this it would be great.  I have an app which runs fine on 98.  But when I run it on Win XP, after opening some file select popups, the entire app just vanishes, no error message or anything it just disappears, or sometimes Wondows will come back with an error message saying windows terminated the program and do I want to send an error report (lists exception code of 0xC0000005). 

As file select popups are a common thing that many people use, I'm sure there must be others that have run into this issue.  I don't really want to make any drastic changes to the code to get around this, since the code works fine on Win 98.  I am not creating a new thread from which to make the popup calls, and maybe that's what I need to do but then why is everything OK on 98... I'm hoping there is just some simple call I need to make so the popups will work reliably on win XP.

I am running Labwindows 7.1.  Though the app I compile for Win 98 is built from Labwindows 5.1.  The win98 version runs on XP however but also has the same issue.  i.e. problem appears specific to win xp rather than the labwondows version.

Thanks,
David
0 Kudos
Message 1 of 31
(5,819 Views)
Hello David,
 
So to clarify, if you compile in CVI 7.1 on a Windows XP machine, do you still see the error?
Now if run your CVI 5 application on a Windows XP machine that does not have the CVI 7.1 runtime engine on it (CVI 7.1 is not installed), do you still see the same behavior? 
Also, in your code, what else is occurring before your call to FileSelectPopup?  I've seen comments mentioning that the c0000005 first chance exception relates to an access violation.  Having said that, what are you passing in to the FileSelectPopup function call?  Is the default directory valid on your Windows XP machine, etc?
 
Thanks
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 31
(5,788 Views)
Quoting:

    So to clarify, if you compile in CVI 7.1 on a Windows XP machine, do you still see the error?

YES.

    Now if run your CVI 5 application on a Windows XP machine that does not have the CVI 7.1 runtime engine on it (CVI 7.1 is not installed), do you still see the same behavior?

I don't have another XP machine to try it on here.  Most other PCs here are Win2000.

    Also, in your code, what else is occurring before your call to FileSelectPopup?

Nothing really, because I use the file select popups before starting much anything else in the app.  So all that happens prior is the basic loadpanel, runuserinterface calls.

      I've seen comments mentioning that the c0000005 first chance exception relates to an access violation.  Having said that, what are you passing in to the FileSelectPopup function call?  Is the default directory valid on your Windows XP machine, etc?


Just basic arguments, nothing unusual:
    fileStatus = FileSelectPopup("", "*.txt", "", "Select Script file to open",
                             VAL_LOAD_BUTTON, 0, 0, 1, 1, fname);
OR
    fileStatus = FileSelectPopup("C:\\", "*.txt", "", "Select Capture File",
                                 VAL_OK_BUTTON, 0, 0, 1, 1, fname);


In any case I don't think it has to do with my code, because it doesn't happen consistently, or even when you are doing anything.  You can just open the popup and then not do anything, not click on buttons or use the mouse at all, and sometimes the window will stay there and work fine, or more often, after a few Seconds the whole app vanishes.

Thanks,
David


 

0 Kudos
Message 3 of 31
(5,785 Views)
I have a little more info on the cause of the crash.  When I run the app in debugmode and have it break on exceptions, I get the following message:

Fatal Runtime Error
Unknown Source Position, thread id 0x00000324
A non-debuggable thread caused a 'General Protection' fault at address 7CA514AE

p.s. FYI I also made sure all my buffers are big enough per the notes in the function panel help.

-David
0 Kudos
Message 4 of 31
(5,781 Views)
Hello David,
 
So first I would suggest repairing your installation of CVI by going to Add/Remove programs, then select "National Instruments" look for CVI and launch the repair option. This should go through and check that all the files CVI needs is correctly installed.   Next, I would suggest updating your version of the runtime engine to the latest version on the web.  The CVI runtime engine is backwards compatible so you will still be able to develop in your current environment. The most recent runtime engine can be found here.
 
Let me know what happens.  Thanks
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 5 of 31
(5,779 Views)
Wendy,

That seemed to help a little, but not to fix it entirely.  Before, I could open the file select popup only a couple of times before it would bomb out.  After doing the things you suggested, it seems a little more stable, and now I can open file select popups 6 or 8 or 10 times before it dies.  Same error message as before, though the thread id and address seem to always be a little bit different.  ( FATAL RUN-TIME ERROR:   Unknown source position, thread id 0x00000710:   A non-debuggable thread caused a 'General Protection' fault at address 7CA514AE.)

Thanks,
David
0 Kudos
Message 6 of 31
(5,748 Views)
Hello David,
 
I am unable to reproduce the error on multiple Windows XP test machines, so this leads me to believe that there is an error with your installation of CVI or your machine.  First I would try uninstalling CVI from Control Panel >> Add/Remove and reinstalling.  Also, reinstall the patch you downloaded from the previous link I suggested.  After doing this, what behavior do you see?
 
Thanks
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 7 of 31
(5,708 Views)
Wendy,

I uninstalled everything from the PC having anything to do with NI.  Not a single NI app or directory remains on the PC.  So, if I then run my app which I built before, now the Labwindows install should have no bearing on this, because it is justmy app running, no NI compiler is installed on the PC.  Well, it still crashes just like before.  So it would seem the compiler install doesn't have anything to do with the issue.  Also I don't think it is a problem with the PC because many other programs on the PC use file select windows and they always work just fine.

Maybe if you could send me your email address I can email the app to you and you can try it for yourself there?  We don't seem to have made much progress on this so far.  I am thinking you guys have some build setting or memory size setting or something that needs to be adjusted but this is going to take the next month to resolve at our current pace.  I would really appreciate if you could try the app yourself.  So far it looks like LabWindows V7.1 was just a waste of money and maybe we should just go back to version 5 which seems more reliable.

Thanks,
David


0 Kudos
Message 8 of 31
(5,677 Views)
By the way, I just verified that when I compile my app on LabWindows 5.5 on my 98 PC, the app runs perfectly on my XP machine.  But, my app compiled from LabWindows 7.1 does not.  Note again that there is no NI compiler installed on my XP machine now so this is not related to a "bad install" or anything.

So I guess that says alot for LabWindows V5.5, since a 1999 compiler generates great code that runs perfectly on XP.  It certainly does not say much for LabWindows V7.1 however.

If you would like, I can email you both versions of the app which were compiled on 5.5 and 7.1 and hopefully you guys can figure out what the problem is.  If not I think we should be entitled to a refund on Version 7.1 of the compiler, just as a matter of principle.

It's funny because we upgraded from 5.5 to 7.1 for the sole purpose of ensuring the best Win XP compatibility, but apparently we ended up with just the opposite.

Thanks,
David
0 Kudos
Message 9 of 31
(5,671 Views)

David,

You have a very frustrating situation.  A couple of notes that I hope are of some use to you.  I have run cvi7.0 and 7.1 extensively on win xp sp2 machines and never observed the issue you have seen.  This does include a significant number of calls to the file dialog popups.  My experience with the stability of cvi7.1 on xp systems has been very good.

Even though you have removed the CVI compiler, you still have the CVI runtime library on the system.  If you did not the application would not run.  The problem still points to the version of runtime library you have as the most likely cause.  Any chance you have more than one version for the cvirte.dll on the xp system?  The current version is 2172KB.

It is possible you have a conflict with a setting within XP.  For example the old "findfast" microsoft utility was notorious for causing issues with applications.  The settings of XP can cause issues.  If you have access to a default XP sp2 configuration (out of the box, not patched beyond sp2), you may want to try running on that with a fresh copy of the latest cvi 7.1 runtime library.

 

Good luck

Message Edited by mvr on 11-16-2005 07:55 AM

0 Kudos
Message 10 of 31
(5,663 Views)