LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 9.0 file open error (FileSelectPopup - hang) on Vista deployments

I am running Windows 7 64 Bit OS with Labwindows CVI 2009 Version 9.1.0.  I have two 256 gig ssd hardrives on a raid 0 configuration.  I experienced the same problem.  I lowered the stack size and "fixed" the problem.  My question to anyone that can answer: 

 

How does stack size cause a problem with the file select popup menu?

 

Thanks,

Matt l.

0 Kudos
Message 11 of 27
(1,981 Views)

I am now revisiting this phenomenom under Windows 7 / CVI 2009 sp1 and have a couple of interesting results.

 

Critical parameters

 

 Maximum Stack Size (bytes) under Build Options (less than 530000000 is OK -- more than 540000000 not OK.)

 

OS: WinXP 32 bit OK -- Vista not OK (previously tested as 32 bit program under CVI 9.0) -- Win7 as 32 bit program not OK -- Win7 as 64 bit program.

 

I will post a test program that I am using for the all issues listed below.

 

Under CVI2009 in 32 bit debug mode the test program stalls and then throws a GP fault. SPecifics :

Fatal Run Time Error. 

 test.c line 13 col 18 thread id 0x0000059C

Program has caused a GP fault at 0x7652DBEF

 

c, cws, prj, exe and distribution kit (32 bit) located at

 

http://decibel.ni.com/content/docs/DOC-13037

 

too large to attach with distribution kit, simplified version is attached here as well.

 

 

 

 

0 Kudos
Message 12 of 27
(1,943 Views)

I have a similiar problem now on a XP machine - FileSelectPopup hangs. It appears to happen only if there was a DirSelectPopup before the first FileSelectPopup. Minimal example:

 

char path[MAX_PATHNAME_LEN = "c:\\"

DirSelectPopup (path, "Choose a directory", 1, 1, path);
FileSelectPopup(path, "*.dat", "*.*", "File", VAL_LOAD_BUTTON, 0, 0, 1, 1, file);

 

CVI 9.0.1

XP (32bit)

Stacksize only 250000 Byte

0 Kudos
Message 13 of 27
(1,773 Views)

Oh boy, I thought this thread was dead!

 

Did you try adding in the following line before your popup 

 

CA_InitActiveXThreadStyleForCurrentThread (0, COINIT_APARTMENTTHREADED); 

 

If you did and it still hangs might need more information to figure out your problem.

 

-Doug

Douglas Sappet
Test Hardware Development Engineer
Allegro Microsystems Inc.
Manchester, NH
0 Kudos
Message 14 of 27
(1,767 Views)

To my knowledge this is no longer a problem on CVI 2010 or CVI 2010 SP1. There is a new restriction placed on the FileSelectPopup that regardless of how many "lookup" extensions you add as arguments, only only a single extension (the last argument) is searched against the directory. The stack size  no longer seems to be a problem though.

 

A similar problem where the none of the drives would not show up under "My Computer" on some computers also appears to have been resolved.

 

I understand that not everybody is in an environment where they can stay completely current but I thought I would post my experience.

0 Kudos
Message 15 of 27
(1,764 Views)

Excellent! glad to see they fixed this bug. I am updated to latest release so I guess I can remove that line from my code now. I think that the poster hoffman is using CVI 9.xx not sure if the bug still exists in his build. 

 

also,

I noticed you have a smaller stack size, try increasing that for kicks and see if it helps. 

 

-Doug 

Douglas Sappet
Test Hardware Development Engineer
Allegro Microsystems Inc.
Manchester, NH
0 Kudos
Message 16 of 27
(1,762 Views)

Good point. I may have jumped the gun on that one.  Let me check and make sure that this is correct.

 

We have gone to mostly 64 bit deployments and so I will need to get a student to volunteer their working computer for the test. Give ma week and I will try to squeeze it in..

0 Kudos
Message 17 of 27
(1,757 Views)

CA_InitActiveXThreadStyleForCurrentThread (0, COINIT_APARTMENTTHREADED);

 

did not fix it for me. Neither did a change of the stack size have any effect.

 

0 Kudos
Message 18 of 27
(1,748 Views)

Hm, well looks like we have to dig a little deeper, are you running in debug or release build? if you aren't running in debug try it, the stack is different and variables are spaced out in memory. Also if you could give a little more code around your popup? Maybe it is hanging for other reasons.

Douglas Sappet
Test Hardware Development Engineer
Allegro Microsystems Inc.
Manchester, NH
0 Kudos
Message 19 of 27
(1,745 Views)

Thanks for your answers.

 

Debug and Release make no difference. Also I first encountered the problem in debug mode.

 

There's not much code around. Basically it's the lines posted above inside a callback of a button in a default-generated gui-application. I attached the example project. If you comment out the DirSelectPopup, it works, otherwise the FileSelectPopup hangs.

0 Kudos
Message 20 of 27
(1,742 Views)