Hi all.<br><br>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. 

<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 1689"<br> 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.
<br>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)
<br>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).<br>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.<br><br>
Marble version is 1.4.9 (1.5.0 RC 1)
Operating system Xubuntu 11.10
Qt version 4.8.1<br><br>Does anybody have this problem?(<a href="https://bugs.kde.org/show_bug.cgi?id=311624">https://bugs.kde.org/show_bug.cgi?id=311624</a>)<br><br>------- GDB log----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
Program received signal SIGSEGV, Segmentation fault.
<br>[Switching to Thread 0xb3bffb40 (LWP 17144)]<br>Marble::StackedTile::pixel (this=0xb3d0c3f8, x=559, y=-2027) at 
/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 
/home/olyubimov/git_repository/marble/src/lib/StackedTile.cpp:262<br>#1  0x012b6f22 in Marble::ScanlineTextureMapperContext::pixelValueApprox
 (this=0xb3bff1ec, lon=-0.90835936550699259, lat=1.5724603059378008, <br>scanLine=<optimized out>, n=8) at /home/olyubimov/git_repository/marble/src/lib/ScanlineTextureMapperContext.cpp:338<br>#2  0x012b9245 in Marble::EquirectScanlineTextureMapper::RenderJob::run (this=0x89dbb90)<br>
at /home/olyubimov/git_repository/marble/src/lib/EquirectScanlineTextureMapper.cpp:231<br>#3  0x0018d39b in QThreadPoolThread::run (this=0x8b9a2a0) at concurrent/qthreadpool.cpp:107<br>#4  0x0019ade0 in QThreadPrivate::start (arg=0x8b9a2a0) at 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>
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.<br><br><a href="http://postimage.org/image/5h0b2pf4r/"></a>