Preview 2.0 - PDF Related Crash

Things you’d like to miss in the future...
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Preview 2.0 - PDF Related Crash

Post by TheQwerty »

EDIT: Okay after playing around a bit, I've discovered a crash.
A few minutes after leaving a PDF preview, while XY is just sitting there idling, the main window turns completely white and quits responding. Clicking on it displays a typically unhelpful Windows error message:
2015-12-02 134557.png
2015-12-02 134557.png (15.16 KiB) Viewed 3770 times
Debugging it with VS 2013 is not particularly useful here, but it shows the error being:
Unhandled exception at 0x686E8FB7 in XYplorer.exe: 0xC0000005: Access violation reading location 0x686E8FB7.
Occurs in fresh:
Various Information wrote:XYplorer: 16.00.0216 (Pro Edition - Lifetime License Pro)
Loaded in: 510 ms at 12/2/2015 1:49:26 PM
Uptime: 5 mins, 4 secs
Memory Usage: 33,852 KB, Virtual Memory Size: 16,044 KB

OS: Windows 7 Professional (Service Pack 1), 64-bit (6.1)
OS Uptime: 1 week, 5 days, 3 hrs, 3 mins, 57 secs
UTC Offset: --05:00
User Role: User
Themes: Yes (Aero) RealSystem32: Yes

System Locale ID: 1033 (en-US)
Thread Locale ID: 1033 (en-US)
Default ANSI Code Page: 1252 (ANSI - Latin I)
Active Code Page: 1252 (ANSI - Latin I)
DBCS Code Page: No
Preview handler is the one installed with Adobe Reader XI v11.0.10 (I believe, I'm not sure how to get you more details but will investigate.)

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Preview 2.0 - Generic Thread

Post by admin »

Glad to hear Office looks good. So 64-bit ain't a problem here, fine.

Zip: Ah, yes, I can reactivate that secret little option.

Yes, I also had a crash after viewing PDFs (PDF-XChange Viewer here). Going on the hunt... :twisted: (not easy to reproduce, there is some random factor...)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Preview 2.0 - Generic Thread

Post by TheQwerty »

admin wrote:Glad to hear Office looks good. So 64-bit ain't a problem here, fine.
Don't get your hopes up yet - I'm using Microsoft Office Professional Plus 2013 (15.0.4719.1000) 32-bit.
admin wrote:Zip: Ah, yes, I can reactivate that secret little option.
Much appreciated! ;)
admin wrote:Yes, I also had a crash after viewing PDFs (PDF-XChange Viewer here). Going on the hunt... :twisted: (not easy to reproduce, there is some random factor...)
Seemed like it might be an issue with handles closing or something similar, but I don't want to speculate too much.

EDIT: About reproduction, I can get it reliably by closing the preview and then just waiting, but it can take a few minutes. /edit.

As you see it with a different handler I won't bother posting the details of mine, but for reference NirSoft's ShellExView is extremely useful (like so many of their utilities).

Make sure to enable Options > Show 32-bit Shell Extension and you can also filter to just Preview Handlers using Options > Filter By Extension Type.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Preview 2.0 - Generic Thread

Post by admin »

TheQwerty wrote:EDIT: About reproduction, I can get it reliably by closing the preview and then just waiting, but it can take a few minutes.
You mean by unselecting the file? Not here.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Preview 2.0 - Generic Thread

Post by TheQwerty »

admin wrote:
TheQwerty wrote:EDIT: About reproduction, I can get it reliably by closing the preview and then just waiting, but it can take a few minutes.
You mean by unselecting the file? Not here.
Yep - unselect the file, activate a different window/application, and wait a few minutes. It might take a bit but it always happens here.

Looking at the list of loaded modules in XY with VS or Process Explorer.
'PDFPrevHndlr.dll' which is Adobe shows up when I preview the PDF, and remains even after I unselect the item.
Wait a few minutes and it eventually leaves the list, but the second it disappears XY crashes.

EDIT: I can prevent the crash here with Adobe's handler, or at least delay it beyond my patience for waiting.
Looking at the registry entries for their handler under:
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{DC6EFB56-9CFA-464D-8880-44885D7DC193}\InprocServer32
Key ThreadingModel is set to Apartment - changing that to Both seems to prevent the DLL from being unloaded, and in turn XY does not crash.

That being said I am completely out of my knowledge sphere and after a few reads of this am still not sure what the ramifications of this change might be. :veryconfused:

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Preview 2.0 - Generic Thread

Post by admin »

Try if you still can crash it with v16.00.0217. I cannot. (But I hardly could crash it before. Just once in 3 hours.)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Preview 2.0 - Generic Thread

Post by TheQwerty »

admin wrote:Try if you still can crash it with v16.00.0217. I cannot. (But I hardly could crash it before. Just once in 3 hours.)
No change in .0217 - still crashes around the time the DLL is unloaded. :(

EDIT: And the "fix" I edited into the other post doesn't actually work. The crash just moves to when you close XY, and Windows doesn't show an error but eventually silently kills the process. I assume this was also the case in .0216.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Preview 2.0 - Generic Thread

Post by admin »

Probably Adobe is to blame. Evil...

Anyway, where do you see the modules in Process Explorer? I can't seem to find the right settings/windows...

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Preview 2.0 - Generic Thread

Post by TheQwerty »

admin wrote:Probably Adobe is to blame. Evil...
My guess as well, but it is what IT has dictated here, and I don't care enough to change it. ;)
admin wrote:Anyway, where do you see the modules in Process Explorer? I can't seem to find the right settings/windows...
Pressing Ctrl+D might be enough, but:
Check View > Show Lower Pane.
Select View > Lower Pane View > DLLs

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Preview 2.0 - Generic Thread

Post by admin »

Thanks, got it.

And I also got the crash now. Hrmpf, so it's not Adobe. :evil:

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Preview 2.0 - Generic Thread

Post by TheQwerty »

admin wrote:And I also got the crash now. Hrmpf, so it's not Adobe. :evil:
Good, cause I'm going to be away from this system for the next 14 hours, so you'll need another way to reproduce this. :P

EDIT: Okay I'm done making a mess trying to move these posts to a separate thread. :oops:

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Preview 2.0 - PDF Related Crash

Post by TheQwerty »

.0225 is actually worse at displaying PDFs for me, Don.

Previously, previewing would cause XY to start an instance of AcroRd32.exe, with a child process of itself (hidden away of course).
These remained while the preview was open and were killed when the file was unselected.
Then eventually PDFPrevHndlr.dll would be unloaded and XY would crash.


Now it is slower.
XY seems to start an instance of AcroRd32 (and child), then kills them, then starts them again.
Unselecting the file kills the process, and the unloading still crashes.

EDIT: I'm out of ideas, any thoughts on what I can do to help track this down?

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Preview 2.0 - PDF Related Crash

Post by admin »

Damn. It definitely works here. So I found a solution that works for PDF-XChange but not for Adobe. Out of ideas as well.

PS: Actually I would like hear about other systems, with Foxit etc. I could live with shifting the blame to Adobe because I think they deserve it. They are known to deliberately screw things to make any non-Adobe software suffer.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Preview 2.0 - PDF Related Crash

Post by admin »

TheQwerty wrote:.0225 is actually worse at displaying PDFs for me, Don.
BTW, how did the Preview 1.0 work for you? (That could be my backup plan for the deadly Adobe+PDF combination).

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Preview 2.0 - PDF Related Crash

Post by TheQwerty »

admin wrote:
TheQwerty wrote:.0225 is actually worse at displaying PDFs for me, Don.
BTW, how did the Preview 1.0 work for you? (That could be my backup plan for the deadly Adobe+PDF combination).
It worked well for me and I don't recall ever having issues with it (aside from focus thievery).
But then so did Office previews (no Open/Save dialogs), except they tended to be

Though checking now I see .msg previews didn't work (Open/Save), so that's a plus for Preview 2.0.

As far as .0217 vs .0225, the latter is extremely slow to show the preview and occasionally puts XY in a Not Responding state for a bit before the preview is loaded. The crash behavior is the same, but .0217 was much better at showing the previews.

Investigating WE a bit, Microsoft seems to off-shoot things to prevhost.exe, so AcroRd32.exe and PDFPrevHndlr.dll get loaded by it rather than explorer.exe. Closing the preview in WE kills AcroRd32.exe but prevhost.exe sticks around and unless I'm just lacking patience it never unloads PDFPrevHndlr.dll. (And there is no crash.)

Post Reply