Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 232742
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Science Related Packages <sci@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Stefano Carignano <scary.moo@libero.it>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
gracev.txt xmgrace -v text/plain Stefano Carignano 2008-07-23 11:05 0000 629 bytes Details
einfo.txt emerge --info text/plain Stefano Carignano 2008-07-23 11:07 0000 3.16 KB Details
openmotif-2.3.1-xmgrace_crash_fix.patch possible for fix for print dialog crash patch Markus Dittrich 2008-07-25 15:23 0000 391 bytes Details | Diff
grace_5.1.20-tmpnam.patch Patch for tmpnam patch Sammy Umar 2008-07-26 11:45 0000 1.43 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 232742 depends on: Show dependency tree
Bug 232742 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-07-23 11:04 0000
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 From Stefano Carignano 2008-07-23 11:05:46 0000 -------
Created an attachment (id=161177) [details]
xmgrace -v 

------- Comment #2 From Stefano Carignano 2008-07-23 11:07:00 0000 -------
Created an attachment (id=161179) [details]
emerge --info

------- Comment #3 From Markus Dittrich 2008-07-25 15:22:54 0000 -------
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 From Markus Dittrich 2008-07-25 15:23:54 0000 -------
Created an attachment (id=161350) [details]
possible for fix for print dialog crash

------- Comment #5 From Stefano Carignano 2008-07-25 17:25:06 0000 -------
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 From Markus Dittrich 2008-07-25 20:13:21 0000 -------
(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 From Ulrich Müller 2008-07-25 20:55:26 0000 -------
> 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 From Stefano Carignano 2008-07-25 21:30:36 0000 -------
yes this other patch seems to work too, grace doesn't crash.

------- Comment #9 From Markus Dittrich 2008-07-25 21:56:27 0000 -------
(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 From Ulrich Müller 2008-07-25 22:45:48 0000 -------
> > 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 From Markus Dittrich 2008-07-26 09:57:55 0000 -------
(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 From Sammy Umar 2008-07-26 11:44:51 0000 -------
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 From Sammy Umar 2008-07-26 11:45:57 0000 -------
Created an attachment (id=161406) [details]
Patch for tmpnam

------- Comment #14 From Stefano Carignano 2008-07-26 14:23:48 0000 -------
> 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 From Markus Dittrich 2008-07-26 17:04:46 0000 -------
(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 From Stefano Carignano 2008-07-27 08:24:53 0000 -------
I upgraded to -r1 and everything seems to work fine. Thanks everyone for your
great support ! 

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug