Raspberry Pi and PrinterSetup

I have a print question. I am using a Raspberry Pi 3 and for some unknown reason, it won’t let me print. (I can print with other applications on my Pi without issue.)

However, when I display the “PrinterSetup” box, the “Print Setup” dialog box shows for about a second and then the entire program crashes.

I tried out the code sample on Xojo’s documentation:

Dim settings As String
Dim pageSetup As PrinterSetup
pageSetup = New PrinterSetup
If pageSetup.PageSetupDialog Then
  settings = pageSetup.SetupString
End If

It works fine on my Mac. Yet, the moment I try it on a Raspberry Pi, poof… it’s game over. Hmm. (Also, I tried it on my new Raspberry Pi 4 and it did exactly the same thing too.)

Ideas? Thoughts?

Do you use some basic error handling?

What is the Exception?

If dont, Log the error in app unhandledexception

also find the crash log on the pi if you can and submit that as a bug report to Xojo

if you cant find one try starting the app from the Pi’s terminal app and that may also echo any crash log info

Neat ideas! Thank you.

I tried adding the unhandledexception to my app, as it should reveal what is happening under the hood, but for some unexpected reason, the app is dying before it even gets a chance (it seems) to run the unhandledexception. Wow. The app is only saying “Aborted.” I was hoping it would at least give me a hint as to what is going wrong! :wink: Haha

I tried the command line method too – same result. Hmm.

I have narrowed the crash down to the pageSetup.PageSetupDialog method. I am wondering if the new version (version 10, Buster) of the Raspberry Pi is causing this issue? (I am starting to think that they bustered Xojo. Haha.)

We’ve seen something similar on TargetLinux before: <https://xojo.com/issue/48750>
Printing with current Xojo’s Framework crashes on certain Distributions/Versions, such as Ubuntu 14.04 (32Bit).[quote=453809:@Byron Minick] I am wondering if the new version (version 10, Buster) of the Raspberry Pi is causing this issue?[/quote]
Can you try to run the example projects (in section “printing and reporting”) included with Xojo on a RasPi (v10, Buster)? Do they crash when showing the system’s print dialog(s), too? Can you even reproduce it with a simple example project?

If so, you should add a new Feedback case. Mention specifically that the currently official Raspian version is affected. And mention that it affects other Distributions, too (FB 48750).
If this really affects the current Raspbian (Buster) in general, Xojo needs to look at this… I just can’t confirm since I don’t have such an environment available right now. I understand they don’t want to investigate why it crashes with Ubuntu 14 (32Bit), but should this affect a current Distribution/version - then they have to.

Ah, you have done so already: <https://xojo.com/issue/57404>

And - bad news… it’s, confirmed…
Printing doesn’t work at all for a Xojo built application with Raspbian GNU/Linux 10 (buster).

@Byron Minick - have you tried a different distro such as Armbian or OpenSuSE?

@Tim Jones Good idea. I’ll have to give that a try… :slight_smile: