Print (to hardware printer) bottom doesn't work on GUI

Dear experts

I tried to print canvas directly to printer but a seg fault occurred.

*** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TGPrintDialog::GetPrinters() (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TGPrintDialog::TGPrintDialog(TGWindow const*, TGWindow const*, unsigned int, unsigned int, char**, char**, int*, unsigned int) (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TRootCanvas::PrintCanvas() (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TRootCanvas::ProcessMessage(long, long, long) (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TGMainFrame::HandleClientMessage(Event_t*) (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TGFrame::HandleEvent(Event_t*) (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TGClient::HandleEvent(Event_t*) (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TGClient::ProcessOneEvent() (no debug info)
[/Users/siyuan/Physics/root/install/lib/libGui.so] TGInputHandler::Notify() (no debug info)
[/Users/siyuan/Physics/root/install/lib/libCore.so] TMacOSXSystem::DispatchOneEvent(bool) (no debug info)
[/Users/siyuan/Physics/root/install/lib/libCore.so] TSystem::InnerLoop() (no debug info)
[/Users/siyuan/Physics/root/install/lib/libCore.so] TSystem::Run() (no debug info)
[/Users/siyuan/Physics/root/install/lib/libCore.so] TApplication::Run(bool) (no debug info)
[/Users/siyuan/Physics/root/install/lib/libRint.so] TRint::Run(bool) (no debug info)
[/Users/siyuan/Physics/root/install/bin/root.exe] main (no debug info)
[/usr/lib/dyld] start (no debug info)

I searched for some information that changing printer information in $ROOTSYS/etc/system.rootrc can make it work. Then I add Mac’s print command lp in to Unix.*.Print.Command, but no thing changed. How can I make it work? I can understand format in this file…


ROOT Version: 6.28.10
Platform: MacOS
Compiler: clang


Hi @Crisps,
thanks for reaching out!
I think that @bellenot could help on this.

Cheers,
Monica

I cannot test on MacOS. @couet can you try and let me know?

I suppose it’s working for you when you do it in two steps:

  1. generate the file on your disk (png or pdf )
  2. launch the print command on that file

?

I tried on Mac with the default command and also I put the lp command it this dialog window (it does not work because I do not have a printer attached), but the pdf file is generated and it does not crash.

Thank you for testing, but I don’t understand what do you mean “put the lp command in this dialog window”. Do you mean $ROOTSYS/etc/system.rootrc? If so can you please show what is written in that file? In my file it’s like:

# Printer settings.
#WinNT.*.Print.Command:      AcroRd32.exe
#Unix.*.Print.Command:       a2ps -P%p --landscape --columns=2 --margin=30 -rf8.0 %f
Unix.*.Print.Command:        lp %f
#Print.Printer:              32-rb20-hp
Print.Directory:            .
Print.FileType:             pdf

I didn’t add printer name because I tried to use lp command directly on terminal without printer name and it worked.

I mean this:

How did you open this window…? If I click “Print” botton in “File” option, ROOT will crash with Seg Fault.

Exactly like that. I clicked Print ... in the File menu in the canvas.

Then it should be something else that caused this…?

Then I do not know I get the GUI window as I showed you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.