Bug 133505 - kstars crash in refract()
Summary: kstars crash in refract()
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: kstars
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-03 15:07 UTC by Mihail Tomoff
Modified: 2008-01-27 00:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mihail Tomoff 2006-09-03 15:07:17 UTC
Version:           1.2.4 (using KDE KDE 3.5.4)
Installed from:    SuSE RPMs

KStars under Suse 10.1 /KDE 3.5.4 often (really very often) crashes. I have a suspicion that it began after downloading the optional data for KStars but I am not sure.
Here is the Backtrace:

System configuration startup check disabled.

Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47719814704432 (LWP 16703)]
[KCrash handler]
#5  0x0000000000433cc0 in SkyMap::refract ()
#6  0x000000000045bd38 in SkyMap::dXdYToRaDec ()
#7  0x000000000053f12e in SkyMap::mouseMoveEvent ()
#8  0x00002b66a00cd929 in QWidget::event ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#9  0x00002b66a0043a95 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#10 0x00002b66a00448bb in QApplication::notify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#11 0x00002b669f90b8c8 in KApplication::notify ()
   from /opt/kde3/lib64/libkdecore.so.4
#12 0x00002b669ffec0f4 in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#13 0x00002b669ffeb2d3 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#14 0x00002b669fffa25f in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#15 0x00002b66a00587a1 in QEventLoop::enterLoop ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#16 0x00002b66a005864a in QEventLoop::exec ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#17 0x0000000000552dff in main ()
Comment 1 kstars 2006-09-03 16:39:45 UTC
Thank you for the report.  Can you tell me exactly what you are doing in the 
progam when it crashes (or is it inconsistent)?  Can you also post your 
$KDEHOME/share/config/kstarsrc file?

If you suspect it has to do with data that you've downloaded, there is a way 
we can test that.  Rename your $KDEHOME/share/apps/kstars directory to 
$KDEHOME/share/apps/kstars_old.  Then start kstars and see if it no longer 
crashes.  The downloaded data go into that directory, so by renaming it you 
aren't using them anymore.

If that works, the next step is to add the data one at a time until you 
identify which one is causing the crashes.  Please reply here with what you 
find.

If none of this works:  Is it the case that the topmost function in the 
backtrace is always "refract()"?  If so, try unchecking the "Correct for 
atmospheric refraction" box in the Advanced tab of the Configuration dialog.


On Sunday 03 September 2006 06:07, Mihail Tomoff wrote:
[bugs.kde.org quoted mail]
Comment 2 Mihail Tomoff 2006-09-03 17:23:14 UTC
kstars@30doradus.org wrote:
[bugs.kde.org quoted mail]
Thanks a lot for the response!
In  the next days, I'll do all the tests you recommend (actually, I also
was thinking of removing my kstars configuration).
The crashes are inconsistent. Maybe they happen when I put the mouse
over a star/object, or click on it in order to center it.
For the refract, I am not sure, will test.

Best regards!

Mihail
[Colors]
AngularRuler=#FFF
BoxBGColor=#000
BoxGrabColor=#F00
BoxTextColor=#FFF
CBoundColor=#222
CLineColor=#555
CNameColor=#AA7
CompassColor=#002
EclColor=#663
EqColor=#FFF
GridColor=#456
HSTColor=#A00
HorzColor=#5A3
ICColor=#439
MWColor=#123
MessColor=#0F0
NGCColor=#066
ObsListColor=#F00
PNameColor=#A77
PlanetTrailColor=#963
SNameColor=#7AA
SkyColor=#002
StarColorIntensity=4
StarColorMode=0
TargetColor=#8B8
UserLabelColor=#FFF

[GUI]
PositionFocusBox=1128,0
PositionGeoBox=0,605
RunStartupWizard=false
WindowHeight=720
WindowWidth=1272

[KFileDialog Settings]
Recent Files=/multimedia/images/astronomy_images/deep sky/na_nebula/NGC_7000_B.jpg

[KNewStuffStatus]
Messier catalog thumbnail images=2004-06-02
Steinicke NGC/IC Catalog=2004-06-02
Thumbnail images for details window=2004-08-06
ephemerides=2006-03-06

[Location]
CityName=Brussels
CountryName=Belgium
Latitude=50.85
Longitude=4.34972
ProvinceName=Brabant
TimeZone=1

[TipOfDay]
RunOnStart=false
TipLastShown=2006,9,3,14,38,15

[View]
FocusDec=44.7632
FocusRA=17.8551
MagLimitDrawStar=8.9
MagLimitDrawStarInfo=2.7
MagLimitHideStar=4.7
UseRefraction=false
ZoomFactor=848.198

[indi]
fitsSaveDirectory=/home/mishaikin
Comment 3 Mihail Tomoff 2006-09-10 21:51:12 UTC
A little development:
I removed the refraction correction and kstars stopped crashing. Today I decided to make the test with downloading the data, so I started kstars as different user, and test it for a while without downloading the data. It crashed after a while.

So, probably the crashes has nothing to do with the downloading data but with the refraction correction option in the configuration menu.

Regards,
Mihail
Comment 4 kstars 2006-09-11 16:44:16 UTC
I modified the title of the bug to reflect the new information you posted, I hope that's okay.  Thanks for following up on this.
Comment 5 Jure Repinc 2007-10-20 15:30:25 UTC
I think I something similar or the same on my machine with KStars from trunk (KDE4). I also have a 64-bit machine and have not downloaded any additional data yet. This is my backtrace:

#5  0x00000000005ea92d in SkyMap::refract (this=0x340b220, alt=0x7ffff0272090, 
    findApparent=false)
    at /home/kde-devel/kde/src/KDE/kdeedu/kstars/kstars/skymap.cpp:1378
#6  0x00000000005eb63a in SkyMap::fromScreen (this=0x340b220, dx=-0, dy=0, 
    LST=0xa625f0, lat=0xa226a8)
    at /home/kde-devel/kde/src/KDE/kdeedu/kstars/kstars/skymap.cpp:1354
#7  0x00000000005fa854 in SkyMap::mouseMoveEvent (this=0x340b220, 
    e=0x7ffff0273260)
    at /home/kde-devel/kde/src/KDE/kdeedu/kstars/kstars/skymapevents.cpp:500
#8  0x00002ab5c2c45322 in QWidget::event (this=0x340b220, event=0x7ffff0273260)
    at kernel/qwidget.cpp:6114
#9  0x00002ab5c2bf7555 in QApplicationPrivate::notify_helper (this=0x90bc70, 
    receiver=0x340b220, e=0x7ffff0273260) at kernel/qapplication.cpp:3558
#10 0x00002ab5c2bf8195 in QApplication::notify (this=0x7ffff02745c0, 
    receiver=0x340b220, e=0x7ffff0273260) at kernel/qapplication.cpp:3257
#11 0x00002ab5bcdde03a in KApplication::notify (this=0x7ffff02745c0, 
    receiver=0x340b220, event=0x7ffff0273260)
    at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:319
#12 0x00002ab5bab6bbcc in QCoreApplication::notifyInternal (
    this=0x7ffff02745c0, receiver=0x340b220, event=0x7ffff0273260)
    at kernel/qcoreapplication.cpp:532
#13 0x00002ab5bdc1211d in QCoreApplication::sendSpontaneousEvent (
    receiver=0x340b220, event=0x7ffff0273260)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:205
#14 0x00002ab5c2c613b7 in QETWidget::translateMouseEvent (this=0x340b220, 
    event=0x7ffff0273c30) at kernel/qapplication_x11.cpp:3871
#15 0x00002ab5c2c5f083 in QApplication::x11ProcessEvent (this=0x7ffff02745c0, 
    event=0x7ffff0273c30) at kernel/qapplication_x11.cpp:2922
#16 0x00002ab5c2c88e93 in x11EventSourceDispatch (s=0x90f380, callback=0, 
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:137
#17 0x00002ab5c4c06c03 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#18 0x00002ab5c4c09edd in ?? () from /usr/lib/libglib-2.0.so.0
#19 0x00002ab5c4c0a3ae in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#20 0x00002ab5bab93b86 in QEventDispatcherGlib::processEvents (this=0x909d10, 
    flags=@0x7ffff0273ec0) at kernel/qeventdispatcher_glib.cpp:340
#21 0x00002ab5c2c8872f in QGuiEventDispatcherGlib::processEvents (
    this=0x909d10, flags=@0x7ffff0273f10)
    at kernel/qguieventdispatcher_glib.cpp:193
#22 0x00002ab5bab68d6d in QEventLoop::processEvents (this=0x7ffff0273fc0, 
    flags=@0x7ffff0273f70) at kernel/qeventloop.cpp:142
#23 0x00002ab5bab68ec2 in QEventLoop::exec (this=0x7ffff0273fc0, 
    flags=@0x7ffff0273fd0) at kernel/qeventloop.cpp:184
#24 0x00002ab5bab6c346 in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:761
#25 0x00002ab5c2bf712c in QApplication::exec () at kernel/qapplication.cpp:3055
#26 0x00000000005d7657 in main (argc=1, argv=0x7ffff0275258)
    at /home/kde-devel/kde/src/KDE/kdeedu/kstars/kstars/main.cpp:189
#0  0x00002ab5c4519fd0 in __nanosleep_nocancel () from /lib64/libc.so.6
Comment 6 kstars 2007-11-17 19:22:50 UTC
The refraction code has been reworked in trunk.  Can you test whether this bug has been resolved?  I've never been able to see it on my machine...
Comment 7 kstars 2008-01-27 00:18:27 UTC
SVN commit 766927 by harris:

Fixing crash condition in SkyMap::refract().  The 
array index could sometimes go out of bounds, leading 
to a segfault.

Will port to trunk and 4.0 branch

BUG: 133505
CCMAIL: kstars-devel@kde.org



 M  +3 -0      ksmoon.cpp  
 M  +5 -0      skymap.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=766927
Comment 8 kstars 2008-01-27 00:19:00 UTC
SVN commit 766928 by harris:

The KSMoon changes should not have been part of the 
previous commit.  Reverting.

CCBUG: 133505
CCMAIL: kstars-devel@kde.org



 M  +0 -3      ksmoon.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=766928