Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232742 - sci-visualization/grace-5.1.22 does not print to file (using openmotif-2.3.0x) and crashes w/ openmotif-2.3.1
Summary: sci-visualization/grace-5.1.22 does not print to file (using openmotif-2.3.0x...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 11:04 UTC by Stefano Carignano
Modified: 2008-07-27 08:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xmgrace -v (gracev.txt,629 bytes, text/plain)
2008-07-23 11:05 UTC, Stefano Carignano
Details
emerge --info (einfo.txt,3.16 KB, text/plain)
2008-07-23 11:07 UTC, Stefano Carignano
Details
possible for fix for print dialog crash (openmotif-2.3.1-xmgrace_crash_fix.patch,391 bytes, patch)
2008-07-25 15:23 UTC, Markus Dittrich (RETIRED)
Details | Diff
Patch for tmpnam (grace_5.1.20-tmpnam.patch,1.43 KB, patch)
2008-07-26 11:45 UTC, Sammy Umar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Carignano 2008-07-23 11:04:16 UTC
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
Comment 1 Stefano Carignano 2008-07-23 11:05:46 UTC
Created attachment 161177 [details]
xmgrace -v
Comment 2 Stefano Carignano 2008-07-23 11:07:00 UTC
Created attachment 161179 [details]
emerge --info
Comment 3 Markus Dittrich (RETIRED) gentoo-dev 2008-07-25 15:22:54 UTC
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 
Comment 4 Markus Dittrich (RETIRED) gentoo-dev 2008-07-25 15:23:54 UTC
Created attachment 161350 [details, diff]
possible for fix for print dialog crash
Comment 5 Stefano Carignano 2008-07-25 17:25:06 UTC
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

Comment 6 Markus Dittrich (RETIRED) gentoo-dev 2008-07-25 20:13:21 UTC
(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
Comment 7 Ulrich Müller gentoo-dev 2008-07-25 20:55:26 UTC
> 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>
Comment 8 Stefano Carignano 2008-07-25 21:30:36 UTC
yes this other patch seems to work too, grace doesn't crash.
Comment 9 Markus Dittrich (RETIRED) gentoo-dev 2008-07-25 21:56:27 UTC
(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
Comment 10 Ulrich Müller gentoo-dev 2008-07-25 22:45:48 UTC
> > 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.
Comment 11 Markus Dittrich (RETIRED) gentoo-dev 2008-07-26 09:57:55 UTC
(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
Comment 12 Sammy Umar 2008-07-26 11:44:51 UTC
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.
Comment 13 Sammy Umar 2008-07-26 11:45:57 UTC
Created attachment 161406 [details, diff]
Patch for tmpnam
Comment 14 Stefano Carignano 2008-07-26 14:23:48 UTC
> 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 :)


Comment 15 Markus Dittrich (RETIRED) gentoo-dev 2008-07-26 17:04:46 UTC
(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
Comment 16 Stefano Carignano 2008-07-27 08:24:53 UTC
I upgraded to -r1 and everything seems to work fine. Thanks everyone for your great support !