I’ve been trying to get some simple printing to function under Linux… Ubuntu 14.04
Printing works for other applications and apps built with Xojo 2014r2.1 just fine, but 2015r4 gives me segfaults… (32bit and 64bit)
kernel: [553404.150697] DebugMyApplicat[2669]: segfault at f756f18c ip 00000000f742dcdf sp 00000000fffaf5bc error 7 in XojoGUIFramework32.so[f6f4f000+614000]
It’s very consistent. Fails 100% of the time.
I’m wondering if some library requirement or compatibility may have changed, or do I file a bug report?
Anybody printing successfully on Linux?
Not yet. I thought I should check that it wasn’t something obvious (and sleep on it).
Dim g As Graphics
g = OpenPrinter()
g.drawrect(0,0,100,100)
The openPrinter call causes the debugger to exit back to normal app execution until the window where it was called from is closed. At that point the app crashes with the segfault.
At first I thought printing was just failing and my project must have a crash somewhere else, but it happens in a new project with just the code above in a pushbutton’s action.
StyledTextPrinter does not work either in Linux. (Xojo 2015R1)
Dim stp As StyledTextPrinter
Dim g As Graphics
g = OpenPrinterDialog
If g <> Nil Then
Dim textWidth As Integer = 72 * 7.5
stp = main.fld.StyledTextPrinter(g, textWidth)
stp.DrawBlock(0, 0, 72*10) // --> crash here
End If
Return True