[Debian-astro-maintainers] Bug#933440:

Filip Hroch hroch at physics.muni.cz
Fri Aug 2 17:50:16 BST 2019


> 
> Perhaps post a backtrace and maybe somebody can help?

The crash can be encountered during startup, when a FITS file [1] 
is passed as an argument. This is the second regular way for the
launch: users can pass the file, or double click in a graphical 
file manager:

--------------------------------------------------------------
debian:/tmp$ gdb /scratch/opt/bin/xmunipack

....

Reading symbols from /scratch/opt/bin/xmunipack...done.
(gdb) run --verbose m27_01R.fits
Starting program: /scratch/opt/bin/xmunipack --verbose m27_01R.fits
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-
gnu/libthread_db.so.1".
[New Thread 0x7fffe748d700 (LWP 11555)]
[New Thread 0x7fffe6c8c700 (LWP 11556)]
[New Thread 0x7fffe5fce700 (LWP 11557)]
Debug: FitsTone::Setup 35468 11 0.250000
[New Thread 0x7fffe57cd700 (LWP 11558)]
[New Thread 0x7fffe4ecc700 (LWP 11559)]
Debug: Median=2938.000000 MAD=29.000001 Black=2912.000000
Qlight=902.301575 n=5968

Debug: MuniView::OnLoadFinish
[Thread 0x7fffe5fce700 (LWP 11557) exited]
Debug: MuniDisplayCanvas constructor..

Thread 1 "xmunipack" received signal SIGSEGV, Segmentation fault.
0x00007ffff6322650 in g_type_check_instance_cast ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) where
#0  0x00007ffff6322650 in g_type_check_instance_cast ()
   from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1  0x00007ffff7c13c33 in wxWindow::GTKApplyWidgetStyle(bool) ()
   from /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#2  0x00007ffff7c1c61c in wxWindow::SetBackgroundColour(wxColour const&)
()
   from /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#3  0x00005555557b49a9 in mpWindow::mpWindow (this=0x555556052480,
    parent=0x555555ff8000, id=-1, pos=..., size=..., flag=0)
    at mathplot.cpp:1193
#4  0x000055555573b9e9 in MuniPlotHisto::MuniPlotHisto
(this=0x555556052480,
    w=0x555555ff8000) at plot.cpp:85
#5  0x00005555556db476 in MuniDisplayPanel::MuniDisplayPanel (
    this=0x555555ff8000, w=0x555555f33800, c=0x555555b3dcd0)
    at dispanel.cpp:136
#6  0x00005555556c36a8 in MuniDisplay::MuniDisplay (this=0x555555f33800,
    w=0x555555dd4c00, c=0x555555b3dcd0) at display.cpp:45
#7  0x00005555556a710b in MuniView::SetupPlaces (this=0x555555dd4c00)
    at view.cpp:591
#8  0x00005555556a68c9 in MuniView::OnLoadFinish (this=0x555555dd4c00,
    event=...) at view.cpp:554
#9  0x00007ffff789d7ae in
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#10 0x00007ffff789db2a in
wxEvtHandler::SearchDynamicEventTable(wxEvent&) ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff789dbc0 in wxEvtHandler::TryHereOnly(wxEvent&) ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007ffff789dc73 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x00007ffff789dd11 in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#14 0x00007ffff789e6b4 in wxEvtHandler::ProcessPendingEvents() ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#15 0x00007ffff773b87f in wxAppConsoleBase::ProcessPendingEvents() ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#16 0x00007ffff7bd99d9 in wxApp::DoIdle() ()
   from /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#17 0x00007ffff7bd9ad3 in ?? ()
   from /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#18 0x00007ffff621bdd8 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff621c1c8 in ?? () from /lib/x86_64-linux-gnu/libglib-
2.0.so.0
#20 0x00007ffff621c4c2 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff681bb15 in gtk_main () from /lib/x86_64-linux-gnu/libgtk-
3.so.0
#22 0x00007ffff7bf61d5 in wxGUIEventLoop::DoRun() ()
--Type <RET> for more, q to quit, c to continue without paging--
   from /lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#23 0x00007ffff777348d in wxEventLoopBase::Run() ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#24 0x00007ffff773c616 in wxAppConsoleBase::MainLoop() ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#25 0x00007ffff77bdcf9 in wxEntry(int&, wchar_t**) ()
   from /lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#26 0x000055555565766e in main (argc=3, argv=0x7fffffffe128)
    at xmunipack.cpp:38
(gdb)

---------------------------------------------------------------

The crash at point of mathplot.cpp:1193 occurs when the perfectly
regular command

  SetBackgroundColour( *wxWHITE );

is executed. If the command is commented out, the crash
is moved to mpWindow::~mpWindow() destructor. A play with
DelAllLayers(), even UpdateAll(), did not shown any advance.

Some notes:

* The part plots a histogram with a distribution of image counts.
* wxMatplotlib included in Munipack is modified code of [2].
* The code has been worked for many years with previous wx versions.
* By my opinion, the symptoms are commonly related on incorrect 
  memory handling; it can be my mistake.
* The uncertainty is also confirmed by Valgrind.

I used a development branch, which is configured as

./configure FCFLAGS="-Wall -g -p -no-pie -fcheck=all -fimplicit-none
-fbacktrace -ffpe-trap=invalid,zero,overflow -I/scratch/opt/include"
CFLAGS="-Wall -g -p"  CXXFLAGS="-D__WXDEBUG__ -g -p -Wall -fbounds-
check" LDFLAGS="-L/scratch/opt/lib" --prefix=/scratch/opt --enable-
bundle BUNDLEDIR=/scratch/opt GUI_CXXFLAGS="`wx-config --toolkit=gtk3  -
-cxxflags`" GUI_LIBS="`wx-config --toolkit=gtk3 --libs
core,base,net,xml,adv,qa,html --optional-libs webview`"
CLI_CXXFLAGS="`wx-config --toolkit=gtk3 --cxxflags base`" CLI_LIBS="`wx-
config --toolkit=gtk3  --libs base`" VO_CXXFLAGS="`wx-config --
toolkit=gtk3  --cxxflags base,net,xml`" VO_LIBS="`wx-config --
toolkit=gtk3  --libs base,net,xml`"


I tried to locate, or to solve, the trouble, without any conclusion 
over half of day, so being annoyed, I postponed the solution. My 
plans are: to move the histogram in another place improving visual 
look of the application. If the crash will be still occurs, I will to
install the development branch of wxGTK, to develop of a workaround, 
or to replace of wxMathPlot by another toolkit.

By any way, I'll review of the code to fine tune of the broken down
design of the application.

Thanks for any ideas,
FH
---
[1] ftp://munipack.physics.muni.cz/pub/munipack/munipack-data-m27.tar.gz
[2] http://wxmathplot.sourceforge.net/
---
F. Hroch              e-mail: hroch at physics.muni.cz, tel.: +420549494470
Dept. of theor. physics and astrophysics, MU Brno, Kotlarska 2,CZ-611 37



More information about the Debian-astro-maintainers mailing list