Review Request 122915: check we are started from the correct thread before starting timer

Marco Martin notmart at gmail.com
Thu Mar 12 13:37:31 UTC 2015



> On March 12, 2015, 1:12 p.m., Aleix Pol Gonzalez wrote:
> > src/plasma/theme.cpp, line 421
> > <https://git.reviewboard.kde.org/r/122915/diff/1/?file=354535#file354535line421>
> >
> >     If that's the case, then we will need locking, no?
> >     
> >     We don't want 2 different threads modifying the class members at the same time...
> 
> Marco Martin wrote:
>     seems things gets called from a different thread once right after being created..
>     that would make it the case for every single class created from QML i guess?
>     needs more investigation, but this can potentially unveil a deeper problem in QML?
> 
> Aleix Pol Gonzalez wrote:
>     Can you maybe provide a backtrace of the Q_UNLIKELY path? It can be interesting to understand what's going on.

This, seems to happen always only once in the lifecycle of a SvgItem:

0       Plasma::Theme::insertIntoRectsCache     theme.cpp       422     0x7f0794bf21fd  
1       Plasma::SvgPrivate::findAndCacheElementRect     svg.cpp 551     0x7f0794be8bb4  
2       Plasma::SvgPrivate::elementRect svg.cpp 525     0x7f0794be8778  
3       Plasma::Svg::hasElement svg.cpp 865     0x7f0794bea652  
4       Plasma::SvgPrivate::findInCache svg.cpp 335     0x7f0794be7329  
5       Plasma::Svg::image      svg.cpp 771     0x7f0794be9cb1  
6       Plasma::SvgItem::updatePaintNode        svgitem.cpp     161     0x7f077c080a86  
7       QQuickWindowPrivate::updateDirtyNode    qquickwindow.cpp        2823    0x7f0795333811  
8       QQuickWindowPrivate::updateDirtyNodes   qquickwindow.cpp        2648    0x7f079533285f  
9       QQuickWindowPrivate::syncSceneGraph     qquickwindow.cpp        340     0x7f0795327d4c  
10      QSGRenderThread::sync   qsgthreadedrenderloop.cpp       510     0x7f07952f15da  
11      QSGRenderThread::syncAndRender  qsgthreadedrenderloop.cpp       553     0x7f07952f1abf  
12      QSGRenderThread::run    qsgthreadedrenderloop.cpp       663     0x7f07952f2734  
13      QThreadPrivate::start   qthread_unix.cpp        337     0x7f07905321bf  
14      start_thread    /lib64/libpthread.so.0          0x7f078f6800db  
15      clone   /lib64/libc.so.6                0x7f078f97f90d


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122915/#review77360
-----------------------------------------------------------


On March 12, 2015, 1:25 p.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122915/
> -----------------------------------------------------------
> 
> (Updated March 12, 2015, 1:25 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> rectSaveTimer is used to event compress the save and sync of the configuration file that is used as a cache of the rectangles of svg items (in order to avoid svg renderers creation when possible)
> there is exactly one situation where it seems to not work: during creation of svgitems/framesvgitems, insertintorectcache ends up being called by another thread than the Theme's qobject thread, and that is not allowed. so in this case 
> 
> during normal svg resizes, all goes as before
> 
> 
> Diffs
> -----
> 
>   src/plasma/theme.cpp 18d4ed6 
> 
> Diff: https://git.reviewboard.kde.org/r/122915/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco Martin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150312/0e25856f/attachment.html>


More information about the Plasma-devel mailing list