Page 1 of 1

Bug with bodies names as the empty string. [fixed]

Posted: 18.11.2007, 20:37
by Vincent
Bodies whose name is defined as the empty string "" in a .ssc appear very strangely in the Windows contextual Menu. This bug can be repoduced with ElChristou's Soyouz addon.

Here's an extract of the scc definition:

Code: Select all

"Soyuz TMA" "Sol/Earth"
"" "Sol/Earth"
{
   Class "spacecraft" 
   Mesh "So2.cmod"
   Radius 0.00375

   EllipticalOrbit
   {
      Period       0.06175
         SemiMajorAxis    6600
      Inclination    51.7
      Eccentricity    0.00380
   }

   Obliquity 50
   Orientation [-90 0 0 1]
   RotationOffset -90
}

"" "Sol/Earth"
{
   Class "spacecraft" 
   Mesh "So3.cmod"
   Radius 0.00375

   EllipticalOrbit
   {
      Period       0.06175
         SemiMajorAxis    6600
      Inclination    51.7
      Eccentricity    0.00380
   }

   Obliquity 50
   Orientation [-90 0 0 1]
   RotationOffset -90


When right-clicking on Earth to bring up the contextual menu and select Soyouz, 2 long lines appear, and when one is selected, some text about internationalization appears in the Selection overlay elements:

Image

The bug also occures when displaying the label of the object:
Image

This bug disappears when the 2 bodies are named with anything else than the empty string.

Posted: 18.11.2007, 20:42
by chris
Vincent,

This is a weird one, but probably easy to fix.

Could you open a bug for it on the SourceForge tracker?

--Chris

Posted: 18.11.2007, 20:45
by Vincent
chris wrote:Vincent,

This is a weird one, but probably easy to fix.

Could you open a bug for it on the SourceForge tracker?

Chris,

Yes, of course, I'll add a bug report on the SourceForge tracker as well.

Posted: 18.11.2007, 20:48
by ElChristou
Vince, have you tried with the CSM? it do have a "" entry in it's ssc...

Posted: 18.11.2007, 20:52
by Vincent
ElChristou wrote:Vince, have you tried with the CSM? it do have a "" entry in it's ssc...

Christophe,

Can't find it on my disk...
Could you point me to a download link, please ?

Posted: 18.11.2007, 20:54
by ElChristou
Vincent wrote:
ElChristou wrote:Vince, have you tried with the CSM? it do have a "" entry in it's ssc...
Christophe,

Can't find it on my disk...
Could you point me to a download link, please ?


http://nho.ohn.free.fr/celestia/preview/EC_Apollo_Pre.zip

Posted: 18.11.2007, 20:57
by Vincent

OK, thanks. I'm downloading it right now...
Let you know in a few minutes...

Posted: 18.11.2007, 21:08
by Vincent
Chistophe,

There's no object defined as the empty string in the Apollo .ssc declaration.
However, replacing "Apollo 11a" with the empty string "" confirms the bug:
Image

Actually, the text which is displayed corresponds to the translation of the empty string "" in fr.po:
msgid ""
msgstr ""
"Project-Id-Version: fr\n"
"Report-Msgid-Bugs-To: chris@teyssier.org\n"
"POT-Creation-Date: 2007-11-03 00:02+0100\n"
"PO-Revision-Date: 2007-11-03 00:05+0100\n"
"Last-Translator: Christophe Teyssier <chris@teyssier.org>\n"
"Language-Team: Fran?§ais <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"

Posted: 18.11.2007, 22:52
by ElChristou
Vincent wrote:Chistophe,

There's no object defined as the empty string in the Apollo .ssc declaration.
However, replacing "Apollo 11a" with the empty string "" confirms the bug:...


Ah yes, sorry I thought I use the same method...

Anyway I suppose this bug will find a fix so I suppose I can keep the "" declaration for future models... (to avoid this annoying Apollo 11a for example...)

Posted: 21.11.2007, 13:50
by Vincent
I've chased this bug off the popup menu and the label renderer.

However, it still occures in the Solar System Browser:
Image

Christophe,

Isn't there a way to fix this bug directly in the po file rather than adding all these filters in the code ?

Posted: 21.11.2007, 14:11
by BobHegwood
Sorry, but can't you simply use an empty location (like barycenter,
Class "invisible") defined with an empty 3ds model to avoid all of this
stuff altogether?

Just asking, because I did that recently in order to remove the
blank selection entries on Celestia's orbiting bodies selection menu. I
HATE an empty selection line wasting space on my Celestia menu. :wink:

Posted: 21.11.2007, 14:19
by Vincent
BobHegwood wrote:I HATE an empty selection line wasting space on my Celestia menu. :wink:

Bob,

Objects defined with the "Invisible" class are not rendered, which can cause some problems... :wink:

I just removed the bug from the Solar System Browser too.
With this fix, empty string won't appear anymore in the browser. :)
Objects named as a blank space string " " will still appear, though.
Then, it's up to addons creators to avoid this...

Posted: 21.11.2007, 14:55
by BobHegwood
Okay, THANKS very much Vincent... :lol:

Posted: 21.11.2007, 18:06
by Chuft-Captain
When right-clicking on Earth to bring up the contextual menu and select Soyouz, 2 long lines appear, and when one is selected, some text about internationalization appears in the Selection overlay elements:

Just to let you know, I encountered this problem with rthorvald's space elevator version 2 (inn 1.5.0pre3 I think), but haven't noticed any similar problems with the Island One addon (in 1.5.0pre4).

Posted: 21.11.2007, 18:44
by Vincent
Chuft-Captain wrote:Just to let you know, I encountered this problem with rthorvald's space elevator version 2 (inn 1.5.0pre3 I think), but haven't noticed any similar problems with the Island One addon (in 1.5.0pre4).

Thanks CC.

The bug is now fixed in CVS.