Bug with star names as the empty string

Report bugs, bug fixes and workarounds here.
Topic author
refsteff
Posts: 17
Joined: 30.07.2011
With us: 13 years 3 months

Bug with star names as the empty string

Post #1by refsteff » 03.09.2011, 12:37

Hello,

after I've enabled localizations in Linux (celestia svn 5166 Qt4) and tried some addons, I realized the same behavior that was described here:
http://www.shatters.net/forum/viewtopic.php?f=3&t=11690
but with stars (fictional or real). I've tried it with rthorvalds sun addons (with the update to 1.5+) and his ringworld's star addon - all the same.

th_sun_error2.png

this happens everytime If call the selection popup and select planets.
The next is difficult to reproduce, it depends on the distance and where you click on the star.

th_sun_error.png

Other star addons without empty names in their .ssc file were working.

See you

refsteff
Specs: OpenSUSE 11.2 (modified), nVidia Geforce 9400 GT, Intel E7500, celestia svn 5166 Qt4

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Bug with star names as the empty string

Post #2by John Van Vliet » 04.09.2011, 22:02

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 06:45, edited 1 time in total.

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: Bug with star names as the empty string

Post #3by Fenerit » 05.09.2011, 02:41

John, the use of "" in which there is not space between, is working for Linux?
Never at rest.
Massimo

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Bug with star names as the empty string

Post #4by John Van Vliet » 05.09.2011, 03:38

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 06:45, edited 1 time in total.

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: Bug with star names as the empty string

Post #5by Fenerit » 05.09.2011, 04:04

Ok, understood.
Never at rest.
Massimo

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 3 months

Re: Bug with star names as the empty string

Post #6by ajtribick » 05.09.2011, 17:48

Are such empty names actually something we should support in the first place? Is this really useful?

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Bug with star names as the empty string

Post #7by selden » 05.09.2011, 17:56

Somehow one needs to be able to define components of spacecraft or other 3D objects in a way which does not cause them to be listed in the Solar System Browser. This is particularly important for objects with a very large number of components. Traditionally this has been done by using an empty name " ". Although Celestia complains, that works reasonably well for the intended purpose. There was a request for a declaration like 'Listable false', similar to 'Clickable false', but it didn't get implemented.

p.s. the Hale Telescope addon illustrates the "too many components" problem quite well. http://www.lepp.cornell.edu/~seb/celest ... scope.html
Selden

Topic author
refsteff
Posts: 17
Joined: 30.07.2011
With us: 13 years 3 months

Re: Bug with star names as the empty string

Post #8by refsteff » 05.09.2011, 22:08

Hello john,
john Van Vliet wrote:Unfortunately you will have to fix them on your own
i have been trying to get the creators to FIX THERM - but they refuse
or are no longer active and can not fix them .

---- the fix ( might vary a bit on some ) ----
1) name them 1 ,2, 3, or a,b,c,d,...... will do
2) a second error caused by this ( looks like you missed this )
the object in NOT clickable or no menu

You mentioned a star
no r-click menu until fixed

add

Code: Select all

     Visible true
     Clickable false # or " true"

to EVERY blank " "
for the selection popup ( the first bug I mentioned) I find a (until now dirty) workaround:

Code: Select all

--- celestia.org/src/celestia/qt/qtselectionpopup.cpp   2011-09-03 09:54:08.000000000 +0200
+++ celestia/src/celestia/qt/qtselectionpopup.cpp   2011-09-03 15:45:24.000000000 +0200
@@ -399,13 +399,21 @@
                     }
                     menu = new QMenu(title, this);
                 }
-               
-                QAction* act = new QAction(QString::fromUtf8(body->getName(true).c_str()), menu);
-                act->setData(i);
-                connect(act, SIGNAL(triggered()), this, SLOT(slotSelectChildObject()));
-                menu->addAction(act);
+                QString name = QString::fromUtf8(body->getName(true).c_str());
+                if (!name.contains("Project-Id-Version:"))
+                {
+                    QAction* act = new QAction(name, menu);
+                    act->setData(i);
+                    connect(act, SIGNAL(triggered()), this, SLOT(slotSelectChildObject()));
+                    menu->addAction(act);
+                }
             }
         }
+        if(menu != NULL && menu->isEmpty())
+        {
+            delete menu;
+            menu = NULL;
+        }
     }
 
     return menu;

I have to test it seriously (I'm not a C++ programmer, so I don't know if *delete menu* is the right choice), and this don't solve the output on the 2nd picture.
btw. is there a detailed description of the celestia core classes/methods available (until now I just find some old pages or outdated links and even I'm not very familiar with C++ it would be helpful to find an accurate solution)?
PS. on a different note OpenSUSE 11.2 hit End Of Life on
openSUSE 11.2 - May 12th 2011
about 3.5 months ago .Time to upgrade to 11.4

unless you are using the partial backport support "Evergreen"
I know that, this belongs to every Linux distribution (I use Linux since ~16 years ). I do use "Evergreen", it's very helpful and for several reasons I can't upgrade( to many software from "outer space" :) that an upgrade wants to remove :roll: ).

Thank you for your reply

refsteff
Specs: OpenSUSE 11.2 (modified), nVidia Geforce 9400 GT, Intel E7500, celestia svn 5166 Qt4


Return to “Bugs”