Bug 51708 - Kstars crashes when selected item is below the horizon.
Summary: Kstars crashes when selected item is below the horizon.
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: kstars
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-10 01:59 UTC by Dave B.
Modified: 2003-02-03 15:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave B. 2002-12-10 01:59:38 UTC
Version:            (using KDE KDE 3.0.99)
Installed from:    Gentoo Packages
Compiler:          gcc 3.2.1 
OS:          Linux

I've selected Sirius & IC 5173.

When either item is below the horizon, a window will pop up in kstars, "The selected item is below the horizon.  Would you like to go there anyways?"

Clicking on either Yes or No doesn't matter, kstars will then exit, without a debug catalog.  

Major problem, imo.  I removed the kstarsrc multiple times [and is in fact the only way I can get back into kstars, or wait til the object is above the horizon ;)
Comment 1 kstars 2002-12-10 06:12:14 UTC
Thank you for the report.  I can confirm that this happens, but I don't yet 
know why.  As you noted, it isn't really a crash, the program just exits with 
no errors whatsoever.  And it won't start up again until the kstarsrc is 
deleted.  The odd thing is, it *only* seems to happen on Gentoo systems; I am 
the only KStars developer for whom this problem occurs.  I am looking into it. 
 
Comment 2 Dave B. 2003-01-30 21:15:44 UTC
Sad to say it isn't fixed in 3.1 final.  I am using this for my CFLAGS and 
CXXFLAGS:

-O3 -march=athlon-xp -mcpu=athlon-xp

You said you used gentoo as well.. did you try decreasing optimizations [like -
O2 or just -O]?  I'll give that a try tonite and if that works, report a gentoo 
bug...
Comment 3 kstars 2003-02-02 05:05:13 UTC
Ok, a workaround for this mysterious Gentoo-only exit condition is now in CVS (HEAD and 
KDE_3_1_BRANCH).  
 
We invoke a KMessageBox if the position stored in the config file is below the horizon that 
asks the user if they'd like to reset the position.  On Gentoo systems, the program exits 
(with no error message) an instant after the user selects either Yes or No.  Commenting out 
the KMessageBox gets rid of the exit problem.  Also, delaying the KMB until *after* the main 
window is drawn also avoids the exit condition.   
 
So, we now delay the messagebox until after the main window is drawn. 
 
If you are a Gentoo user and you'd rather not grab the latest CVS for this fix, you can simply 
comment out the if-block in skymap.cpp (the slotCenter() function) that begins with: 
"if ( KMessageBox::warningYesNo( 0, message, caption ) == KMessageBox::No )" 
 
Then it won't ask you if you want to reset the position, but at least it won't exit either :) 
  
Comment 4 kstars 2003-02-03 15:51:13 UTC
By the way, the bug has shown itself on some non-Gentoo systems, so it wasn't Gentoo 
specific after all.  Also, I informed Dan Armak about the fix, he is going to patch the Gentoo 
portage tree.  So, if you don't want to apply the manual fix, just re-emerge kstars in a couple of 
days.