Crash when selecting files
Crash when selecting files
Hi,
I've run into an issue which causes XYplorer to crash when selecting some very specific files. XYplorer calls DrawTextW with DT_END_ELLIPSIS, which in this case causes the string to become longer than it was previously and it overwrites other bytes on the heap.
It is a bit of an obscure problem but a fix would certainly be appreciated!
Thank you.
I've run into an issue which causes XYplorer to crash when selecting some very specific files. XYplorer calls DrawTextW with DT_END_ELLIPSIS, which in this case causes the string to become longer than it was previously and it overwrites other bytes on the heap.
It is a bit of an obscure problem but a fix would certainly be appreciated!
Thank you.
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Crash when selecting files
Well, it would certainly help if you told me the name of those files...
FAQ | XY News RSS | XY Twitter
Re: Crash when selecting files
It is a folder containing some old versions of XYplorer:
Selecting any of these subfolders causes XYplorer to crash, because the bug occurs when drawing the location. I have put some screenshots below to illustrate what I mean.
Before
After
I hope this helps.
Selecting any of these subfolders causes XYplorer to crash, because the bug occurs when drawing the location. I have put some screenshots below to illustrate what I mean.
Before
After
I hope this helps.
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Crash when selecting files
What are these hex codes?
Which version of XY are you using?
Are you using any 3rd party themes?
What Windows version is this?
Which version of XY are you using?
Are you using any 3rd party themes?
What Windows version is this?
FAQ | XY News RSS | XY Twitter
Re: Crash when selecting files
I forgot to mention that in my first post, sorry.
OS: Windows 7
XY version: 19.40, but the issue also happens to me on 19.60 (I tested it before making a bug report)
I am not using any third party themes.
The hex codes are a picture from the debugger that shows the string in memory that gets passed to DrawTextW. After the ellipsis is inserted you can see that it has overwritten the bytes after the end of the string, which is why XY crashes.
OS: Windows 7
XY version: 19.40, but the issue also happens to me on 19.60 (I tested it before making a bug report)
I am not using any third party themes.
The hex codes are a picture from the debugger that shows the string in memory that gets passed to DrawTextW. After the ellipsis is inserted you can see that it has overwritten the bytes after the end of the string, which is why XY crashes.
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Crash when selecting files
AFAIK the full path is not drawn on selecting a list item unless you are showing the Path column. Are you?
FAQ | XY News RSS | XY Twitter
Re: Crash when selecting files
Hmm, I do not have that enabled. These are the only columns I have selected:
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Crash when selecting files
By "select" you mean just single-click (make the name selected), not double-click to go into a folder, right?
How do you select. Mouse or keyboard? Does it make a difference?
How do you select. Mouse or keyboard? Does it make a difference?
FAQ | XY News RSS | XY Twitter
Re: Crash when selecting files
Yes, it is only necessary to select the file. It happens using both mouse and keyboard. Even if I just open that folder in XY and press the down arrow key, it crashes instantly.
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Crash when selecting files
Very strange. Of course, this does not happen here.
Stupid idea but it often helps: Reboot Windows...
Stupid idea but it often helps: Reboot Windows...
FAQ | XY News RSS | XY Twitter
Re: Crash when selecting files
The computer has been rebooted between discovering the problem and making the bug report, so rebooting does not affect it.
It is indeed a strange issue to track down because it depends on the exact width of the string and the exact width of the rectangle.
I debugged it some more and found that the problem lies in the code that draws the path in the properties panel.
It is indeed a strange issue to track down because it depends on the exact width of the string and the exact width of the rectangle.
I debugged it some more and found that the problem lies in the code that draws the path in the properties panel.
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Crash when selecting files
Thanks, that helped! Although I could not make it crash here I think I found the cause of the trouble:
"F:\Downloads\Software\Utilities\XYplorer\Old\" is shortened to "F:\Downloads\Software\Utilities\XYplorer\Ol..." which takes less space although it has more characters! This constellation is rather rare, and I don't know why it does not lead to a crash here (win 8.1), but I'm sure your initial analysis was to the point: foreign bytes were overwritten.
The next beta should fix it.
"F:\Downloads\Software\Utilities\XYplorer\Old\" is shortened to "F:\Downloads\Software\Utilities\XYplorer\Ol..." which takes less space although it has more characters! This constellation is rather rare, and I don't know why it does not lead to a crash here (win 8.1), but I'm sure your initial analysis was to the point: foreign bytes were overwritten.
The next beta should fix it.
FAQ | XY News RSS | XY Twitter
Re: Crash when selecting files
I'm glad I could help! I've just tested the latest beta version and it no longer crashes when I select those folders. Thank you!
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Crash when selecting files
I thank you. That was an interesting bug, and it was there forever, lurking in the dark, ready to hit anyone at any time. Not anymore!
FAQ | XY News RSS | XY Twitter
Re: Crash when selecting files
Strange, I couldn't reproduce myself and make it crash.
I'm not sure why, but for me it shortens in 'xyplorer' path element, not at the end (Old).
I tried Win 2016, then Win 7 (the screenshot is Win7).
I'm not sure why, but for me it shortens in 'xyplorer' path element, not at the end (Old).
I tried Win 2016, then Win 7 (the screenshot is Win7).