Hi ,Torsten<br><br>šš During the Bug with Marble crash investigation I have found, that the guardians on the functions StackedTile::pixel(...) andš StackedTile::pixelF(...) make the bug unreproducible only when Marble is built on a debug. If you build Marble on release mode, the bug begins to reproduce again. <br>
<br><span style="color:rgb(0,0,153)"><span style="color:rgb(0,0,0)">gdb log:</span><br><br>[Thread 0xa7234b40 (LWP 22713) exited]<br>[Thread 0xaabfcb40 (LWP 22712) exited]<br>[Thread 0xb17feb40 (LWP 22711) exited]<br>[Thread 0xb6116b40 (LWP 22714) exited]<br>
[New Thread 0xb6116b40 (LWP 22715)]<br>[New Thread 0xb17feb40 (LWP 22716)]<br>[New Thread 0xaabfcb40 (LWP 22717)]<br>[New Thread 0xa7234b40 (LWP 22718)]<br><br>Program received signal SIGSEGV, Segmentation fault.<br>[Switching to Thread 0xa7234b40 (LWP 22718)]<br>
0x012add16 in Marble::StackedTile::pixel(int, int) const () from /usr/local/lib/libmarblewidget.so.15<br>(gdb) quit</span><br><br>Could you tell me what treads are run when you scroll the map and change zoom? <br><br><div class="gmail_quote">
2012/12/18 Torsten Rahn <span dir="ltr"><<a href="mailto:tackat@t-online.de" target="_blank">tackat@t-online.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi,<br>
<br>
I can confirm this crash happening in master - however even on a pretty speedy<br>
machine.<br>
<br>
It happened to me about ša week ago when I did pretty much what you described<br>
(zooming while panning at the top of the flat map projection).<br>
I also looked at the backtrace back then and also figured that the allowed<br>
range of values for the position in the tile had been exceeded.<br>
<br>
I didn't have enough time to investigate it further though.<br>
<br>
I guess it has been there since the inertial panning has been there:<br>
<br>
The Texturerendering assumes rendering to happen within the same zoom level<br>
(unless it becomes aware that it has changed).<br>
I suspect that the combination of threaded rendering, changing zoom level<br>
while panning and the access of pixels near the pole area exposes a corner<br>
case which leads to the problem you mention.<br>
<br>
It would be nice if this problem could be understood in a better way. Oleg:<br>
could you look into it?<br>
<br>
Nevertheless I think it it would be a good šidea to introduce "guards" inside<br>
pixel() an pixelF() the way you suggest them in your patch:<br>
<br>
However the actual lines should include include an "else":<br>
<br>
if (x < 0) x = 0;<br>
else if (x > m_resultTile.width()) x = m_resultTile.width();<br>
<br>
if (y < 0) y = 0;<br>
else if (y > m_resultTile.height()) y = m_resultTile.height();<br>
<br>
I suspect that this might also get rid of the random crashes that we have seen<br>
on the mobile version.<br>
In terms of render quality the user will not notice the "wrong values" since<br>
they only affect very few pixels. It might or might not make sense to switch<br>
these guards off during the development of Marble.<br>
<br>
Best Regards,<br>
Torsten<br>
<div><div class="h5"><br>
<br>
On Dienstag, 18. Dezember 2012 07:33:41 ïÌÅÇ ìÀÂÉÍÏ× wrote:<br>
> Hi all.<br>
><br>
> Marble crashes when you scroll a map and change zoom level in the "Flat<br>
> Map" projection. This bug has reproducing probability 80-90% (100% if you<br>
> use slow hardware). The bug is reproduced on Desktop and on QML marble<br>
> application.<br>
> Reproducing:<br>
> 1. Download sources, build(QT only, Debug), install and run marble<br>
> 2. Check a map witch has tile level more than 1. I checked "Historical Map<br>
> 1689"<br>
> š3. When the map is opened, set a Projection to "Flat Map" set zoom to<br>
> minimum, and drag the map (it will be looked sush as a tape) to the Top<br>
> Bourder (or Bottom Bourder) of Marble Widget.<br>
> 4. Press left mouse and scroll the map from left to right (the map should<br>
> scrolling by "inertia" several seconds after you release left mouse button)<br>
> 5. When the will be scrolling by "inertia", you should increase or decrease<br>
> zoom of the map and grag it from Top to Bottom(Bottom to Top).<br>
> 6. After several reps of the 4 and 5 steps the Error should be accours.<br>
> Sometimes is reproduce in the first rep, but often you should make 5 - 20<br>
> reps of 4 and 5 steps.<br>
><br>
> Marble version is 1.4.9 (1.5.0 RC 1) Operating system Xubuntu 11.10 Qt<br>
> version 4.8.1<br>
><br>
> Does anybody have this<br>
> problem?(<a href="https://bugs.kde.org/show_bug.cgi?id=311624" target="_blank">https://bugs.kde.org/show_bug.cgi?id=311624</a>)<br>
><br>
> ------- GDB<br>
> log------------------------------------------------------------------------<br>
> ---------------------------------------------------------------------------<br>
</div></div>> ------------------------------------------------- Program received signal<br>
<div class="im">> SIGSEGV, Segmentation fault.<br>
> [Switching to Thread 0xb3bffb40 (LWP 17144)]<br>
> Marble::StackedTile::pixel (this=0xb3d0c3f8, x=559, y=-2027) at<br>
> /home/olyubimov/git_repository/marble/src/lib/StackedTile.cpp:262<br>
> 262 return d->pixel( x, y );<br>
> (gdb) ba<br>
> #0 Marble::StackedTile::pixel (this=0xb3d0c3f8, x=559, y=-2027) at<br>
> /home/olyubimov/git_repository/marble/src/lib/StackedTile.cpp:262<br>
> #1 0x012b6f22 in Marble::ScanlineTextureMapperContext::pixelValueApprox<br>
> (this=0xb3bff1ec, lon=-0.90835936550699259, lat=1.5724603059378008,<br>
> scanLine=<optimized out>, n=8) at<br>
> /home/olyubimov/git_repository/marble/src/lib/ScanlineTextureMapperContext.<br>
> cpp:338 #2 0x012b9245 in<br>
> Marble::EquirectScanlineTextureMapper::RenderJob::run (this=0x89dbb90)<br>
> at<br>
> /home/olyubimov/git_repository/marble/src/lib/EquirectScanlineTextureMapper<br>
> .cpp:231 #3 0x0018d39b in QThreadPoolThread::run (this=0x8b9a2a0) at<br>
> concurrent/qthreadpool.cpp:107<br>
> #4 0x0019ade0 in QThreadPrivate::start (arg=0x8b9a2a0) at<br>
> thread/qthread_unix.cpp:298<br>
> #5 0x0179fd4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0<br>
> #6 0x016ddd3e in clone () from /lib/i386-linux-gnu/libc.so.6<br>
> ---------------------------------------------------------------------------<br>
> ---------------------------------------------------------------------------<br>
</div>> ----------------------------------------------------------------- I my<br>
<div class="im">> personal opinion this bug is generated when function<br>
> Marble::StackedTile::pixel (this=0xb3d0c3f8, x=559, y=-2027) takes<br>
> arguments with invalid values. I create simple patch (see attachment) to<br>
> add code, which limits the arguments. Because "x" and "y" args are the<br>
> pixel values the bottom bound or this args is 0, and the top bounds of the<br>
> args is QImage m_resultTile.width() and QImage m_resultTile.heidth(). If<br>
> you limit the "x" and "y" args by this bounds the bug not reproduces.<br>
><br>
</div>> <<a href="http://postimage.org/image/5h0b2pf4r/" target="_blank">http://postimage.org/image/5h0b2pf4r/</a>><br>
_______________________________________________<br>
Marble-devel mailing list<br>
<a href="mailto:Marble-devel@kde.org">Marble-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/marble-devel" target="_blank">https://mail.kde.org/mailman/listinfo/marble-devel</a><br>
</blockquote></div><br>