[Kde-games-devel] Review Request 109285: Fix crash in Killbots shutdown sequence

Commit Hook null at kde.org
Wed Mar 6 23:09:53 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109285/#review28738
-----------------------------------------------------------


This review has been submitted with commit f2f51d96fbfe4679dfd5fadfb1d1601df29189eb by Albert Astals Cid to branch KDE/4.10.

- Commit Hook


On March 4, 2013, 10:53 p.m., Albert Astals Cid wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109285/
> -----------------------------------------------------------
> 
> (Updated March 4, 2013, 10:53 p.m.)
> 
> 
> Review request for KDE Games and Parker Coates.
> 
> 
> Description
> -------
> 
> As we can see in build.kde.org the test crashes sometimes http://build.kde.org/view/kdegames/job/killbots_master/20/testReport/%28root%29/TestSuite/enginetest/
> 
> I managed to reproduce it locally and the backtrace is
> 
> #0  ref (this=0x0) at ../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:121
> #1  QPen::QPen (this=0x7f77540d46d0) at painting/qpen.cpp:280
> #2  0x00007f77649022a3 in QSvgStrokeStyle::QSvgStrokeStyle (this=0x7f77540d46c0) at qsvgstyle.cpp:291
> #3  0x00007f77648f2d85 in parsePen (handler=0x7f775b961960, attributes=..., node=0x7f77540d39b0) at qsvghandler.cpp:1172
> #4  parseStyle (handler=0x7f775b961960, attributes=..., node=0x7f77540d39b0) at qsvghandler.cpp:2216
> #5  parseStyle (node=node at entry=0x7f77540d39b0, attrs=..., handler=handler at entry=0x7f775b961960) at qsvghandler.cpp:2257
> #6  0x00007f77648f73b4 in QSvgHandler::startElement (this=this at entry=0x7f775b961960, localName=..., attributes=...) at qsvghandler.cpp:3673
> #7  0x00007f77648f9960 in QSvgHandler::parse (this=this at entry=0x7f775b961960) at qsvghandler.cpp:3559
> #8  0x00007f77648f9bfd in QSvgHandler::init (this=this at entry=0x7f775b961960) at qsvghandler.cpp:3539
> #9  0x00007f77648f9e06 in QSvgHandler::QSvgHandler (this=0x7f775b961960, data=...) at qsvghandler.cpp:3522
> #10 0x00007f7764905dad in QSvgTinyDocument::load (contents=...) at qsvgtinydocument.cpp:208
> #11 0x00007f7764905ec8 in QSvgTinyDocument::load (fileName=...) at qsvgtinydocument.cpp:182
> #12 0x00007f7764908db7 in loadDocument<QString> (in=..., d=0x7f7754005350, q=0x7f7754005330) at qsvgrenderer.cpp:317
> #13 QSvgRenderer::load (this=this at entry=0x7f7754005330, filename=...) at qsvgrenderer.cpp:343
> #14 0x00007f7764908f3d in QSvgRenderer::QSvgRenderer (this=0x7f7754005330, filename=..., parent=0x0) at qsvgrenderer.cpp:140
> #15 0x00007f7768d2bfc8 in KGRInternal::RendererPool::allocRenderer (this=0x1b327c0) at /home/kdeunstable/libkdegames/kgamerenderer.cpp:641
> #16 0x00007f7768d2ac3c in KGRInternal::Worker::run (this=0x1ba7360) at /home/kdeunstable/libkdegames/kgamerenderer.cpp:564
> #17 0x00007f77680fb45d in QThreadPoolThread::run (this=0x1ba7390) at concurrent/qthreadpool.cpp:107
> #18 0x00007f7768107aec in QThreadPrivate::start (arg=0x1ba7390) at thread/qthread_unix.cpp:338
> #19 0x00007f776680ae9a in start_thread (arg=0x7f775b962700) at pthread_create.c:308
> #20 0x00007f7766b13cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
> #21 0x0000000000000000 in ?? ()
> 
> The problem is caused because our KGameRenderer is a K_GLOBAL_STATIC that uses a pen that is a Q_GLOBAL_STATIC and depending on the destruction order it may happen that the QPen is destroyed first and then bad stuff happens.
> 
> I've workarounded the issue by making the KGameRenderer not be a K_GLOBAL_STATIC anymore and adding a specific cleanup() call
> 
> 
> Diffs
> -----
> 
>   mainwindow.cpp cda3117 
>   renderer.h a1bdae3 
>   renderer.cpp f128c9c 
>   tests/enginetest.h 5102ea3 
>   tests/enginetest.cpp b0c5ea4 
> 
> Diff: http://git.reviewboard.kde.org/r/109285/diff/
> 
> 
> Testing
> -------
> 
> Ran
>   while [ true ]; do ./tests/enginetest; if [ $? -ne 0 ]; then break; fi done 
> for a long time with no crashes
> 
> 
> Thanks,
> 
> Albert Astals Cid
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20130306/0fc04672/attachment.html>


More information about the kde-games-devel mailing list