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

QM 2.3.0.
Win XP SP2.
PS Hot Folders 2.2, default configuration.
Test macro:
Code:
Copy      Help
if(!BrowseForFolder(_s "" 4)) ret
out _s
#3
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.
#4
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.
#5
I cannot debug normally because works well on my computers. Try to use this:

Function BrowseForFolder2
Code:
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.

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


BROWSEINFOW b
b.hwndOwner=win()
if(flags&1) b.ulFlags|BIF_BROWSEINCLUDEFILES
if(flags&2=0) b.ulFlags|BIF_RETURNONLYFSDIRS
if(flags&4) b.ulFlags|BIF_USENEWUI
b.ulFlags|flags>>8
b.lpszTitle=@text
;if(flags&4)
,;STRINT p.i=flags; p.s.searchpath(initdir)
,;b.lpfn=&BFF_Callback; b.lParam=&p
;else
,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
0
ret s.len

Here i removed the callback function.
#6
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.
#7
The icons sometimes blink here too. Even if using this simplest possible code:

Macro
Code:
Copy      Help
BROWSEINFOW b
b.ulFlags=BIF_USENEWUI
SHBrowseForFolderW(&b)

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.
#8
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.
#9
I have tested it thoroughly on a new brand PC Windows XP SP3 without any other applications but QM (2.3.0.1) 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.
#10
Gintaras,

Congrats for the new release 2.3.0.2.

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.
#11
I am sorry I have to bring-up the same issue. After version 2.3.0.2 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 (http://msdn.microsoft.com/en-us/library/bb762115(VS.85).aspx) 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: 5 Guest(s)