[Marble-devel] Marble crash when you scrolling a map in "Flat Map" projection

Олег Любимов lyubimov.o.e at gmail.com
Tue Dec 18 06:33:41 UTC 2012


Hi all.

Marble crashes when you scroll a map and change zoom level in the "Flat
Map" projection. This bug has reproducing probability 80-90% (100% if you
use slow hardware). The bug is reproduced on Desktop and on QML marble
application.
Reproducing:
1. Download sources, build(QT only, Debug), install and run marble
2. Check a map witch has tile level more than 1. I checked "Historical Map
1689"
 3. When the map is opened, set a Projection to "Flat Map" set zoom to
minimum, and drag the map (it will be looked sush as a tape) to the Top
Bourder (or Bottom Bourder) of Marble Widget.
4. Press left mouse and scroll the map from left to right (the map should
scrolling by "inertia" several seconds after you release left mouse button)
5. When the will be scrolling by "inertia", you should increase or decrease
zoom of the map and grag it from Top to Bottom(Bottom to Top).
6. After several reps of the 4 and 5 steps the Error should be accours.
Sometimes is reproduce in the first rep, but often you should make 5 - 20
reps of 4 and 5 steps.

Marble version is 1.4.9 (1.5.0 RC 1) Operating system Xubuntu 11.10 Qt
version 4.8.1

Does anybody have this problem?(https://bugs.kde.org/show_bug.cgi?id=311624)

------- GDB
log----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb3bffb40 (LWP 17144)]
Marble::StackedTile::pixel (this=0xb3d0c3f8, x=559, y=-2027) at
/home/olyubimov/git_repository/marble/src/lib/StackedTile.cpp:262
262 return d->pixel( x, y );
(gdb) ba
#0 Marble::StackedTile::pixel (this=0xb3d0c3f8, x=559, y=-2027) at
/home/olyubimov/git_repository/marble/src/lib/StackedTile.cpp:262
#1 0x012b6f22 in Marble::ScanlineTextureMapperContext::pixelValueApprox
(this=0xb3bff1ec, lon=-0.90835936550699259, lat=1.5724603059378008,
scanLine=<optimized out>, n=8) at
/home/olyubimov/git_repository/marble/src/lib/ScanlineTextureMapperContext.cpp:338
#2 0x012b9245 in Marble::EquirectScanlineTextureMapper::RenderJob::run
(this=0x89dbb90)
at
/home/olyubimov/git_repository/marble/src/lib/EquirectScanlineTextureMapper.cpp:231
#3 0x0018d39b in QThreadPoolThread::run (this=0x8b9a2a0) at
concurrent/qthreadpool.cpp:107
#4 0x0019ade0 in QThreadPrivate::start (arg=0x8b9a2a0) at
thread/qthread_unix.cpp:298
#5 0x0179fd4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#6 0x016ddd3e in clone () from /lib/i386-linux-gnu/libc.so.6
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I my personal opinion this bug is generated when function
Marble::StackedTile::pixel (this=0xb3d0c3f8, x=559, y=-2027) takes
arguments with invalid values. I create simple patch (see attachment) to
add code, which limits the arguments. Because "x" and "y" args are the
pixel values the bottom bound or this args is 0, and the top bounds of the
args is QImage m_resultTile.width() and QImage m_resultTile.heidth(). If
you limit the "x" and "y" args by this bounds the bug not reproduces.

<http://postimage.org/image/5h0b2pf4r/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20121218/2b858c12/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fix_bug_2.patch
Type: application/octet-stream
Size: 1384 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20121218/2b858c12/attachment.obj>


More information about the Marble-devel mailing list