Bug 214395

Summary: print/xpp cannot access "options" window
Product: Ports & Packages Reporter: denverh
Component: Individual Port(s)Assignee: Cy Schubert <cy>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: rene, w.schwarzenfeld
Priority: --- Flags: bugzilla: maintainer-feedback? (cy)
Version: Latest   
Hardware: amd64   
OS: Any   

Description denverh 2016-11-10 15:50:11 UTC
If you click the "options" button, xpp will panic with a memory fault.
This happens with xpp-1.5_12, on FreeBSD 11.0-RELEASE-p1 r308115

Steps to reproduce:
  1. start xpp from the command line with no additional parameters
  2. click the "options" button
Actual results:
  xpp will panic with a memory fault
Expected result:
  xpp should display the options window

The "print" and "instances" buttons both work as they should.

Here's a gdb backtrace:
(gdb) thread apply all bt

Thread 1 (Thread 807e16000 (LWP 100134/<unknown>)):
#0  printFiles::buildOptionWidgets (this=0x0) at xpp.cxx:433
#1  0x000000004a83fff2 in ?? ()
#2  0x0000000000000012 in ?? ()
#3  0x00007fffffffdfe0 in ?? ()
#4  0x00007fffffffdff0 in ?? ()
#5  0x00007fffffffdfec in ?? ()
#6  0x00007fffffffdfe8 in ?? ()
#7  0x00007fffffffdfe4 in ?? ()
#8  0x0000000807e58d80 in ?? ()
#9  0x0000002400000012 in ?? ()
#10 0x0000000900000012 in ?? ()
#11 0x7474654c00000000 in ?? ()
#12 0x0000000000007265 in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb) 

Thanks
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2016-12-15 20:48:44 UTC
Hmmm. I get under -CURRENT:

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 33616000 (LWP 102193/xpp)]
0x0000000000417909 in printFiles::getPageMargins (this=0x3366d000, 
    top=@0x7fffffffdb64, bottom=@0x7fffffffdb60, left=@0x7fffffffdb5c, 
    right=@0x7fffffffdb58, length=@0x7fffffffdb54, width=@0x7fffffffdb50)
    at xpp.cxx:1575
1575	    getPageMargins(top, bottom, left,right, length, width, orientation);
(gdb) bt
#0  0x0000000000417909 in printFiles::getPageMargins (this=0x3366d000, 
    top=@0x7fffffffdb64, bottom=@0x7fffffffdb60, left=@0x7fffffffdb5c, 
    right=@0x7fffffffdb58, length=@0x7fffffffdb54, width=@0x7fffffffdb50)
    at xpp.cxx:1575
#1  0x00000000004086c3 in xppMainWindow::xppOptionDialog (this=0x3364f000)
    at mainwindow.cxx:1271
#2  0x000000000040d21d in xppMainWindow::cb_Options_i (this=0x3364f000)
    at mainwindow.cxx:56
#3  0x000000000040410c in xppMainWindow::cb_Options (o=0x33615980, v=0x0)
    at mainwindow.cxx:59
#4  0x000000002d24a308 in Fl_Widget::do_callback ()
   from /usr/local/lib/libfltk.so.1.3
#5  0x000000002d1f4f95 in Fl_Button::handle ()
   from /usr/local/lib/libfltk.so.1.3
#6  0x000000002d1ed561 in Fl::handle_ () from /usr/local/lib/libfltk.so.1.3
#7  0x000000002d251566 in fl_handle () from /usr/local/lib/libfltk.so.1.3
#8  0x000000002d24ef2f in do_queued_events ()
   from /usr/local/lib/libfltk.so.1.3
#9  0x000000002d24eea7 in fl_wait () from /usr/local/lib/libfltk.so.1.3
#10 0x000000002d1ebef3 in Fl::wait () from /usr/local/lib/libfltk.so.1.3
#11 0x000000002d1ec04d in Fl::run () from /usr/local/lib/libfltk.so.1.3
#12 0x000000000041d317 in main (argc=1, argv=0x7fffffffe560) at xppmain.cxx:54
Comment 2 denverh 2017-01-06 18:41:31 UTC
So what do you think?  I don't have much experience with gdb.  Getting a trace is about my limit.  Does your xpp also panic instead of exiting normally after printing something?  Mine does.  See bug 214394.  The trace I supplied with that one looks something like yours, but when I tried repeating it again just now I got something similar to the one I included here: lots of ??.

Do you have any ideas about what to do next?

Thanks,

Denver
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-01-14 03:41:30 UTC
Is this still relevant?
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2018-01-14 05:37:01 UTC
Now a bus error with a corrupt stack. Will need to see if using gcc instead of clang makes a difference. Also, -CURRENT just got clang 6. We should try that as well.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2018-01-14 05:37:21 UTC
(In reply to w.schwarzenfeld from comment #3)
Why wouldn't it be?
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-01-14 05:43:51 UTC
Ok, overllooked clang6, thanks.
Comment 7 Rene Ladan freebsd_committer freebsd_triage 2020-06-30 09:45:01 UTC
Expired port removed.