Page 2 of 3

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 19:11
by admin
prevhost.exe ... that is interesting, I'll come back to that later.

Just for logical completeness I uploaded fix #3 with zero hopes.

Why is only TheQwerty responding?
This will be the biggest feature (not in work, but in impact) since Dual Pane...

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 19:18
by TheQwerty
Zero is an appropriate number of hopes.
I'm noticing no difference between .0225 and .0226.
(EDIT: It might be loading a tiny bit better, but not quite as well as .0217 was.)

Adobe sucks...

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 19:56
by admin
Conc Adobe sucks: Even the bulky XYplorerHelp.pdf loads here instantaneously in the preview. PDF-XChange, hooray!

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 20:18
by TheQwerty
Using XYplorerHelp.pdf:
.0226 takes ~15 seconds
.0200 takes <2 seconds (about the same as WE)


Just discovered that .0226 appears to have broken Office previews - I only get thumbs if present otherwise "Cannot preview".

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 20:22
by admin
TheQwerty wrote: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.)
Okay, conclusions:

1) If unloading is the causing the crashes then I will stop doing it! The cost will be a couple of bytes in the memory, better than a crash. They will be freed when closing the app. (Not sure if the latter will work or lead to a crash-on-exit, we'll see.)

2) Using something like prevhost.exe to protect the main app from 3rd party surprises is a cool trick. I can always come back to the strategy if necessary.

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 20:40
by nerdweed
I use FoxIt, PDF XChange Viewer and Sumatra but all in a portable mode (PFA rocks), so naturally XY doesn't use them.

Windows Explorer opens them in Edge so shouldn't XY to use Edge to preview it (probably the bitness prevents it)

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 20:42
by admin
nerdweed wrote:I use FoxIt, PDF XChange Viewer and Sumatra but all in a portable mode (PFA rocks), so naturally XY doesn't use them.

Windows Explorer opens them in Edge so shouldn't XY to use Edge to preview it (probably the bitness prevents it)
So you get no PDF preview at all in XY? Did you get one before (say in 16.00.0200)?

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 20:56
by nerdweed
I try to keep much more distance from Adobe (I had disabled pdf from previewed formats).

Just tried 16.00.0108 (fresh) and it gives me a File download dialog (even after unblocking the file and one of the reasons I disabled it from previewed formats), if I click open, it opens in Edge and XY's preview goes completely white.

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 21:07
by admin
Cruel.

That leaves me out of ideas for now.

(I just tried the idea to simply NOT unload the handler, but as I already feared: XY will crash on exit then and hang on forever in memory like an invisible zombie. Sigh.)

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 21:30
by Linkaday
Sorry, no help from here. PDF XChange Viewer installed (win 7.1 64-bit) - so every beta since Preview 2.0 rendered PDF just fine and fast. Browsing a bunch of bulkier PDFs to test 0206 just now, i noticed a little oddity only. When i deselect a PDF by clicking white, preview falls back to the latest HTML file previewed some time before. And HTML only. Presumably related to TheQwerty's observations on handlers.

I have another one on HTML - after a little more inspection will use generic thread not to contaminate this one.

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 21:33
by admin
Oddity confirmed. Has nothing to do with the PDF issue. It's my own private bug. Easy to fix.

Re: Preview 2.0 - PDF Related Crash

Posted: 03 Dec 2015 23:19
by sinilill
I'm using Win 10 x64, latest XY beta and Acrobat Reader DC, but I get no preview for PDF files, just says "! Cannot preview." With older versions of XY I had no problems previewing PDF files.

Would it be possible to use a portable version of Sumatra/PDF-XChange to get previews for PDF's?

Re: Preview 2.0 - PDF Related Crash

Posted: 04 Dec 2015 08:27
by admin
sinilill wrote:I'm using Win 10 x64, latest XY beta and Acrobat Reader DC, but I get no preview for PDF files, just says "! Cannot preview." With older versions of XY I had no problems previewing PDF files.

Would it be possible to use a portable version of Sumatra/PDF-XChange to get previews for PDF's?
1) I have a plan how to handle this. You will be able to configure how PDFs are previewed. I see no other way, and, hell, it might even be an advantage to have an option here.

2) No. The PDF viewer must register a preview handler for Preview 2.0 to work.

Re: Preview 2.0 - PDF Related Crash

Posted: 05 Dec 2015 14:28
by admin
Bug fixed! And I don't need to upload a new version for the fix. :biggrin: See yourself:

Code: Select all

    ! Preview 2.0: Crash related to PDF previews. Fix #5. This time it's fixed 
      for good, and the fix is not in my code. Simply upgrade to the latest 
      PDF-XChange Viewer (2.5.315.0) and all is good.
      All previous fix attempts have been undone.
      If you are getting bugs with Adobe (Adobe Acrobat Reader installed in your 
      system) then your solution is: Uninstall it and change to PDF-XChange 
      Viewer. Experience says that Adobe will never fix their bugs.

Re: Preview 2.0 - PDF Related Crash

Posted: 05 Dec 2015 17:20
by klownboy
Don, is there any need or value in updating to PDF-XChange Viewer (2.5.315.0)? I'm not experiencing any issues with your new Preview 2.0 and I'm still using 2 year old PDF-XChange Viewer 2.5 Build 214 - dated Dec 30 2013. I ask only because some users experienced issues upgrading (e.g., thumbnails), but that may have been using their Editor if I recall correctly. So if that's the case, updating to the latest Viewer shouldn't be a problem...hopefully. Thanks.