Bug #352
App crash after drawing refactoring
Status: | Approved | Start date: | 11/13/2012 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | Miroslav Fidler | % Done: | 0% | |
Category: | - | Spent time: | - | |
Target version: | - |
Description
Hi, also, after Draw refactoring, my app crash randomly but quite often; this never happened before.
Here the backtrace (just 2 relevant threads):
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd7142700 (LWP 24192)]
Upp::MemoryFree (ptr=0x300000002)
at /home/massimo/sources/upp-svn/uppsrc/Core/sheap.cpp:336
336 heap.Free(ptr);
----------------------------------------------------------------------------------------------------------------
THREADS:
(gdb) info thread
Id Target Id Frame
- 5 Thread 0x7fffd7142700 (LWP 24192) "TimberStruct" Upp::MemoryFree (
ptr=0x300000002) at /home/massimo/sources/upp-svn/uppsrc/Core/sheap.cpp:336
4 Thread 0x7fffd7df7700 (LWP 24191) "TimberStruct" 0x00007ffff604152d in nanosleep () at ../sysdeps/unix/syscall-template.S:82
3 Thread 0x7fffdd9f6700 (LWP 24187) "pool" pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:215
2 Thread 0x7fffdef12700 (LWP 24186) "gdbus" 0x00007ffff5118303 in GIpoll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>)
at ../sysdeps/unix/sysv/linux/poll.c:87
1 Thread 0x7ffff7fc18c0 (LWP 24185) "TimberStruct"
0x000000000068fa17 in Upp::String0::LFree (this=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/String.cpp:39
----------------------------------------------------------------------------------------------------------------
THREAD #5 (crashing one) :
(gdb) bt
#0 Upp::MemoryFree (ptr=0x300000002)
at /home/massimo/sources/upp-svn/uppsrc/Core/sheap.cpp:336
#1 0x0000000000689387 in RawFree (ptr=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.h:18
#2 Free (this=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.hpp:69
#3 ~Vector (this=0x7fffdc3f0178, in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.h:108
#4 ~Array (this=0x7fffdc3f0170, __in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.h:238
#5 Upp::RichPara::Lines::~Lines (this=0x7fffdc3f0100,
__in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/RichText/ParaType.cpp:215
#6 0x000000000068a4e5 in Del (lim=0x7fffdc3f0e00, ptr=0x7fffdc3f0e00,
this=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.h:163
#7 Upp::Array<Upp::RichPara::Lines>::SetCount (
this=0x1fe4910 <Upp::RichPara::Lines::Cache()::x>, n=1)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.hpp:370
#8 0x000000000068930e in Upp::RichPara::Lines::~Lines (this=0x7fffd7137c48,
__in_chrg=<optimized out>)
---Type <return> to continue, or q <return> to quit---
at /home/massimo/sources/upp-svn/uppsrc/RichText/ParaType.cpp:222
#9 0x0000000000685dd6 in Upp::RichTxt::GetWidth (this=0x7fffd7137e20, st=...)
at /home/massimo/sources/upp-svn/uppsrc/RichText/TxtPaint.cpp:14
#10 0x0000000000557f73 in TimberPainter::CenterVText (
this=this@entry=0x7fffd71382a0, txt=..., p=...)
at /home/massimo/sources/upp-svn/TimberStruct/TimberPainter/TimberPainter.cpp:253
#11 0x00000000005584d1 in TimberPainter::DimVert (this=0x7fffd71382a0, p1=...,
p2=..., hLimit=..., dist=<optimized out>, txt=...)
at /home/massimo/sources/upp-svn/TimberStruct/TimberPainter/TimberPainter.cpp:370
#12 0x0000000000558523 in TimberPainter::DimVert (this=<optimized out>,
p1=..., p2=..., dist=<optimized out>, txt=...)
at /home/massimo/sources/upp-svn/TimberStruct/TimberPainter/TimberPainter.cpp:382
#13 0x00000000004db933 in JointInternalPlate1::DrawJoint (
this=this@entry=0x7fffd733d028, w=w@entry=2645, h=h@entry=-1,
txtSize=txtSize@entry=70, quote=quote@entry=2)
at /home/massimo/sources/upp-svn/TimberStruct/TimberJoints/JointInternalPlate1.cpp:171
#14 0x00000000004dbd0a in JointInternalPlate1::QTFJoint (
---Type <return> to continue, or q <return> to quit---
this=this@entry=0x7fffd733d028, w=w@entry=2645, h=h@entry=-1,
txtSize=txtSize@entry=70, quote=quote@entry=2)
at /home/massimo/sources/upp-svn/TimberStruct/TimberJoints/JointInternalPlate1.cpp:184
#15 0x00000000004dc8d0 in JointInternalPlate1::Calculate (this=0x7fffd733d028)
at /home/massimo/sources/upp-svn/TimberStruct/TimberJoints/JointInternalPlate1.cpp:633
#16 0x00000000004b8a16 in Page::CalcThreadCb (this=0x7fffd733d028)
at /home/massimo/sources/upp-svn/TimberStruct/TimberGui/Page.cpp:167
#17 0x000000000068a96a in operator() (this=0x7fffdc40a840)
at /home/massimo/sources/upp-svn/uppsrc/Core/Cbgen.h:32
#18 Upp::sThreadRoutine (arg=0x7fffdc40a840)
at /home/massimo/sources/upp-svn/uppsrc/Core/Mt.cpp:75
#19 0x00007ffff6039e9a in start_thread (arg=0x7fffd7142700)
at pthread_create.c:308
#20 0x00007ffff5123cbd in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#21 0x0000000000000000 in ?? ()
----------------------------------------------------------------------------------------------------------------
THREAD #1:
(gdb) bt
#0 0x000000000068fa17 in Upp::String0::LFree (this=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/String.cpp:39
#1 0x00000000004a243e in ~DANCombCoeffs (this=0x7fffdc42cbe0,
__in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/TimberStruct/TimberCore/Dan.h:121
#2 Upp::Array<DANCombCoeffs>::Free (this=this@entry=0x7fffdc420650)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.hpp:347
#3 0x00000000004a264c in ~Array (this=0x7fffdc420650,
__in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.h:238
#4 Upp::AMap<Upp::String, DANCombCoeffs, Upp::Array<DANCombCoeffs>, Upp::StdHash<Upp::String> >::~AMap (this=0x7fffdc4205f8, __in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Map.h:2
#5 0x00000000004a2890 in ~ArrayMap (this=0x7fffdc4205f0,
__in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Map.h:156
#6 ~ExtArrayMap (this=0x7fffdc4205f0, __in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/TimberStruct/TimberCore/ExtCore.h:10
#7 DAN::~DAN (this=0x7fffdc4204c0, __in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/TimberStruct/TimberCore/Dan.h:159
#8 0x00000000004a28f8 in Upp::Array<DAN>::Free (
this=this@entry=0x1fee4b8 <globalSettings()::_globalSettings+984>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.hpp:347
#9 0x00000000004a4536 in ~Array (
this=0x1fee4b8 <globalSettings()::_globalSettings+984>,
__in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Vcont.h:238
#10 Upp::AMap<Upp::String, DAN, Upp::Array<DAN>, Upp::StdHash<Upp::String> >::~AMap (this=0x1fee460 <globalSettings()::_globalSettings+896>,
__in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/Map.h:2
#11 0x0000000000716100 in Settings::~Settings (
this=0x1fee0e0 <globalSettings()::_globalSettings>,
__in_chrg=<optimized out>)
at /home/massimo/sources/upp-svn/TimberStruct/TimberCore/Settings.h:18
#12 0x00007ffff506b901 in __run_exit_handlers (status=1,
listp=0x7ffff53e86a8 <_exit_funcs>, run_list_atexit=true) at exit.c:78
#13 0x00007ffff506b985 in _GI_exit (status=<optimized out>) at exit.c:100
#14 0x00007ffff734f314 in ?? ()
from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#15 0x00007ffff699459e in _XIOError ()
from /usr/lib/x86_64-linux-gnu/libX11.so.6
#16 0x00007ffff699203d in _XEventsQueued ()
from /usr/lib/x86_64-linux-gnu/libX11.so.6
#17 0x00007ffff6994cb5 in _XGetRequest ()
from /usr/lib/x86_64-linux-gnu/libX11.so.6
#18 0x00007ffff6c8b035 in XRenderComposite ()
from /usr/lib/x86_64-linux-gnu/libXrender.so.1
#19 0x000000000062826c in Upp::ImageSysData::Paint (this=<optimized out>, w=
..., x=<optimized out>, x@entry=0, y=23, y@entry=3, src=..., c=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/ImageX11.cpp:236
#20 0x000000000062879c in Upp::SystemDraw::SysDrawImageOp (
this=0x7fffffffa4e8, x=0, y=3, img=..., src=..., color=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/ImageX11.cpp:257
#21 0x0000000000642613 in Upp::Draw::DrawImageOp (
this=this@entry=0x7fffffffa4e8, x=x@entry=0, y=3, cx=3, cy=20, img=...,
src=..., color=...)
at /home/massimo/sources/upp-svn/uppsrc/Draw/Draw.cpp:149
#22 0x0000000000641aa7 in Upp::Draw::DrawImage (this=0x7fffffffa4e8, x=0,
y=<optimized out>, img=...)
at /home/massimo/sources/upp-svn/uppsrc/Draw/Draw.cpp:223
#23 0x0000000000658695 in Upp::ChDraw (w=..., x=x@entry=0, y=3,
cx=<optimized out>, cy=<optimized out>, img=..., src=...)
at /home/massimo/sources/upp-svn/uppsrc/Draw/Cham.cpp:66
#24 0x0000000000659ff4 in Upp::StdChLookFn (w=..., r=..., v=...,
op=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Draw/Cham.cpp:273
#25 0x00000000006589f2 in Upp::sChOp (w=..., r=..., v=..., op=op@entry=2)
at /home/massimo/sources/upp-svn/uppsrc/Draw/Cham.cpp:452
#26 0x0000000000658b43 in Upp::ChPaintEdge (w=..., r=..., look=...)
at /home/massimo/sources/upp-svn/uppsrc/Draw/Cham.cpp:471
#27 0x0000000000619212 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffd7343618, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:338
#28 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffd7343578, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#29 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffd733dcc0, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#30 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffd733d4b8, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#31 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffd733d1a0, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#32 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffd733d100, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#33 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffd733d028, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#34 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffdc2fbfb8, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#35 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffdc2fc080, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#36 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffdc2fb838, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#37 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffffffd4d8, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#38 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffffffd1b0, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#39 0x0000000000619605 in Upp::Ctrl::CtrlPaint (
this=this@entry=0x7fffffffb710, w=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:393
#40 0x000000000061992a in Upp::Ctrl::UpdateArea0 (
this=this@entry=0x7fffffffb710, draw=..., clip=...,
backpaint=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:580
#41 0x0000000000619b8f in Upp::Ctrl::UpdateArea (this=0x7fffffffb710,
draw=..., clip=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlDraw.cpp:612
#42 0x000000000062acc6 in Upp::Ctrl::DoPaint (this=0x7fffffffb710, invalid=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/X11Wnd.cpp:67
#43 0x000000000062b8b6 in Upp::Ctrl::TimerAndPaint ()
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/X11Wnd.cpp:333
#44 0x000000000062bec0 in Upp::Ctrl::EventLoop0 (ctrl=0x7fffffffb710)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/X11Wnd.cpp:435
#45 0x0000000000612128 in operator() (this=0x7fffffffa958)
at /home/massimo/sources/upp-svn/uppsrc/Core/Cbgen.h:32
#46 Upp::Ctrl::Call (cb=...)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlMt.cpp:132
#47 0x000000000061245d in Upp::Ctrl::EventLoop (ctrl=0x7fffffffb710)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/CtrlMt.cpp:231
#48 0x0000000000621eac in Upp::TopWindow::Run (this=0x7fffffffb710,
appmodal=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/CtrlCore/TopWindow.cpp:327
#49 0x0000000000418a16 in GuiMainFn ()
at /home/massimo/sources/upp-svn/TimberStruct/TimberStruct/TimberStruct.cpp:975
#50 0x000000000069f73e in Upp::AppExecute (app=<optimized out>)
at /home/massimo/sources/upp-svn/uppsrc/Core/App.cpp:322
#51 0x0000000000409d32 in main (argc=<optimized out>, argv=<optimized out>,
envptr=<optimized out>)
at /home/massimo/sources/upp-svn/TimberStruct/TimberStruct/TimberStruct.cpp:828
History
#1 Updated by Miroslav Fidler over 12 years ago
- Status changed from New to Approved