Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locked up after cancelled Print command #650

Closed
bkidwell opened this issue Oct 3, 2019 · 11 comments · May be fixed by antitree/trilium#40
Closed

Locked up after cancelled Print command #650

bkidwell opened this issue Oct 3, 2019 · 11 comments · May be fixed by antitree/trilium#40

Comments

@bkidwell
Copy link

bkidwell commented Oct 3, 2019

Summary: Print Note; cancel print; UI is locked up now
Expected result: If you cancel the desktop Print dialog box, Trilium should resume operation normally.

I activated Note Actions → Print Note, then I decided to cancel the Print action. Most of the UI is locked up now. The following things are not responding to input events:

  • navigation tree
  • Note Actions button
  • shortcuts toolbar at top
  • everything else I try that isn't the CKEditor frame

I shut down Trilium and restarted it and I was able to immediately experience the same failure in the same way again. Log entries from the last attempt are attached.

"appVersion": "0.34.3" -- Windows desktop build (also 0.35.1; see below comment from bkidwell)
trilium.log

@zadam
Copy link
Owner

zadam commented Oct 3, 2019

Hello, thanks for the report.

I can't reproduce it (testing on 0.35.1). Did you try perhaps on a different note in case it was perhaps something note content specific?

@bkidwell
Copy link
Author

bkidwell commented Oct 4, 2019

I'll try it with 0.35.1 in a few days, and do my best to find any example test cases that change my result, or any other evidence I can gather. Feel free to reply and ask where I went if it's been a week. :^)

@bkidwell
Copy link
Author

bkidwell commented Oct 8, 2019

I upgraded to the latest release "trilium-windows-x64-0.35.1.zip" and tried it again, and I got the same result.

The page has only a title and one paragraph on it. The selected printer when I CANCELLED the print request was "Microsoft Print to PDF".

I'm running Windows 10 Enterprise 64-bit build 17134.

I didn't try this on another OS platform; I assume if it's a cross-platform issue someone else would have noticed already.

Is there anything else I can say that will help diagnose or make the problem reproducible?

Log file: trilium-2019-10-08.log
Screenshot of the page I tried to print: sandbox-page
Notebook subtree containing the page I tried to print: notebook.tar.zip

@zadam
Copy link
Owner

zadam commented Oct 8, 2019

Hmm, I see. For me print works fine in windows 10 64 bit as well, also tested with Microsoft Print to PDF.

Not sure what this could be, but I'll try to experiment a bit.

@bkidwell
Copy link
Author

bkidwell commented Oct 8, 2019

This problem is about choosing the Print command and then CANCELING the request -- Doing so causes everything but the CKEditor widget in Trilium to lock up and stop responding. Did you cancel a print command?

@zadam
Copy link
Owner

zadam commented Oct 8, 2019

Oh, I see, I have overlooked that "cancel" ... so yeah, I can reproduce this problem. Happens only in the desktop version and it turns out it's a bug in electron - electron/electron#20426

@bkidwell
Copy link
Author

bkidwell commented Oct 8, 2019

Wow. So it's been broken in Electron all summer in Electron 5. And no one reported it until this week? I'm glad you easily found the apparent source of the problem.

@TerrapinSoftware
Copy link

Easy to reproduce with the electron-quick-start repo. Just add this line to index.html:

<button onclick="window.print()">Click me</button>

Then click the button and choose Cancel. Try to click that button again. No reaction. Also, the devtools breakpoints do not work anymore. Try to set an event listener breakpoint on the click event...

Please increase the priority of this bug. Every electron app that supports printing cal fall victim to complete data loss!

@zadam
Copy link
Owner

zadam commented Oct 11, 2019

@TerrapinSoftware this should be probably send to the bug in the electron repo, not here ...

@TerrapinSoftware
Copy link

Ah yes. Sorry. Done. Added comment to electron bug #20426.

@zadam
Copy link
Owner

zadam commented Mar 8, 2020

This is now fixed in master with new electron.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants