maul-esel / COM-Classes

AHK classes that implement COM interfaces
38 stars 10 forks source link

CCF (V2) and ObjTree makes AHK V2 crash ... #46

Closed hoppfrosch closed 12 years ago

hoppfrosch commented 12 years ago

After the bugfix (http://www.autohotkey.com/forum/viewtopic.php?p=517398#517398) , which allows using ObjTree (http://http://www.autohotkey.com/forum/viewtopic.php?t=69756) to display objects from CCF, still one fatal error exists:

At the end of the following example program, AHK2 crashes and pops up a window (german OS): "Autohotkey_L funktioniert nicht mehr".

#SingleInstance
#include ..\..\_CCF_Error_Handler_.ahk
#include ..\..\CCFramework.ahk
#Include ..\..\Unknown\Unknown.ahk
#Include ..\..\ShellItem\ShellItem.ahk
#Include ..\..\Constant Classes\SIGDN.ahk
#Include ..\..\Constant Classes\SFGAO.ahk
#Include ..\..\Constant Classes\KNOWNFOLDERID.ahk

; #############################################
; Explicit filepath
shItem := ShellItem.FromAbsolutePath(A_AhkPath)

ObjTree(shItem)

; display a few names
MsgBox % "NORMALDISPLAY: <" shItem.GetDisplayName() ">`nFILESYSPATH: <" shItem.GetDisplayName(SIGDN.FILESYSPATH) ">`nDESKTOPABSOLUTEEDITING: <" shItem.GetDisplayName(SIGDN.DESKTOPABSOLUTEEDITING) ">`nPARENTRELATIVEFORADDRESSBAR: <" shItem.GetDisplayName(SIGDN.PARENTRELATIVEFORADDRESSBAR) ">"

; checking some attributes
ret := shItem.GetAttributes((SFGAO.HASPROPSHEET | SFGAO.ENCRYPTED | SFGAO.FOLDER | SFGAO.BROWSABLE), bits)
; to display wheter the flag is set or not, we use Utility function - or some bitwise operations
MsgBox % "HASPROPSHEET: <" CCFramework.HasEnumFlag(bits, SFGAO.HASPROPSHEET) ">`nENCRYPTED: <" CCFramework.HasEnumFlag(bits,SFGAO.ENCRYPTED) ">`nFOLDER: <" ((bits & SFGAO.FOLDER) > 0) ">`nBROWSABLE: <" ((bits & SFGAO.BROWSABLE) > 0) ">" 

I'm not quite sure, who's the culprit (either CCF, ObjTree, or AHK itself) - but it's beyond my capability to identify it ...

maul-esel commented 12 years ago

Sorry I can not confirm this on my system. 64bit again?

hoppfrosch commented 12 years ago

Yes ...

System info: AHK 2.0-a032-64bit Win7SP1-64bit

maul-esel commented 12 years ago

Could you test if the latest change fixes this?

hoppfrosch commented 12 years ago

No success - same error occurs. :-(

maul-esel commented 12 years ago

Sorry, I forgot ObjTree did not support this at that time. Although there's only a little chance, check it out with the new ObjTree version, please.

hoppfrosch commented 12 years ago

After Update of ObjTree to Version from 01.03.2012 everything works as expected - no crash of AHK at program end ...

Issue fixed -> CLOSED