[GH-ISSUE #65] Problem around SHGetFileInfoW() with FileSel in W10 when getting a shortcut icon #36

Closed
opened 2026-05-05 03:35:11 -06:00 by gitea-mirror · 22 comments
Owner

Originally created by @izabala123 on GitHub (Mar 7, 2022).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/65

In my computer, when opening with FileSel a folder with a shortcut, the program abruptly stops.
When debugging, it seems that in FileSel.cpp, function FileIconMaker::Make(), the program crashes when calling SHGetFileInfoW() with a shortcut.
To reproduce it, just run this:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
	bool large = false;
	bool exe = false;
	SHFILEINFOW info;
	SHGetFileInfoW(ToSystemCharsetW("x.lnk"), FILE_ATTRIBUTE_NORMAL,
		               &info, sizeof(info),
		               SHGFI_ICON|
		               (large ? SHGFI_LARGEICON : SHGFI_SMALLICON)|
		               (exe ? 0 : SHGFI_USEFILEATTRIBUTES));
}

Changing exe to true, it seems to work.

Originally created by @izabala123 on GitHub (Mar 7, 2022). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/65 In my computer, when opening with FileSel a folder with a shortcut, the program abruptly stops. When debugging, it seems that in FileSel.cpp, function FileIconMaker::Make(), the program crashes when calling SHGetFileInfoW() with a shortcut. To reproduce it, just run this: ``` #include <CtrlLib/CtrlLib.h> using namespace Upp; GUI_APP_MAIN { bool large = false; bool exe = false; SHFILEINFOW info; SHGetFileInfoW(ToSystemCharsetW("x.lnk"), FILE_ATTRIBUTE_NORMAL, &info, sizeof(info), SHGFI_ICON| (large ? SHGFI_LARGEICON : SHGFI_SMALLICON)| (exe ? 0 : SHGFI_USEFILEATTRIBUTES)); } ``` Changing exe to true, it seems to work.
Author
Owner

@mirek-fidler commented on GitHub (Mar 7, 2022):

Cannot reproduce, seems like Windows bug.

What x.lnk links to? File, executable or folder?

We can definitely add a text for .lnk extension and set exe true in that
case...

Mirek

po 7. 3. 2022 v 13:30 odesílatel Iñaki Zabala @.***>
napsal:

In my computer, when opening with FileSel a folder with a shortcut, the
program abruptly stops.
When debugging, it seems that in FileSel.cpp, function
FileIconMaker::Make(), the program crashes when SHGetFileInfoW() with a
shortcut.
To reproduce it, just run this:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
bool large = false;
bool exe = false;
SHFILEINFOW info;
SHGetFileInfoW(ToSystemCharsetW("x.lnk"), FILE_ATTRIBUTE_NORMAL,
&info, sizeof(info),
SHGFI_ICON|
(large ? SHGFI_LARGEICON : SHGFI_SMALLICON)|
(exe ? 0 : SHGFI_USEFILEATTRIBUTES));
}

Changing exe to true, it seems to work.


Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/65, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH236OQFPKD7XQ36SRRJ3U6XZFHANCNFSM5QDEYCPQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<!-- gh-comment-id:1061089942 --> @mirek-fidler commented on GitHub (Mar 7, 2022): Cannot reproduce, seems like Windows bug. What x.lnk links to? File, executable or folder? We can definitely add a text for .lnk extension and set exe true in that case... Mirek po 7. 3. 2022 v 13:30 odesílatel Iñaki Zabala ***@***.***> napsal: > In my computer, when opening with FileSel a folder with a shortcut, the > program abruptly stops. > When debugging, it seems that in FileSel.cpp, function > FileIconMaker::Make(), the program crashes when SHGetFileInfoW() with a > shortcut. > To reproduce it, just run this: > > #include <CtrlLib/CtrlLib.h> > > using namespace Upp; > > GUI_APP_MAIN > { > bool large = false; > bool exe = false; > SHFILEINFOW info; > SHGetFileInfoW(ToSystemCharsetW("x.lnk"), FILE_ATTRIBUTE_NORMAL, > &info, sizeof(info), > SHGFI_ICON| > (large ? SHGFI_LARGEICON : SHGFI_SMALLICON)| > (exe ? 0 : SHGFI_USEFILEATTRIBUTES)); > } > > Changing exe to true, it seems to work. > > — > Reply to this email directly, view it on GitHub > <https://github.com/ultimatepp/ultimatepp/issues/65>, or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AARH236OQFPKD7XQ36SRRJ3U6XZFHANCNFSM5QDEYCPQ> > . > Triage notifications on the go with GitHub Mobile for iOS > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> > or Android > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. > > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@izabala123 commented on GitHub (Mar 8, 2022):

Thank you Mirek.

"x.lnk" doesn't link to anything, it is just how Upp::FileSel looks for icons.
I have done some tests:

  • Set SHFILEINFOW info = {0} -> Crash
  • Changing SHGetFileInfoW() to SHGetFileInfo() -> Crash
  • Compiling mode:
    • DEBUG -> Crash
    • RELEASE -> Runs!!!
  • Trying it with:
    • "x.lnk" -> Crash
    • "x.lnkk" -> Runs
    • "x.mp3" -> Runs

I'll follow later doing more tests.

<!-- gh-comment-id:1061494594 --> @izabala123 commented on GitHub (Mar 8, 2022): Thank you Mirek. "x.lnk" doesn't link to anything, it is just how Upp::FileSel looks for icons. I have done some tests: - Set SHFILEINFOW info = {0} -> Crash - Changing SHGetFileInfoW() to SHGetFileInfo() -> Crash - Compiling mode: - - DEBUG -> Crash - - RELEASE -> Runs!!! - Trying it with: - - "x.lnk" -> Crash - - "x.lnkk" -> Runs - - "x.mp3" -> Runs I'll follow later doing more tests.
Author
Owner

@mirek-fidler commented on GitHub (Mar 8, 2022):

So it does not exist?

Mirek

út 8. 3. 2022 v 8:42 odesílatel Iñaki Zabala @.***>
napsal:

Thank you Mirek.

"x.lnk" doesn't link to anything, it is just how Upp::FileSel looks for
icons.
I have done some tests:

  • Set SHFILEINFOW info = {0} -> Crash
  • Changing SHGetFileInfoW() to SHGetFileInfo() -> Crash
  • Compiling mode:
    • DEBUG -> Crash
    • RELEASE -> Runs!!!
  • Trying it with:
    • "x.lnk" -> Crash
    • "x.lnkk" -> Runs
    • "x.mp3" -> Runs

I'll follow later doing more tests.


Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1061494594,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH23ZPXW6AWA2ZPMR7TTDU64AHXANCNFSM5QDEYCPQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:1061540984 --> @mirek-fidler commented on GitHub (Mar 8, 2022): So it does not exist? Mirek út 8. 3. 2022 v 8:42 odesílatel Iñaki Zabala ***@***.***> napsal: > Thank you Mirek. > > "x.lnk" doesn't link to anything, it is just how Upp::FileSel looks for > icons. > I have done some tests: > > - Set SHFILEINFOW info = {0} -> Crash > - Changing SHGetFileInfoW() to SHGetFileInfo() -> Crash > - Compiling mode: > - > - DEBUG -> Crash > - > - RELEASE -> Runs!!! > - Trying it with: > - > - "x.lnk" -> Crash > - > - "x.lnkk" -> Runs > - > - "x.mp3" -> Runs > > I'll follow later doing more tests. > > — > Reply to this email directly, view it on GitHub > <https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1061494594>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AARH23ZPXW6AWA2ZPMR7TTDU64AHXANCNFSM5QDEYCPQ> > . > Triage notifications on the go with GitHub Mobile for iOS > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> > or Android > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. > > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@mirek-fidler commented on GitHub (Mar 8, 2022):

Also, what about clang vs msc?

út 8. 3. 2022 v 9:46 odesílatel Mirek Fidler @.***>
napsal:

So it does not exist?

Mirek

út 8. 3. 2022 v 8:42 odesílatel Iñaki Zabala @.***>
napsal:

Thank you Mirek.

"x.lnk" doesn't link to anything, it is just how Upp::FileSel looks for
icons.
I have done some tests:

  • Set SHFILEINFOW info = {0} -> Crash
  • Changing SHGetFileInfoW() to SHGetFileInfo() -> Crash
  • Compiling mode:
    • DEBUG -> Crash
    • RELEASE -> Runs!!!
  • Trying it with:
    • "x.lnk" -> Crash
    • "x.lnkk" -> Runs
    • "x.mp3" -> Runs

I'll follow later doing more tests.


Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1061494594,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH23ZPXW6AWA2ZPMR7TTDU64AHXANCNFSM5QDEYCPQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:1061560088 --> @mirek-fidler commented on GitHub (Mar 8, 2022): Also, what about clang vs msc? út 8. 3. 2022 v 9:46 odesílatel Mirek Fidler ***@***.***> napsal: > So it does not exist? > > Mirek > > út 8. 3. 2022 v 8:42 odesílatel Iñaki Zabala ***@***.***> > napsal: > >> Thank you Mirek. >> >> "x.lnk" doesn't link to anything, it is just how Upp::FileSel looks for >> icons. >> I have done some tests: >> >> - Set SHFILEINFOW info = {0} -> Crash >> - Changing SHGetFileInfoW() to SHGetFileInfo() -> Crash >> - Compiling mode: >> - >> - DEBUG -> Crash >> - >> - RELEASE -> Runs!!! >> - Trying it with: >> - >> - "x.lnk" -> Crash >> - >> - "x.lnkk" -> Runs >> - >> - "x.mp3" -> Runs >> >> I'll follow later doing more tests. >> >> — >> Reply to this email directly, view it on GitHub >> <https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1061494594>, >> or unsubscribe >> <https://github.com/notifications/unsubscribe-auth/AARH23ZPXW6AWA2ZPMR7TTDU64AHXANCNFSM5QDEYCPQ> >> . >> Triage notifications on the go with GitHub Mobile for iOS >> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> >> or Android >> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. >> >> You are receiving this because you commented.Message ID: >> ***@***.***> >> >
Author
Owner

@izabala123 commented on GitHub (Mar 8, 2022):

So it does not exist?
Yes, it doesn't. It's the way Upp::FileSel works. In FileSel.cpp, GetFileIcon(), you can see how it assembles the FileIconMaker class before getting the icon for each extension.

<!-- gh-comment-id:1061609033 --> @izabala123 commented on GitHub (Mar 8, 2022): > So it does not exist? Yes, it doesn't. It's the way Upp::FileSel works. In FileSel.cpp, GetFileIcon(), you can see how it assembles the FileIconMaker class before getting the icon for each extension.
Author
Owner

@izabala123 commented on GitHub (Mar 8, 2022):

Also, what about clang vs msc?

It's the same in both, in RELEASE both work and in DEBUG both fail.

<!-- gh-comment-id:1061611904 --> @izabala123 commented on GitHub (Mar 8, 2022): > Also, what about clang vs msc? It's the same in both, in RELEASE both work and in DEBUG both fail.
Author
Owner

@mirek-fidler commented on GitHub (Mar 8, 2022):

Last question: Can you send backtrace after the crash?

út 8. 3. 2022 v 11:10 odesílatel Iñaki Zabala @.***>
napsal:

Also, what about clang vs msc?

It's the same in both, in RELEASE both work and in DEBUG both fail.


Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1061611904,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH232XIFPNCLQ4HA6UW53U64RSFANCNFSM5QDEYCPQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:1061648818 --> @mirek-fidler commented on GitHub (Mar 8, 2022): Last question: Can you send backtrace after the crash? út 8. 3. 2022 v 11:10 odesílatel Iñaki Zabala ***@***.***> napsal: > Also, what about clang vs msc? > > It's the same in both, in RELEASE both work and in DEBUG both fail. > > — > Reply to this email directly, view it on GitHub > <https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1061611904>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AARH232XIFPNCLQ4HA6UW53U64RSFANCNFSM5QDEYCPQ> > . > Triage notifications on the go with GitHub Mobile for iOS > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> > or Android > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. > > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@mirek-fidler commented on GitHub (Mar 8, 2022):

Another weird issue. If you check

Image GetFileIcon(const char *path, bool dir, bool force, bool large, bool quick = false)
{
	FileIconMaker m;
	String ext = GetFileExt(path);
	m.exe = false;
	m.dir = false;
	m.file = path;
	m.large = large;
	if(force)
		m.exe = true;
	else
	if(dir) {
		m.dir = true;
		m.exe = true;
	}
	else
	if(findarg(ext, ".exe", ".lnk") >= 0)
		m.exe = true;
	else
		m.file = "x" + ext;
	if(quick) {
		m.exe = false;
		m.file = "x" + ext;
	}
	return MakeImage(m);
}

exe should actually be true if the extension is .lnk ....

(so I am quite confused about the whole thing...)

<!-- gh-comment-id:1061652710 --> @mirek-fidler commented on GitHub (Mar 8, 2022): Another weird issue. If you check ``` Image GetFileIcon(const char *path, bool dir, bool force, bool large, bool quick = false) { FileIconMaker m; String ext = GetFileExt(path); m.exe = false; m.dir = false; m.file = path; m.large = large; if(force) m.exe = true; else if(dir) { m.dir = true; m.exe = true; } else if(findarg(ext, ".exe", ".lnk") >= 0) m.exe = true; else m.file = "x" + ext; if(quick) { m.exe = false; m.file = "x" + ext; } return MakeImage(m); } ``` exe should actually be true if the extension is .lnk .... (so I am quite confused about the whole thing...)
Author
Owner

@izabala123 commented on GitHub (Mar 8, 2022):

Another weird issue. If you check

Image GetFileIcon(const char *path, bool dir, bool force, bool large, bool quick = false)
{
	FileIconMaker m;
	String ext = GetFileExt(path);
	m.exe = false;
	m.dir = false;
	m.file = path;
	m.large = large;
	if(force)
		m.exe = true;
	else
	if(dir) {
		m.dir = true;
		m.exe = true;
	}
	else
	if(findarg(ext, ".exe", ".lnk") >= 0)
		m.exe = true;
	else
		m.file = "x" + ext;
	if(quick) {
		m.exe = false;
		m.file = "x" + ext;
	}
	return MakeImage(m);
}

exe should actually be true if the extension is .lnk ....

(so I am quite confused about the whole thing...)

This is true, but as quick == true, final

if(quick) {
	m.exe = false;
	m.file = "x" + ext;
}

invalidates previous ifs, so finally exe == false

<!-- gh-comment-id:1062030779 --> @izabala123 commented on GitHub (Mar 8, 2022): > Another weird issue. If you check > > ``` > Image GetFileIcon(const char *path, bool dir, bool force, bool large, bool quick = false) > { > FileIconMaker m; > String ext = GetFileExt(path); > m.exe = false; > m.dir = false; > m.file = path; > m.large = large; > if(force) > m.exe = true; > else > if(dir) { > m.dir = true; > m.exe = true; > } > else > if(findarg(ext, ".exe", ".lnk") >= 0) > m.exe = true; > else > m.file = "x" + ext; > if(quick) { > m.exe = false; > m.file = "x" + ext; > } > return MakeImage(m); > } > ``` > > exe should actually be true if the extension is .lnk .... > > (so I am quite confused about the whole thing...) This is true, but as quick == true, final ``` if(quick) { m.exe = false; m.file = "x" + ext; } ``` invalidates previous ifs, so finally exe == false
Author
Owner

@izabala123 commented on GitHub (Mar 8, 2022):

Last question: Can you send backtrace after the crash?

I am sorry, but I don't know how to do it. Could you help me?

<!-- gh-comment-id:1062049021 --> @izabala123 commented on GitHub (Mar 8, 2022): > Last question: Can you send backtrace after the crash? I am sorry, but I don't know how to do it. Could you help me?
Author
Owner

@mirek-fidler commented on GitHub (Mar 8, 2022):

Run in debugguer until crash, then Debug/Copy backtrace of all threads, paste here.

Would

if(quick && ext != ".lnk")

fix the problem? Although it would sort of spoil background loading of images, so something more elaborate would be needed, but for starters....

(I have retested here, my Win10 is not crashing...)

<!-- gh-comment-id:1062124649 --> @mirek-fidler commented on GitHub (Mar 8, 2022): Run in debugguer until crash, then Debug/Copy backtrace of all threads, paste here. Would if(quick && ext != ".lnk") fix the problem? Although it would sort of spoil background loading of images, so something more elaborate would be needed, but for starters.... (I have retested here, my Win10 is not crashing...)
Author
Owner

@izabala123 commented on GitHub (Mar 8, 2022):

Run in debugguer until crash, then Debug/Copy backtrace of all threads, paste here.


Thread ID: 0x3d94

ZwCreateFile()
CreateDirectoryW()
DllUnregisterServer()
DllUnregisterServer()
DllUnregisterServer()
DllUnregisterServer()
DllUnregisterServer()
DllUnregisterServer()
DllUnregisterServer()
DllUnregisterServer()
DllUnregisterServer()
7ffe8f4c06c2 (Powereason.dll)
7ffe8f4c6a21 (Powereason.dll)
7ffe8f4bcb28 (Powereason.dll)
TranslateSecurityAttributes()
TranslateSecurityAttributes()
NGenCreateNGenWorker()
InitializeFusion()
GC_Initialize()
GC_Initialize()
GC_Initialize()
CorExeMain2()
GetAssemblyMDImport()
DllGetClassObjectInternal()
DllGetClassObject()
DllGetClassObject()
RoActivateInstance()
RoActivateInstance()
Ordinal67()
Ordinal67()
CoRegisterClassObject()
Ordinal153()
CoDisableCallCancellation()
Ordinal167()
CoTaskMemRealloc()
CoDisableCallCancellation()
CoRegisterClassObject()
RoActivateInstance()
CoRegisterClassObject()
CoCreateInstance()
CoCreateInstance()
CoCreateInstance()
SHEvaluateSystemCommandTemplate()
Ordinal764()
Ordinal764()
FreeIconList()
FreeIconList()
SHELL32_IconCache_AboutToExtractIcons()
SHGetPropertyStoreForWindow()
SHGetPropertyStoreForWindow()
SHELL32_IconOverlayManagerInit()
CallFileCopyHook()
CallFileCopyHook()
SHGetFileInfoW()
SHGetFileInfo()
GuiMainFn_()
Upp::AppExecute__(app=7ff72d327d91)
WinMain(hInstance=7ff72d310000, __formal=0, lpCmdLine=23df7473dab "", nCmdShow=10)
invoke_main()
__scrt_common_main_seh()
__scrt_common_main()
WinMainCRTStartup()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x4bc8

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x5170

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x4854

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x1284

ZwWaitForMultipleObjects()
WaitForMultipleObjectsEx()
InitializeFusion()
InitializeFusion()
InitializeFusion()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x4fcc

NtWaitForSingleObject()
WaitForSingleObjectEx()
GetMetaDataPublicInterfaceFromInternal()
GetMetaDataPublicInterfaceFromInternal()
GetMetaDataPublicInterfaceFromInternal()
TranslateSecurityAttributes()
TranslateSecurityAttributes()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x11b4

RaiseException()
DllUnregisterServer()
DllUnregisterServer()
BaseThreadInitThunk()
RtlUserThreadStart()

<!-- gh-comment-id:1062126845 --> @izabala123 commented on GitHub (Mar 8, 2022): > Run in debugguer until crash, then Debug/Copy backtrace of all threads, paste here. ---------------------------------- Thread ID: 0x3d94 ZwCreateFile() CreateDirectoryW() DllUnregisterServer() DllUnregisterServer() DllUnregisterServer() DllUnregisterServer() DllUnregisterServer() DllUnregisterServer() DllUnregisterServer() DllUnregisterServer() DllUnregisterServer() 7ffe8f4c06c2 (Powereason.dll) 7ffe8f4c6a21 (Powereason.dll) 7ffe8f4bcb28 (Powereason.dll) TranslateSecurityAttributes() TranslateSecurityAttributes() NGenCreateNGenWorker() InitializeFusion() GC_Initialize() GC_Initialize() GC_Initialize() CorExeMain2() GetAssemblyMDImport() DllGetClassObjectInternal() DllGetClassObject() DllGetClassObject() RoActivateInstance() RoActivateInstance() Ordinal67() Ordinal67() CoRegisterClassObject() Ordinal153() CoDisableCallCancellation() Ordinal167() CoTaskMemRealloc() CoDisableCallCancellation() CoRegisterClassObject() RoActivateInstance() CoRegisterClassObject() CoCreateInstance() CoCreateInstance() CoCreateInstance() SHEvaluateSystemCommandTemplate() Ordinal764() Ordinal764() FreeIconList() FreeIconList() SHELL32_IconCache_AboutToExtractIcons() SHGetPropertyStoreForWindow() SHGetPropertyStoreForWindow() SHELL32_IconOverlayManagerInit() CallFileCopyHook() CallFileCopyHook() SHGetFileInfoW() SHGetFileInfo() GuiMainFn_() Upp::AppExecute__(app=7ff72d327d91) WinMain(hInstance=7ff72d310000, __formal=0, lpCmdLine=23df7473dab "", nCmdShow=10) invoke_main() __scrt_common_main_seh() __scrt_common_main() WinMainCRTStartup() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x4bc8 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x5170 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x4854 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x1284 ZwWaitForMultipleObjects() WaitForMultipleObjectsEx() InitializeFusion() InitializeFusion() InitializeFusion() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x4fcc NtWaitForSingleObject() WaitForSingleObjectEx() GetMetaDataPublicInterfaceFromInternal() GetMetaDataPublicInterfaceFromInternal() GetMetaDataPublicInterfaceFromInternal() TranslateSecurityAttributes() TranslateSecurityAttributes() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x11b4 RaiseException() DllUnregisterServer() DllUnregisterServer() BaseThreadInitThunk() RtlUserThreadStart()
Author
Owner

@izabala123 commented on GitHub (Mar 8, 2022):

Would

if(quick && ext != ".lnk")

fix the problem?

It's crazy, but it doesn't.. When calling directly FileSel, and tapping on a folder with a shortcut inside, exe == true, but it crashes...


Thread ID: 0x455c

Upp::FileIconMaker::Make()
Upp::scImageMaker::Make(object=)
Upp::LRUCacheUpp::Value,Upp::String::Get(m=)
Upp::MakeValue(m=)
Upp::MakeImage__(m=, paintonly=0)
Upp::MakeImage(m=)
Upp::GetFileIcon(path=26ccf3c1ba8 "C:\Users\0", dir=0, force=0, large=0, quick=1)
Upp::Load(list=, dir=, patterns=cfbcf16478 "*", dirs=0, WhenIcon=cfbcf16470, filesystem=, search=, hidden=0, hiddenfiles=0, lazyicons=1)
Upp::FileSel::SearchLoad()
Upp::FileSel::Load()
Upp::FileSel::GoToPlace()
<lambda_0145840f64cd27820057093f4ff59678>::operator()()
Upp::Function<void _cdecl(void)>::Wrapper<<lambda_0145840f64cd27820057093f4ff59678> >::Execute()
Upp::Function<void cdecl(void)>::operator()()
Upp::ArrayCtrl::DoClick(p=cfbcf16990, flags=8)
Upp::ArrayCtrl::LeftDown(p=cfbcf16b78, flags=8)
Upp::Ctrl::MouseEvent(event=129, p=cfbcf16cf0, zdelta=0, keyflags=8)
Upp::Ctrl::MouseEvent0(event=129, p=cfbcf16db8, zdelta=0, keyflags=8)
Upp::Ctrl::MouseEventH(event=129, p=cfbcf16ef8, zdelta=0, keyflags=8)
Upp::Ctrl::MEvent0(e=129, p=cfbcf17078, zd=0)
Upp::Ctrl::DispatchMouseEvent(e=129, p=cfbcf17210, zd=0)
Upp::Ctrl::DispatchMouseEvent(e=129, p=cfbcf173b0, zd=0)
Upp::Ctrl::DispatchMouseEvent(e=129, p=cfbcf177d0, zd=0)
Upp::Ctrl::DispatchMouse(e=129, p=cfbcf17838, zd=0)
Upp::Ctrl::DoMouse(e=129, p=cfbcf17d10, zd=0)
Upp::Ctrl::WindowProc(message=513, wParam=1, lParam=7077978)
Upp::TopWindow::WindowProc(message=513, wParam=1, lParam=7077978)
Upp::Ctrl::WndProc(hWnd=2d0e68, message=513, wParam=1, lParam=7077978)
CallWindowProcW()
DispatchMessageW()
Upp::Ctrl::sProcessMSG(msg=)
Upp::Ctrl::ProcessEvent(quit=cfbcf18550)
Upp::Ctrl::ProcessEvents(quit=cfbcf18550)
Upp::Ctrl::EventLoop(ctrl=cfbcf18700)
Upp::TopWindow::Run(appmodal=0)
Upp::TopWindow::Execute()
Upp::TopWindow::ExecuteOK()
GuiMainFn
()
Upp::AppExecute
(app=7ff612177d96)
WinMain(hInstance=7ff612160000, __formal=0, lpCmdLine=26ccd653dab "", nCmdShow=10)
invoke_main()
__scrt_common_main_seh()
__scrt_common_main()
WinMainCRTStartup()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x4a68

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x5814

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x1cd0

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x30bc

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x4ef4

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x460c

ZwWaitForMultipleObjects()
WaitForMultipleObjectsEx()
RoGetServerActivatableClasses()
RoGetServerActivatableClasses()
RoGetServerActivatableClasses()
RoGetServerActivatableClasses()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x4248

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x444

ZwWaitForWorkViaWorkerFactory()
TpReleaseCleanupGroupMembers()
BaseThreadInitThunk()
RtlUserThreadStart()


Thread ID: 0x278c

NtUserGetMessage()
GetMessageA()
Upp::Ctrl::Win32OverwatchThread(__formal=0)
BaseThreadInitThunk()
RtlUserThreadStart()

<!-- gh-comment-id:1062136181 --> @izabala123 commented on GitHub (Mar 8, 2022): > Would > > if(quick && ext != ".lnk") > > fix the problem? It's crazy, but it doesn't.. When calling directly FileSel, and tapping on a folder with a shortcut inside, exe == true, but it crashes... ---------------------------------- Thread ID: 0x455c Upp::FileIconMaker::Make() Upp::scImageMaker::Make(object=) Upp::LRUCache<Upp::Value,Upp::String>::Get(m=) Upp::MakeValue(m=) Upp::MakeImage__(m=, paintonly=0) Upp::MakeImage(m=) Upp::GetFileIcon(path=26ccf3c1ba8 "C:\\Users\\0", dir=0, force=0, large=0, quick=1) Upp::Load(list=, dir=, patterns=cfbcf16478 "*", dirs=0, WhenIcon=cfbcf16470, filesystem=, search=, hidden=0, hiddenfiles=0, lazyicons=1) Upp::FileSel::SearchLoad() Upp::FileSel::Load() Upp::FileSel::GoToPlace() <lambda_0145840f64cd27820057093f4ff59678>::operator()() Upp::Function<void __cdecl(void)>::Wrapper<<lambda_0145840f64cd27820057093f4ff59678> >::Execute() Upp::Function<void __cdecl(void)>::operator()() Upp::ArrayCtrl::DoClick(p=cfbcf16990, flags=8) Upp::ArrayCtrl::LeftDown(p=cfbcf16b78, flags=8) Upp::Ctrl::MouseEvent(event=129, p=cfbcf16cf0, zdelta=0, keyflags=8) Upp::Ctrl::MouseEvent0(event=129, p=cfbcf16db8, zdelta=0, keyflags=8) Upp::Ctrl::MouseEventH(event=129, p=cfbcf16ef8, zdelta=0, keyflags=8) Upp::Ctrl::MEvent0(e=129, p=cfbcf17078, zd=0) Upp::Ctrl::DispatchMouseEvent(e=129, p=cfbcf17210, zd=0) Upp::Ctrl::DispatchMouseEvent(e=129, p=cfbcf173b0, zd=0) Upp::Ctrl::DispatchMouseEvent(e=129, p=cfbcf177d0, zd=0) Upp::Ctrl::DispatchMouse(e=129, p=cfbcf17838, zd=0) Upp::Ctrl::DoMouse(e=129, p=cfbcf17d10, zd=0) Upp::Ctrl::WindowProc(message=513, wParam=1, lParam=7077978) Upp::TopWindow::WindowProc(message=513, wParam=1, lParam=7077978) Upp::Ctrl::WndProc(hWnd=2d0e68, message=513, wParam=1, lParam=7077978) CallWindowProcW() DispatchMessageW() Upp::Ctrl::sProcessMSG(msg=) Upp::Ctrl::ProcessEvent(quit=cfbcf18550) Upp::Ctrl::ProcessEvents(quit=cfbcf18550) Upp::Ctrl::EventLoop(ctrl=cfbcf18700) Upp::TopWindow::Run(appmodal=0) Upp::TopWindow::Execute() Upp::TopWindow::ExecuteOK() GuiMainFn_() Upp::AppExecute__(app=7ff612177d96) WinMain(hInstance=7ff612160000, __formal=0, lpCmdLine=26ccd653dab "", nCmdShow=10) invoke_main() __scrt_common_main_seh() __scrt_common_main() WinMainCRTStartup() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x4a68 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x5814 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x1cd0 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x30bc ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x4ef4 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x460c ZwWaitForMultipleObjects() WaitForMultipleObjectsEx() RoGetServerActivatableClasses() RoGetServerActivatableClasses() RoGetServerActivatableClasses() RoGetServerActivatableClasses() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x4248 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x444 ZwWaitForWorkViaWorkerFactory() TpReleaseCleanupGroupMembers() BaseThreadInitThunk() RtlUserThreadStart() ---------------------------------- Thread ID: 0x278c NtUserGetMessage() GetMessageA() Upp::Ctrl::Win32OverwatchThread(__formal=0) BaseThreadInitThunk() RtlUserThreadStart()
Author
Owner

@mirek-fidler commented on GitHub (Mar 8, 2022):

Have you tried to open that folder from theide? Eventually built in debug mode? Or perhaps UWord?

(Just to try to rule out that this is somehow caused by some other code)

<!-- gh-comment-id:1062145622 --> @mirek-fidler commented on GitHub (Mar 8, 2022): Have you tried to open that folder from theide? Eventually built in debug mode? Or perhaps UWord? (Just to try to rule out that this is somehow caused by some other code)
Author
Owner

@kov-serg commented on GitHub (Mar 8, 2022):

Did you think about removing Cybereason antivirus or just turn it off for a while?

<!-- gh-comment-id:1062244294 --> @kov-serg commented on GitHub (Mar 8, 2022): Did you think about [removing](https://www.advanceduninstaller.com/Cybereason-ActiveProbe-8e9b57178f7097e594601240fc8a7d20-application.htm) [Cybereason]( https://en.wikipedia.org/wiki/Cybereason) antivirus or just turn it off for a while?
Author
Owner

@mirek-fidler commented on GitHub (Mar 9, 2022):

It's crazy, but it doesn't.. When calling directly FileSel, and tapping on a folder with a shortcut inside, exe == true, but it crashes...

Thread ID: 0x455c

Upp::FileIconMaker::Make() Upp::scImageMaker::Make(object=) Upp::LRUCacheUpp::Value,Upp::String::Get(m=)

As it now crashes in U++ code, maybe you should be able to tell why? Like which line this is exactly and what is in the variables on that line?

<!-- gh-comment-id:1062630206 --> @mirek-fidler commented on GitHub (Mar 9, 2022): > It's crazy, but it doesn't.. When calling directly FileSel, and tapping on a folder with a shortcut inside, exe == true, but it crashes... > > Thread ID: 0x455c > > Upp::FileIconMaker::Make() Upp::scImageMaker::Make(object=) Upp::LRUCacheUpp::Value,Upp::String::Get(m=) As it now crashes in U++ code, maybe you should be able to tell why? Like which line this is exactly and what is in the variables on that line?
Author
Owner

@izabala123 commented on GitHub (Mar 9, 2022):

It's crazy, but it doesn't.. When calling directly FileSel, and tapping on a folder with a shortcut inside, exe == true, but it crashes...
Thread ID: 0x455c
Upp::FileIconMaker::Make() Upp::scImageMaker::Make(object=) Upp::LRUCacheUpp::Value,Upp::String::Get(m=)

As it now crashes in U++ code, maybe you should be able to tell why? Like which line this is exactly and what is in the variables on that line?

I'm sorry, I haven't included this code yet. This is the code of the answer https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1062136181 :

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
	FileSel fs;
	
	fs.ExecuteOK();
	
	Exclamation("It works!");
}
<!-- gh-comment-id:1063298207 --> @izabala123 commented on GitHub (Mar 9, 2022): > > It's crazy, but it doesn't.. When calling directly FileSel, and tapping on a folder with a shortcut inside, exe == true, but it crashes... > > Thread ID: 0x455c > > Upp::FileIconMaker::Make() Upp::scImageMaker::Make(object=) Upp::LRUCacheUpp::Value,Upp::String::Get(m=) > > As it now crashes in U++ code, maybe you should be able to tell why? Like which line this is exactly and what is in the variables on that line? I'm sorry, I haven't included this code yet. This is the code of the answer https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1062136181 : ``` #include <CtrlLib/CtrlLib.h> using namespace Upp; GUI_APP_MAIN { FileSel fs; fs.ExecuteOK(); Exclamation("It works!"); } ```
Author
Owner

@izabala123 commented on GitHub (Mar 9, 2022):

Did you think about removing Cybereason antivirus or just turn it off for a while?

Do you think it may be the culprit? It's true that "Powereason.dll" appears in the debug output. Unfortunately I cannot uninstall it.

<!-- gh-comment-id:1063302439 --> @izabala123 commented on GitHub (Mar 9, 2022): > Did you think about [removing](https://www.advanceduninstaller.com/Cybereason-ActiveProbe-8e9b57178f7097e594601240fc8a7d20-application.htm) [Cybereason](https://en.wikipedia.org/wiki/Cybereason) antivirus or just turn it off for a while? Do you think it may be the culprit? It's true that "Powereason.dll" appears in the debug output. Unfortunately I cannot uninstall it.
Author
Owner

@izabala123 commented on GitHub (Mar 9, 2022):

Have you tried to open that folder from theide? Eventually built in debug mode? Or perhaps UWord?

(Just to try to rule out that this is somehow caused by some other code)

Yes, compiling TheIDE in DEBUG mode, it also crashes in the same situation.

<!-- gh-comment-id:1063308791 --> @izabala123 commented on GitHub (Mar 9, 2022): > Have you tried to open that folder from theide? Eventually built in debug mode? Or perhaps UWord? > > (Just to try to rule out that this is somehow caused by some other code) Yes, compiling TheIDE in DEBUG mode, it also crashes in the same situation.
Author
Owner

@izabala123 commented on GitHub (Mar 17, 2022):

I have debugged TheIDE running the demo. It seems to stop in Debug.cpp, in line 367, when x.ExceptionCode == 0x406D1388, that is the code MS_VC_EXCEPTION.

I've looked for the source of this exception, and it seems it is raised when a thread wants to set its name for Visual Studio debugger. You can see references here.

As this exception seems harmless, if you agree I would propose to modify TheIDE debugger to ignore this exception.

<!-- gh-comment-id:1070584346 --> @izabala123 commented on GitHub (Mar 17, 2022): I have debugged TheIDE running the demo. It seems to stop in Debug.cpp, in line 367, when x.ExceptionCode == 0x406D1388, that is the code MS_VC_EXCEPTION. I've looked for the source of this exception, and it seems it is raised when a thread wants to set its name for Visual Studio debugger. You can see references [here](https://docs.microsoft.com/en-gb/previous-versions/visualstudio/visual-studio-2015/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2015&redirectedfrom=MSDN). As this exception seems harmless, if you agree I would propose to modify TheIDE debugger to ignore this exception.
Author
Owner

@mirek-fidler commented on GitHub (Mar 17, 2022):

Ah, there seems to be an important issue that I have missed in your
description: This only happens in debugger?!

Mirek

čt 17. 3. 2022 v 10:09 odesílatel Iñaki Zabala @.***>
napsal:

I have debugged TheIDE running the demo. It seems to stop in Debug.cpp, in
line 367, when x.ExceptionCode == 0x406D1388, that is the code
MS_VC_EXCEPTION.

I've looked for the source of this exception, and it seems it is raised
when a thread wants to set its name for Visual Studio debugger. You can see
references here
https://docs.microsoft.com/en-gb/previous-versions/visualstudio/visual-studio-2015/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2015&redirectedfrom=MSDN
.

As this exception seems harmless, if you agree I would propose to modify
TheIDE debugger to ignore this exception.


Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1070584346,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH232I2PM3K7IQNXAN6XLVALZFFANCNFSM5QDEYCPQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:1070850032 --> @mirek-fidler commented on GitHub (Mar 17, 2022): Ah, there seems to be an important issue that I have missed in your description: This only happens in debugger?! Mirek čt 17. 3. 2022 v 10:09 odesílatel Iñaki Zabala ***@***.***> napsal: > I have debugged TheIDE running the demo. It seems to stop in Debug.cpp, in > line 367, when x.ExceptionCode == 0x406D1388, that is the code > MS_VC_EXCEPTION. > > I've looked for the source of this exception, and it seems it is raised > when a thread wants to set its name for Visual Studio debugger. You can see > references here > <https://docs.microsoft.com/en-gb/previous-versions/visualstudio/visual-studio-2015/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2015&redirectedfrom=MSDN> > . > > As this exception seems harmless, if you agree I would propose to modify > TheIDE debugger to ignore this exception. > > — > Reply to this email directly, view it on GitHub > <https://github.com/ultimatepp/ultimatepp/issues/65#issuecomment-1070584346>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AARH232I2PM3K7IQNXAN6XLVALZFFANCNFSM5QDEYCPQ> > . > Triage notifications on the go with GitHub Mobile for iOS > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> > or Android > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. > > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@izabala123 commented on GitHub (Mar 17, 2022):

Yes, only in debugger. In fact, if I press F5 a couple of times, the computation follows. I noticed this later.

<!-- gh-comment-id:1070958793 --> @izabala123 commented on GitHub (Mar 17, 2022): Yes, only in debugger. In fact, if I press F5 a couple of times, the computation follows. I noticed this later.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#36
No description provided.