Crash on selecting off-Earth location in the Location window

Bug #834886 reported by Bogdan Marinov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
High
Bogdan Marinov

Bug Description

Stellarium crashes when an off-Earth location is selected in the Location dialog, for example the Apollo sites. According to the debugger, it is caused by the code that provides localization of the planet names in the list. I'll try to fix it.

Related branches

Revision history for this message
Alexander Wolf (alexwolf) wrote :

This bug related with bug #824936 but I don't know elegant solution.

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Related to bug #824936 :
https://bugs.launchpad.net/stellarium/+bug/824936
Fixing the underlying issue will fix both bugs. I'm on it.

Probably introduced in trunk revision 4884, from the branch that was merged then:
http://bazaar.launchpad.net/~stellarium/stellarium/trunk/revision/4884

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

The crash was caused by the fact that the location name is set to "SpaceShip" after a planet change. The code was trying to find its (localized) name in the list of planets in the QComboBox, but it wasn't there, so it crashed because it assumed that a result would always be found.

The problem was fixed by storing the original names in the user data fields of the QComboBox, instead of using calls to SolarSystem to look them up. Qt's user data fields seem to be a very useful thing when creating localizations.

The fix has been committed to the trunk branch as revision #4948:
http://bazaar.launchpad.net/~stellarium/stellarium/trunk/revision/4949

Changed in stellarium:
status: Confirmed → Fix Committed
Revision history for this message
Khalid AlAjaji (kajaji) wrote :

Also Stellarium 0.11.0 will crash if a landscape is selected that has a planet name in landscape.ini misspelled or if it is written in a local language.

10.6.1 will tolerate this and will not crash.

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

It's a different bug, though with the same underlying cause - using a call to SolarSystem to get the localized name of the planet. This time it's in LandscapeMgr::getCurrentLandscapeHtmlDescription().

Would you open another bug report, so the credit for noticing this goes to you?

Revision history for this message
Khalid AlAjaji (kajaji) wrote :

Done, reported Bug #835422
Thanks

Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.