[Kstars-devel] branches/KDE/3.5/kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Fri Sep 23 03:02:12 CEST 2005


SVN commit 463106 by harris:

Probable fix for bug #112925 (KStars crashes on startup).  Thanks to the 
detailed bug report, this was pretty easy to track down.  We use the 
untranslated object names internally, so when objects are created, the 
name parameter is supposed to be passed in English.  For user-visible 
uses, we are supposed to use SkyObject::translatedName().

The crash was caused by my use of i18n("Pluto") for the name parameter 
in the ctor of the new Pluto class, which sets the internal Name 
parameter to the localized name for Pluto.  Then when 
SkyMap::drawSolarSystem() calls PCat->findByName("Pluto"), it gets NULL 
instead of a pointer to Pluto, which causes a crash.  

I've replaced i18n("Pluto") with I18n_NOOP("Pluto") in the KSPluto ctor, 
which seems to work for the other planets.  Note that this fix may 
cause a fuzzy string.  Please apply the patch and test it.  If it works, 
I'll close the bug.  

CCMAIL: kstars-devel at kde.org
CCBUG: 112925


 M  +1 -1      kspluto.cpp  


--- branches/KDE/3.5/kdeedu/kstars/kstars/kspluto.cpp #463105:463106
@@ -30,7 +30,7 @@
 #endif
 
 KSPluto::KSPluto(KStarsData *kd, QString fn, double pSize ) 
-		: KSAsteroid( kd, i18n("Pluto"), fn, J2000, 
+		: KSAsteroid( kd, I18N_NOOP( "Pluto" ), fn, J2000, 
 			39.48168677, 0.24880766, dms(17.14175), dms(113.76329),
 			dms(110.30347), dms(14.86205), 1.0 ) {
 	//Initialize the base orbital element values for J2000:


More information about the Kstars-devel mailing list