Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM2.3.0 crashes with BrowseForFolder flag 4 and ...
QM2.3.0 becomes unstable and it finally crashes with BrowseForFolder flag 4, if in parallel PSHotFolders 2.2 ( is runing.
Works well here.

QM 2.3.0.
Win XP SP2.
PS Hot Folders 2.2, default configuration.
Test macro:
Copy      Help
if(!BrowseForFolder(_s "" 4)) ret
out _s
Gintaras, many thanks. I have tested in 4 different PCs with obviously different configurations, indeed unsucessfully. I will try to further investigate it. Regards. SImos.
After further investigation I came to the following two findings :
a) After a new installation it works OK for 2-5 times. Then it crashes.
b) When it crashes, depending on the type of crash - for example you may loose at all QM - you get the run-time error of exception on statement : ITEMIDLIST* pidl=SHBrowseForFolderW(&b).

One more remark : If BrowseForFolder (with flag 4 set) is initiated by a non-QM application, for example Quizo QTTabBar, it behaves perfectly.

Any advice much appreciated.
I cannot debug normally because works well on my computers. Try to use this:

Function BrowseForFolder2
Copy      Help
function# str&s [$initdir] [flags] [$text] ;;flags: 1 include files, 2 include non-file objects (Control Panel, etc), 4 new style

;Displays "Browse For Folder" dialog and stores full path of selected folder into s.
;Returns a nonzero value on OK, 0 on Cancel.

;flags may also include one or more of BIF_x flags (declared in WINAPI), lshifted by 8 bits. For example, to browse for computer, use 2|(0x1000<<8). For more info, search for SHBrowseForFolder in the MSDN Library.

;str s
;if(BrowseForFolder2(s "$windows$")) out s

if(flags&1) b.ulFlags|BIF_BROWSEINCLUDEFILES
if(flags&2=0) b.ulFlags|BIF_RETURNONLYFSDIRS
if(flags&4) b.ulFlags|BIF_USENEWUI
,;STRINT p.i=flags; p.s.searchpath(initdir)
,;b.lpfn=&BFF_Callback; b.lParam=&p
,if(len(initdir)) b.pidlRoot=PidlFromStr(initdir)

ITEMIDLIST* pidl=SHBrowseForFolderW(&b)

if(pidl) PidlToStr(pidl &s flags&2=0); CoTaskMemFree pidl; else s.all
if(b.pidlRoot) CoTaskMemFree b.pidlRoot
ret s.len

Here i removed the callback function.
I am sorry, the situation is still the same. Let me mention that it is only with PS Hot Folders that the problem exists. I have also noticed that the PSHotF icon on the BrowseForFolder window blinks while in the process to finding the folder requested. The folder is actually located, but after that QM crashes. The situation is stable if you use PSHotF through Quizo QTTab tools.

Anyway, many thanks.
The icons sometimes blink here too. Even if using this simplest possible code:

Copy      Help

I think the problem is in PSHF. The icons also blink in other programs, while QM is not running. Tested with Windows Explorer -> Map Network Drive.
I tested it. It crashes even with this simplest code. Thus, the problem is generated while running SHBrowseForFolderW. Tested with one local disk drive. Regards.
I have tested it thoroughly on a new brand PC Windows XP SP3 without any other applications but QM ( and PS Hot Folders (2.2) – default configuration with default folders. It worked for 8 consecutive times. Then it crashed on

if(pidl) PidlToStr(pidl &s flags&2=0)

I hope this information could help.

Congrats for the new release

Surprisingly, after one day tests I conclude that this bugs no longer exists. I hope that this is something permanent. Any way I will report any further experience on it.
I am sorry I have to bring-up the same issue. After version was released I tested it primarily in 2 personal computers, out of a total of five, in which it did not work with previous releases and it worked. Unfortunately this was not the case of the remaining 3 computers in which it did not work. Let me mention that I do mean that these 5 computers are actually my personal computers, they use the same software, even the same releases.

I have checked in MSDN ( and I found the following rather relevant information, which - I am afraid - I am not in a position to further implement :

If COM is initialized using CoInitializeEx with the COINIT_MULTITHREADED flag, SHBrowseForFolder fails if the calling application uses the BIF_USENEWUI or BIF_NEWDIALOGSTYLE flag in the BROWSEINFO structure.

I am wondering whether there exists a software tool to map the memory at the instance that QM crashes or any other useful debugger tool.

Any advice much appreciated.

Forum Jump:

Users browsing this thread: 1 Guest(s)