Any printer action (e.g. Page Setup) crashes app

This happens in Mint 20 in a VB VM, and also on a raspberry Pi.

If I have no printer set up, then I can run my app and choose Page Setup or try to print (i.e., execute HTMLViewer.Print) and the appropriate dialogues come up and can be examined. Not much can be done without a printer, of course.

So I have the OS detect our ethernet-connected printer, and I make it default printer. I can then print a page from such as Firefox and it works.

However: if I start up my app, or run it with remote-debugging, and do even so much as select Page Setup, the app crashes. Terminates and vanishes immediately. Same thing if I try to print.

Are there any known issues in this department? I couldn’t see anything in Feedback.

Yep - Verified in Feedback - feedback://showreport?report_id=58365

William’s workaround:

William Yu

December 4, 2019 - 9:13pm UTC

I suspect this will only crash when displaying the PageSetupDialog. If instead you bypassed the PageSetup and went straight to the Printer dialog (via PrinterSetup.ShowPrinterDialog) it should work fine. Is that correct? We’ll have to address the PageSetupDialog crashing of course, but wanted to make sure it is only isolated to the PageSetupDialog being shown.

Thanks, @Tim_Jones. For me, this happens whether with Page Setup or with printing itself. My Pi is brand-new, and both the app and the OS are 32-bit (I have no access to any 64-bit software on it). As a comparative neophyte on Pi/Linux, I don’t even know how to get a crash dump.

Unfortunately, that’s part of the problem. When it happens, the app crashes and no debug info is generated. The only thing that you can do is to launch the app and then connect to it via “strace” in a terminal as root (sudo). You can then at least get the strace output.

Have you tried GEdit? The nice thing about open source software is that you can see what other apps are doing. GEdit is close to the API that we’re adopting so it would be nice to see if they have similar issues or not. Firefox chooses a slightly different printing API that we may move to.

Nop issues that I could see. I had to install it on both the Mint VM and my Pi, and ensure that the printer was online before testing. But having done that, I could choose Page Setup and Print Preview in gedit on both platforms as expected).

When my app crashes, the Print Setup and Print panes show briefly before it goes away.

I print from GEdit all the time with no problems. Same with VS Code and quite a few other tools. We have 3 printers - a locally attached Canon, a networked HP Color, and a network attached HP Scanner/Copier/Printer. I can print to all of them.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.