segfault on exit if built against wxwidgets3.0

Bug #1318207 reported by Andreas Metzler
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
Undecided
Unassigned

Bug Description

Hello,

hugin 2014.0.0 rc2 segfaults when I exit the program if I build hugin against wxwidgets3.0 (instead of 2.8):

----------------
Program received signal SIGSEGV, Segmentation fault.
0xf698e517 in ?? () from /usr/lib/i386-linux-gnu/libwx_gtk2u_adv-3.0.so.0
(gdb) bt
#0 0xf698e517 in ?? () from /usr/lib/i386-linux-gnu/libwx_gtk2u_adv-3.0.so.0
#1 0xf64b9343 in __cxa_finalize ()
   from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#2 0xf6913983 in ?? () from /usr/lib/i386-linux-gnu/libwx_gtk2u_adv-3.0.so.0
#3 0xf7febdcc in ?? () from /lib/ld-linux.so.2
#4 0xf64b8fb1 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#5 0xf64b900d in exit () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#6 0xf649fa6b in __libc_start_main ()
   from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#7 0x080f5b10 in _start ()
----------------

Olly Betts got a diffferent bt in <https://bugs.debian.org/746528>:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000031 in ?? ()
(gdb) bt
#0 0x0000000000000031 in ?? ()
#1 0x00007ffff41c121f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0
#2 0x00007ffff29d4f2f in __cxa_finalize (d=0x7ffff4456fc0)
    at cxa_finalize.c:56
#3 0x00007ffff4154723 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0
#4 0x00007fffffffe210 in ?? ()
#5 0x00007ffff7debf3a in _dl_fini () at dl-fini.c:252
Backtrace stopped: frame did not save the PC

cu Andreas

Revision history for this message
tmodes (tmodes) wrote :

I know that Hugins works fine with wxWidgets 3.0 on Windows and MacOS (the last release was in both cases compiled with wxWidgets 3.0). So the problem is specific to the wxGTK port.
Unfortunately the back trace does not help really further. Some ideas: Does this happens only with Hugin or also with other programs (check ptbatchergui and calibrate_lens_gui, does the wxWidgets samples work without problems?).
Maybe linking with the debug libraries could shed light on the issue.

Revision history for this message
Andreas Metzler (k-launchpad-downhill-at-eu-org) wrote : Re: [Bug 1318207] Re: segfault on exit if built against wxwidgets3.0

On 2014-05-13 tmodes <email address hidden> wrote:
> I know that Hugins works fine with wxWidgets 3.0 on Windows and
> MacOS (the last release was in both cases compiled with wxWidgets
> 3.0). So the problem is specific to the wxGTK port.
> Unfortunately the back trace does not help really further. Some
> ideas: Does this happens only with Hugin or also with other programs
> (check ptbatchergui and calibrate_lens_gui, does the wxWidgets
> samples work without problems?).

Hello,

The other hugin GUI programs do not show the error.

> Maybe linking with the debug libraries could shed light on the issue.

Installing the wx debug packages yields this:

(gdb) bt full
#0 0xf698e517 in ~wxEventTableEntryBase (
    this=0x833101c <wxTreeListCtrl::sm_eventHashTable+20>,
    __in_chrg=<optimized out>) at ../include/wx/event.h:3177
No locals.
#1 ~wxEventTableEntry (this=0x833101c <wxTreeListCtrl::sm_eventHashTable+20>,
    __in_chrg=<optimized out>) at ../include/wx/event.h:3196
No locals.
#2 __tcf_0 () at ../src/generic/treelist.cpp:987
No locals.
#3 0xf64b9343 in __cxa_finalize ()
   from /lib/i386-linux-gnu/i686/cmov/libc.so.6
No symbol table info available.
#4 0xf6913983 in __do_global_dtors_aux ()
   from /usr/lib/i386-linux-gnu/libwx_gtk2u_adv-3.0.so.0
No symbol table info available.
#5 0xf7febdcc in ?? () from /lib/ld-linux.so.2
No symbol table info available.
#6 0xf64b8fb1 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
No symbol table info available.
#7 0xf64b900d in exit () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
No symbol table info available.
#8 0xf649fa6b in __libc_start_main ()
   from /lib/i386-linux-gnu/i686/cmov/libc.so.6
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#9 0x080f5b10 in _start ()
No symbol table info available.

cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

Revision history for this message
tmodes (tmodes) wrote :

Thanks for update. Could you please try if changeset 5e144ef0d7fb fixes the issue?
(I have currently no Linux version of wxWidgets 3.0 running.)

Revision history for this message
Andreas Metzler (k-launchpad-downhill-at-eu-org) wrote :

On 2014-05-16 tmodes <email address hidden> wrote:
> Thanks for update. Could you please try if changeset 5e144ef0d7fb
> fixes the issue?
> (I have currently no Linux version of wxWidgets 3.0 running.)

Hello,

It fixes the crash with wx3.0, thank you. (I have tried tried
2014.0.0rc2 plus this changeset, which applies just with a little bit
of fuzz).

However it breaks building against wx2.8:
[ 54%] Building CXX object src/hugin1/hugin/CMakeFiles/hugin.dir/treelistctrl.cpp.o
/tmp/HUGIN/hugin-2014.0.0/src/hugin1/hugin/treelistctrl.cpp: In member function 'void wxTreeListMainWindow::OnChar(wxKeyEvent&)':
/tmp/HUGIN/hugin-2014.0.0/src/hugin1/hugin/treelistctrl.cpp:3998:48: error: 'WXK_NONE' was not declared in this scope
             int key = event.GetUnicodeKey() != WXK_NONE ? event.GetUnicodeKey() : event.GetKeyCode();
                                                ^
/tmp/HUGIN/hugin-2014.0.0/src/hugin1/hugin/treelistctrl.cpp:4003:36: error: 'wxUniChar' was not declared in this scope
                 m_findStr.Append ((wxUniChar)key);
                                    ^
src/hugin1/hugin/CMakeFiles/hugin.dir/build.make:1365: recipe for target 'src/hugin1/hugin/CMakeFiles/hugin.dir/treelistctrl.cpp.o' failed

cu Andreas

--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

Revision history for this message
tmodes (tmodes) wrote :

Default branch should compile with wx 2.8 again.

After confirmation that all works again, I think this should go also in 2014.0 branch.

Changed in hugin:
status: New → Fix Committed
Revision history for this message
Andreas Metzler (k-launchpad-downhill-at-eu-org) wrote :

On 2014-05-17 tmodes <email address hidden> wrote:
> Default branch should compile with wx 2.8 again.

> After confirmation that all works again, I think this should go also in
> 2014.0 branch.

Thanks, 2014.0.0rc2 + 5e144ef0d7fb + 6022165a79d9 builds for me with both
wx 2.8 and 3.0 and fixes the crash with 3.0.

cu Andreas

--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

Revision history for this message
tmodes (tmodes) wrote :

Thanks for testing. I transplanted the necessary changes also to 2014.0 branch.

Revision history for this message
tduell (tduell-iinet) wrote :

Default branch still fails to build on Fedora 20.
Attempted to build 6621 (365250f51eec) and the build fails with the following error message...
/home/terry/rpmbuild/BUILD/hugin-2014.1.0/src/hugin1/hugin/PanoOperation.cpp:1207:16: error: 'class wxSpinCtrl' has no member named 'SetMax'
     stackSpin->SetMax(pano.getNrOfImages());
                ^
/home/terry/rpmbuild/BUILD/hugin-2014.1.0/src/hugin1/hugin/PanoOperation.cpp:1246:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(size_t i=0; i<stackSize && imgNr<pano.getNrOfImages(); i++)
                               ^
/home/terry/rpmbuild/BUILD/hugin-2014.1.0/src/hugin1/hugin/PanoOperation.cpp: In function 'void PanoOperation::_CleanPanoOperationVector(PanoOperation::PanoOperationVector&)':
/home/terry/rpmbuild/BUILD/hugin-2014.1.0/src/hugin1/hugin/PanoOperation.cpp:1342:21: warning: deleting object of abstract class type 'PanoOperation::PanoOperation' which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]
         delete vec[i];
                     ^
make[2]: *** [src/hugin1/hugin/CMakeFiles/hugin.dir/PanoOperation.cpp.o] Error 1

Cheers,
Terry

Revision history for this message
tduell (tduell-iinet) wrote :

Further to my comment #8, I now realise that this is an unrelated issue, and should have been the subject of a separate bug report, but that is now probably unnecessary as the the problem is now fixed in 6625 (d0dbc6af23fd).

Cheers,
Terry

Changed in hugin:
status: Fix Committed → Fix Released
Revision history for this message
Hoang Le Huu (hoanglehuu) wrote :

Oh, I made mistakes

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.