Crash on selecting off-Earth location in the Location window

Bug #834886 reported by Bogdan Marinov on 2011-08-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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

Alexander Wolf (alexwolf) wrote :

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

Bogdan Marinov (daggerstab) wrote :

Related to 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:

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:

Changed in stellarium:
status: Confirmed → Fix Committed
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.

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?

Khalid AlAjaji (kajaji) wrote :

Done, reported Bug #835422

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

Other bug subscribers