Using latest xmgrace and openmotif-2.3.0-r3 I can open the 'print setup' window and choose to print to file, but when told to print, the program does not produce any output file, be it ps,eps,pdf,jpg or anything else. Upgrading to openmotif-2.3.1 makes the program crash as soon as one opens the print setup window (or many other things such as changing axes properties for what matters) Previous version of grace did crash with openmotif-2.3.1, but could print to file using openmotif-2.3.0 Reproducible: Always Steps to Reproduce: 1. try to print to file any grace project
Created attachment 161177 [details] xmgrace -v
Created attachment 161179 [details] emerge --info
I can confirm this problem with openmotif. The issue seems to be related to bug 1381 on openmotif's bug tracker. I've cc'd the openmotif maintainer and will post a patch for openmotif below that fixes the issue for me. Please give it a shot and report back. Thanks, Markus
Created attachment 161350 [details, diff] possible for fix for print dialog crash
hi, the patch does indeed fix the problem for me, no more crashing with grace 5.1.21 and 5.1.22, thank you ! BUT grace-5.1.22 still doesn't print to file. no error messages, it just produces no output when told to print. grace 5.1.21-r1 works fine instead. thanks again
(In reply to comment #5) > hi, the patch does indeed fix the problem for me, no more crashing with grace > 5.1.21 and 5.1.22, thank you ! > Great, at least one bug is gone! We'll have to wait for the maintainer of openmotif to have a look at the fix and decide if this can be added to the current ebuild. I don't know openmotif well enough to judge its impact. > BUT grace-5.1.22 still doesn't print to file. no error messages, it just > produces no output when told to print. grace 5.1.21-r1 works fine instead. > thanks again That's probably unrelated to the crash and I can reproduce it. Printing itself seems to work fine. I'll have a look. Best, Markus
> We'll have to wait for the maintainer of openmotif to have a look at the > fix and decide if this can be added to the current ebuild. I don't know > openmotif well enough to judge its impact. The fix for upstream bug report 1381 is needed (at least) for our bug 210220, so we cannot simply disable it. Does the patch attached at the upstream bug report fix the problem? <http://bugs.motifzone.net/showattachment.cgi?attach_id=156>
yes this other patch seems to work too, grace doesn't crash.
(In reply to comment #8) > yes this other patch seems to work too, grace doesn't crash. > Yes, the patch seems to fix the crashing for me as well. Thanks, Markus
> > yes this other patch seems to work too, grace doesn't crash. > > Yes, the patch seems to fix the crashing for me as well. In CVS as openmotif-2.3.1-r1.
(In reply to comment #10) > In CVS as openmotif-2.3.1-r1. > Thank you very much! Hopefully I will be able to track down why printing to a file is still broken. Best, Markus
I can print to file with no problems. I am using F8+ but I build my own grace and openmotif. The only patch that relates to print to a file is my tmpnam patch, which I don't remember where I got it from.
Created attachment 161406 [details, diff] Patch for tmpnam
> Patch for tmpnam > Okay, disclaimer: I have little to no knowlegde of C programming, patching and everything related. I just mess around cluelessy ! BUT, I tried reverting the patch you posted and I noted it didn't apply cleanly, since the file plotone.c was slightly different, ie. the prstream = grace_openw(fname); line was inside the previous IF, while in your patch it was right outside. So just for the sake of it I tried changing that simple line putting it outside. I mean, i applied --- plotone.c 2008-07-26 16:03:23.000000000 +0200 +++ plotone.c 2008-07-26 16:04:45.000000000 +0200 @@ -119,9 +119,9 @@ if (print_file[0] == '\0') { Device_entry dev = get_device_props(hdevice); sprintf(print_file, "%s.%s", get_docbname(), dev.fext); - prstream = grace_openw(fname); } strcpy(fname, print_file); + prstream = grace_openw(fname); } else { int hdfd; s = get_print_cmd(); to grace-5.1.22 ebuild, rebuilt it and now printing to file /seems/ to work. I don't know why, of course. Hope this helps in some way :)
(In reply to comment #14) > > Patch for tmpnam > > > > Okay, disclaimer: I have little to no knowlegde of C programming, patching and > everything related. I just mess around cluelessy ! > > BUT, I tried reverting the patch you posted and I noted it didn't apply > cleanly, since the file plotone.c was slightly different, ie. the > prstream = grace_openw(fname); > line was inside the previous IF, while in your patch it was right outside. So > just for the sake of it I tried changing that simple line putting it outside. > I mean, i applied > > --- plotone.c 2008-07-26 16:03:23.000000000 +0200 > +++ plotone.c 2008-07-26 16:04:45.000000000 +0200 > @@ -119,9 +119,9 @@ > if (print_file[0] == '\0') { > Device_entry dev = get_device_props(hdevice); > sprintf(print_file, "%s.%s", get_docbname(), dev.fext); > - prstream = grace_openw(fname); > } > strcpy(fname, print_file); > + prstream = grace_openw(fname); > } else { > int hdfd; > s = get_print_cmd(); > > to grace-5.1.22 ebuild, rebuilt it and now printing to file /seems/ to work. I > don't know why, of course. Hope this helps in some way :) > Great job and you hit the nail on the head! There was indeed a bug in our grace-5.1.22-mkstemp.patch that probably sneaked its way in during porting from the original debian patch. I've fixed it and revision bumped to grace-5.1.22-r1. Printing seem to work fine again. Thanks to you all for your help. Best, Markus
I upgraded to -r1 and everything seems to work fine. Thanks everyone for your great support !