08-10-2010 03:34 PM
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.
08-18-2010 12:58 PM
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.
10-13-2011 06:00 AM
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
10-13-2011 07:57 AM
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
10-13-2011 08:39 AM
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.
10-13-2011 08:42 AM
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
10-13-2011 08:51 AM
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..
10-13-2011 12:10 PM
CA_InitActiveXThreadStyleForCurrentThread (0, COINIT_APARTMENTTHREADED);
did not fix it for me. Neither did a change of the stack size have any effect.
10-13-2011 12:44 PM
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.
10-13-2011 01:13 PM
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.