jgraph / drawio-desktop

Official electron build of draw.io
https://www.diagrams.net
Apache License 2.0
50.05k stars 4.97k forks source link

Cannot print from Draw.io on Ubuntu 22.04.4 LTS #1677

Open jonathanhirschman opened 6 months ago

jonathanhirschman commented 6 months ago

Preflight Checklist

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

Describe the bug Printing on Ubuntu 22.04 LTS results in program freeze. The only option is to Force Quit once that option appears. This may be related to bug #1569

To Reproduce Steps to reproduce the behavior:

  1. Start Draw.io
  2. Click on 'Create New Diagram' 3.Click on 'Blank Diagram', then 'Create'
  3. Add shape - expand 'General', then click on 'Rectangle'
  4. Click on document background to deselect any objects
  5. Set Paper Size to 'US-Letter...' in 'Diagram' tab
  6. Select 'Print' from 'File' menu
  7. Click on 'OK'

Expected behavior Printing, either to printer, or to file, should function.

Screenshots image

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

Additional context Installed using .deb file, with following commands:

sudo dpkg -i ./drawio-amd64-24.1.0.deb 
sudo apt-get install -f

Additionally, using GNOME 42.9, running on X11.

davidjgraph commented 4 months ago

Can you print to file?

jonathanhirschman commented 4 months ago

Can you print to file?

I can't get far enough to select that option - program locks up immediately after print dialog pops up. This is still happening after upgrades through 24.4.0.

davidjgraph commented 3 months ago

I can't repeat this. I'll leave it open, but unless someone with the right environment can repeat and wants to investigate, it's very unlikely to be looked at.

jonathanhirschman commented 3 months ago

I can investigate :smile:

I uninstalled the deb package previously installed: $ sudo dpkg -P draw.io

I reinstalled: $ sudo dpkg -i ./drawio-amd64-24.4.13.deb

Running the app from the command line: $ drawio Checking for beta autoupdate feature for deb/rpm distributions Found package-type: deb

Then placed a shape and attempted to print to PDF: `Crashing due to FD ownership violation:

0 0x59076d8e8b03

1 0x59076d8e0c0c

2 0x59076d8e0bc7 close

3 0x7d49d4694ef3 `

FYI. I have some print functionality from the community flatpak version, but it's old. Snap version doesn't see printers at all.

jonathanhirschman commented 3 months ago

I did some more research. The issue is related to Electron and networked printers (which is what I use): https://github.com/electron/electron/issues/31151

FYI, and probably explains why you cannot reproduce.

davidjgraph commented 3 months ago

Thanks for the research, it does indeed look like https://github.com/electron/electron/issues/31151.