1.5.0 bug - can't load with this SSC

Report bugs, bug fixes and workarounds here.
Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

1.5.0 bug - can't load with this SSC

Post #1by Malenfant » 25.09.2006, 03:59

Can someone test this out? I'm using a 1.5.0 executable on windows XP, and I can't get the SSC below to work (Celestia hangs while loading). However, this works fine with the old 1.4.1 executable.

First download the updated Quad system STC here:
http://www.celestiaproject.net/forum/viewtopic.php?p=77917

Then add this as an SSC file.

Code: Select all

"limitS1" "Quad1"
{
Radius 10

EllipticalOrbit {
Period 1
SemiMajorAxis 0.068
Eccentricity 0.00
Inclination 0.00
AscendingNode 0.0
LongOfPericenter 0.0
MeanAnomaly 0.0
}

Albedo 0.30
}


"limitS2" "Quad2"
{
Radius 10

EllipticalOrbit {
Period 1
SemiMajorAxis 0.067
Eccentricity 0.00
Inclination 0.00
AscendingNode 0.0
LongOfPericenter 0.0
MeanAnomaly 0.0
}

Albedo 0.30
}

"limitP" "QuadAB"
{
Radius 10

EllipticalOrbit {
Period 1
SemiMajorAxis 1.402
Eccentricity 0.00
Inclination 0.00
AscendingNode 0.0
LongOfPericenter 0.0
MeanAnomaly 0.0
}

Albedo 0.30
}


When I try this, Celestia 1.5.0 hangs while loading (where it says it's loading data/deepsky.dsc) What should happen (if it works) is that if you go to QuadAB you should see three asteroid orbits - one small orbit around the star Quad1, one small orbit around the star Quad2, and one large one around the QuadAB barycentre. I can get it to draw an asteroid orbit around Quad1, and around the barycentre, but if I get it to do an orbit around Quad2 as well it hangs on loading.

I don't think I'm doing anything wrong here, and it's odd that it works perfectly fine in 1.4.1 but not 1.5.0...
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 20 years 8 months
Location: United Kingdom

Post #2by Joe » 25.09.2006, 08:57

There was a problem when I tried what you expected on my XP system, (compiled source from CVS 20/09/2006). Celestia hangs still while loading data/deepsky.dsc. I don't think I found the problem, but I traced a bug at source file Galaxy.cpp:

Code: Select all

GalacticForm* buildGalacticForms(const std::string& filename)
{
    Blob b;
    vector<Blob>* galacticPoints = new vector<Blob>;

    // Load templates in standard .png format
    int width, height, rgb, j = 0;
    unsigned char value;
    Image* img = LoadPNGImage(filename);
...
...
}


I tried by changing the code as

Code: Select all

GalacticForm* buildGalacticForms(const std::string& filename)
{
    Blob b;
    vector<Blob>* galacticPoints = new vector<Blob>;

    // Load templates in standard .png format
    int width, height, rgb, j = 0;
    unsigned char value;
    Image* img = LoadPNGImage(filename);

   //added lines up to line //*****
   if (img == NULL)
      return NULL;
   //*****


...
...
}


Compiled the system
Download your updated Quad system STC
Add your SSC file

Select and goto: QuadAB

It generated what you expected.

Hope it will help you :wink:
Joe
8O

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #3by t00fri » 25.09.2006, 11:00

I have added a test for img == NULL since some time (not yet in CVS).

This solution is, however, far from ideal, and that's why I have not yet committed it.

Linux users starting Celestia from the command line will get a notice about missing PNG templates. But all people starting Celelstia from the Desktop (Windows, KDE,..) will not notice the missing file. The only difference is that the program doesn't hang during startup.

So idealy one should code a GUI dialog...which is OS dependent...

But all this should NOT be necessary if the new image data are supplied completely!

It's always bad to mix versions etc...

Bye Fridger
Image

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #4by Malenfant » 25.09.2006, 14:58

That's weird though. Why would an SSC file in a totally unrelated Quad system addon cause the deepsky.dsc loading to lock up? It's got nothing to do with it at all! (My 1.5.0 works fine without that SSC).
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #5by t00fri » 25.09.2006, 15:26

Malenfant wrote:That's weird though. Why would an SSC file in a totally unrelated Quad system addon cause the deepsky.dsc loading to lock up? It's got nothing to do with it at all! (My 1.5.0 works fine without that SSC).


What happens when you start your Celestia version without that Quad system .ssc file?

The new CVS code reads PNG templates (instead of .sts) and deepsky.dsc uses one new option: CustomTemplate "MilkyWay.png"
for our MilkyWay entry.

+++++++++++++++++++++
If in the 'models' directory that MilkyWay.png is lacking or any other .png template, the loading hangs exactly at the place where yours did.
+++++++++++++++++++++

Since Joe /successfully/ tested in the code on img == NULL, I am almost SURE that MilkyWay.png was lacking in your deepsky.dsc. If it was then my previous comment about using incomplete CVS readouts was precisely correct and certainly was connected with your problem ;-)

I can assure you that the complete CVS version does not hang in any supported OS.
Image

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #6by Malenfant » 25.09.2006, 19:14

Oh I'm sure that me just having the 1.5.0 executable is part of it.

BUT... when I start Celestia without that Quad ssc, it loads up properly and works absolutely fine. Heck, I can start it with that SSC but set with one of the small asteroid orbits around the barycentre instead of Quad2 and it also loads up and works fine. It only locks up on loading when I have both small asteroid orbits around the Quad1 and Quad2 stars.

None of that has anything to do with any galaxies, hence why I'm wondering how tweaking galaxy code could fix the problem.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #7by t00fri » 25.09.2006, 19:40

Malenfant wrote:Oh I'm sure that me just having the 1.5.0 executable is part of it.

BUT... when I start Celestia without that Quad ssc, it loads up properly and works absolutely fine. Heck, I can start it with that SSC but set with one of the small asteroid orbits around the barycentre instead of Quad2 and it also loads up and works fine. It only locks up on loading when I have both small asteroid orbits around the Quad1 and Quad2 stars.

None of that has anything to do with any galaxies, hence why I'm wondering how tweaking galaxy code could fix the problem.


All I need to know is whether you have the CustomTemplate option

# Milky Way
Galaxy "Milky Way"
{
Type "SBc"
CustomTemplate "MilkyWay.png" <=====
RA 17.7500
Dec -28.9300
Distance 2.772e+04
Radius 5e+04
AbsMag -20.5
Axis [ 0.8660 0.4910 0.0910]
Angle 176.0000
}

in your deepsky.dsc AND did NOT have MilkyWay.png in your 'models' directory.

If yes, this was the cause of your problem.

Since you normally are not interested in code details, I spare you the respective explanation.

It is simply a "dead sin" to just try using the CVS executable for anything without understanding the code.

Bye Fridger
Image

buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Post #8by buggs_moran » 25.09.2006, 19:40

Everything works fine for me... Cool system. I see both asteroids.
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #9by Malenfant » 25.09.2006, 21:01

t00fri wrote:
Malenfant wrote:Oh I'm sure that me just having the 1.5.0 executable is part of it.

BUT... when I start Celestia without that Quad ssc, it loads up properly and works absolutely fine. Heck, I can start it with that SSC but set with one of the small asteroid orbits around the barycentre instead of Quad2 and it also loads up and works fine. It only locks up on loading when I have both small asteroid orbits around the Quad1 and Quad2 stars.

None of that has anything to do with any galaxies, hence why I'm wondering how tweaking galaxy code could fix the problem.

All I need to know is whether you have the CustomTemplate option

I'll have to check when I get home. However (again), I don't see how this is relevant to anything, since it works fine without the Quad SSC loaded. The problem (again) occurs only when I tried to have an asteroid orbiting each of the two stars and the barycentre.

Whether I have galaxy templates or anything else doesn't seem to be relevant to the issue here. The only thing I change in 1.5.0 to make Celestia load correctly is to move the asteroid orbit from the Quad2 star to the Quad AB Barycentre. This led me to suspect that the issue was something to do with how the barycentre code is parsed - quite why code relating to galaxies should matter here is not clear at all.


in your deepsky.dsc AND did NOT have MilkyWay.png in your 'models' directory.

I don't think I do. But if I don't, then you'll have to explain to me why 1.5.0 works fine without the Quad SSC but doesn't load when the Quad SSC is there. If the galaxy template isn't there either way, why does it only work without the (unrelated) SSC file there? If the missing template is the problem then Celestia shouldn't ever be loading successfully at all - but the only time it doesn't load is when the SSC is there. Can you explain that?


Since you normally are not interested in code details, I spare you the respective explanation.

I've never said that I wasn't interested in code details.


It is simply a "dead sin" to just try using the CVS executable for anything without understanding the code.


If and when I get hold of a fully compiled windows version of 1.5.0 then I'll gladly change to that (didn't someone - phoenix? - make that available on the web?) and see if I still have the problem. Meanwhile, lecturing people about how they shouldn't use the executable (which Chris himself actually made available to me) isn't constructive or helpful. As it is, I appear to have found a bug despite that, so just running the executable is not entirely useless.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #10by t00fri » 25.09.2006, 21:38

Malenfant wrote:...
It is simply a "dead sin" to just try using the CVS executable for anything without understanding the code.

If and when I get hold of a fully compiled windows version of 1.5.0 then I'll gladly change to that (didn't someone - phoenix? - make that available on the web?) and see if I still have the problem. Meanwhile, lecturing people about how they shouldn't use the executable (which Chris himself actually made available to me) isn't constructive or helpful.

Of course Chris and everyone else who might have given you an executable, assumed that you will download yourself from CVS all the other 1.5.0 files /that don't require a compilation/!

It is VERY easy indeed and there are VERY detailed instructions in the forum how to do a CVS checkout with a one-line command.

Not doing so runs the high risk of taking other people's time unnecessarily, by asking them to find the problems in such dangerous hybrid configurations.

As it is, I appear to have found a bug despite that, so just running the executable is not entirely useless.


There is NO bug. Things work fine for Buggs (cf above) with your multiple system. And they work fine for me.
Image

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #11by Malenfant » 25.09.2006, 22:04

Of course Chris and everyone else who might have given you an executable, assumed that you will download yourself from CVS all the other 1.5.0 files /that don't require a compilation/!

Except he didn't assume or ask that at all. He provided me with a couple of DLLs I needed to put in the Celestia folder to get it running and that was it. If you have an issue with that then take it up with Chris. I've not had any problem with this before now. Either way, it isn't relevant to this discussion.


As it is, I appear to have found a bug despite that, so just running the executable is not entirely useless.

There is NO bug. Things work fine for Buggs (cf above) with your multiple system. And they work fine for me.[/quote]

Really? Joe could duplicate the problem and found an error in the code in the second post, which he corrected. Was that not a bug?

Again though, you have failed to explain why this galaxy file is relevant when the only thing that seems to lock up my executable is LOADING A TOTALLY UNRELATED SSC FILE. Since Celestia works fine without that SSC there, the galaxy file is not relevant to the issue I was having. So what is it about the SSC code that is causing Celestia to lock up?

Since apparently you're having trouble following the cause-and-effect here, let me explain the logic again then.

1) I start Celestia 1.5.0 executable without the Quad SSC file but with the Quad STC file. Everything loads up properly, and I can see the Quad star system. Since everything is loading regardless of whether or not I have all the other files and templates, it stands to reason that those other files can't be the problem.

2) I start up Celestia 1.5.0 executable with the Quad SSC file there, and it locks up while loading files. Since the only thing that has changed is the addition of an SSC file that just adds three asteroid orbits to an STC file addon (that is also loaded up), the evidence seems to indicate that something about the SSC file is causing Celestia to hang at startup. The SSC code itself seems fine though.

The evidence indicates that this has nothing to do with mixing and matching newer executables with older versions and it has nothing to do with not having galaxy template files. Until you can explain to me how adding an SSC can cause Celestia to hang on startup, and how fixing some galaxy rendering code can fix this, I remain unconvinced that this was the cause of the problem.

So what is it about the SSC that is causing a problem? And ideally, I'd like someone who isn't Fridger to answer (in fact, I don't want Fridger to respond at all, he's "wasted enough of his time" on this already), since I think I'll get a more constructive answer from someone else.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #12by t00fri » 25.09.2006, 22:20

Malenfant wrote:...
Really? Joe could duplicate the problem and found an error in the code in the second post, which he corrected. Was that not a bug?
Of course NOT. All that Joe did was this

Code: Select all

 //added lines up to line //*****
   if (img == NULL)
      return NULL;
   //*****

I have explained already above that I did not include this check deliberately. It only avoids the hang if the required .png template is (incorrectly) missing in the 'models' directory. Now this is NOT necessarily a good rescue, since e.g. Windows people like yourself would erroneously think everything was fine (despite MilkyWay.png etc. missing!) . Only Linux users could profit from such an additional check, IFF they had started Celestia from a terminal and not from the desktop.

My version of the above is even more detailed:

Code: Select all

    if (img == NULL)
    {
    cout<<"\nThe galaxy template *** "<<filename<<" *** could not be loaded!\n\n";
    return NULL;
    }


But note: All this is unnecessary for a correct installation of Celestia CVS/1.5.0 which you do not have!

And ideally, I'd like someone who isn't Fridger to answer (in fact, I don't want Fridger to respond at all, he's "wasted enough of his time" on this already), since I think I'll get a more constructive answer from someone else.


It's my code, in case you don't know.
Last edited by t00fri on 25.09.2006, 22:21, edited 1 time in total.
Image

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #13by Cham » 25.09.2006, 22:21

Malenfant,

the problem may be weirder than you think. Using your STC file alone (no SSC file) crash Celestia 1.5.0 (and I have all the required files) at start - while trying to load your STC file - just because of that (useless) code below :

Code: Select all

#-------------


#  506 0.35620     0.422     0.209     0.214     0.068     0.067     1.402         0.292          (S+C)
#  506 0.87831    21.413     6.337    15.077     0.432     0.274    92.975        88.484       (S+C)+N1
#  506 0.74052   139.320    33.279   106.041     9.186     5.211   590.984      1281.118    (S+C)+N1+N2
#
#   506 M0   5  0.446  3825.     0.0311688     0.403   3558000128.   1   2  17
#   506 M0   5  0.437  3805.     0.0293278     0.395   3558000128.   1   2  17
#   506 M1   5  0.371  3664.     0.0182237     0.336   3558000128.   1   2  17
#   506 M1   5  0.394  3717.     0.0221441     0.360   3558000128.   1   2  17



If I remove that part from your STC file, it loads correctly. I didn't tried your SSC yet, and I'm sure it will work fine (without that STC code above).


EDIT : I just added your SSC file. Everything went fine. The problem is apparently caused by that useless code in the STC file. I don't understand why it crashes Celestia at loading (with or without your SSC), because all those lines have a # in front on them, so should work.

It just happens that your Celestia is unstable, without the right templates. The appearance of the deepsky.dsc at the loading sequence and crash is just a coincidence and has nothing to do with the problem.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #14by Malenfant » 25.09.2006, 22:54

Huh. OK, I'll try deleting that code and see what happens when I get home. But thanks for the confirmation, Cham - it was quite clear to me that the root of the problem was related to the SSC or STC file, and not to any galaxy files.

But really, Celestia shouldn't be crashing at commented lines.

Don't get me wrong, I'll try to get hold of a full compiled 1.5.0 install, but it's nowhere near as simple to make as Fridger implies, especially if you haven't had any experience in compiling huge programs (the only language I know is Fortran, and I can compile that easily. The problem is that I have no C++ compilers or tools, and the instructions here for what to get and how to use them are somewhat contradictory and confusing).
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #15by chris » 25.09.2006, 23:04

I seem to recall that there's a bug in the Celestia parser that causes the program to hang if an ssc (or stc) file ends with a comment that doesn't have a newline. Try adding a couple blank lines after the comments of the stc file and see if that makes the problem disappear.

--Chris

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #16by Malenfant » 25.09.2006, 23:07

chris wrote:I seem to recall that there's a bug in the Celestia parser that causes the program to hang if an ssc (or stc) file ends with a comment that doesn't have a newline. Try adding a couple blank lines after the comments of the stc file and see if that makes the problem disappear.

--Chris


OK, I'll try that too. Thanks, Chris.
Are you planning to fix that for 1.5.0?
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #17by t00fri » 25.09.2006, 23:10

Malenfant wrote:
But really, Celestia shouldn't be crashing at commented lines.

It doesn't, if you have a correct installation. I deny to speculate about the cause of your problems before having precise info about what is old and what is new in your hybrid configuration.

Don't get me wrong, I'll try to get hold of a full compiled 1.5.0 install, but it's nowhere near as simple to make as Fridger implies,

It is precisely as easy: a one-line command reads out the whole CVS distribution from CVS. Of course you need to install some CVS client program. Either native Windows or via CYGWIN.

Note, I am not talking about compiling yourself, as you go on with here
especially if you haven't had any experience in compiling huge programs (the only language I know is Fortran, and I can compile that easily. The problem is that I have no C++ compilers or tools, and the instructions here are somewhat contradictory and confusing).


+++++++++++++++++
I just suggest to do a complete CVS download of 1.5.0 from CVS and then plug in the Celestia executable that you got from Chris or Phoenix.
+++++++++++++++++

For that you don't need any C++ compilers or tools.
Image

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #18by Cham » 25.09.2006, 23:18

Fridger,

Malenfant's problem can be reproduced (I confirm the crash), but it's unrelated to his wrong installation of 1.5.0, and it's unrelated to the DSC catalog. It's caused by a problem located at the end of his STC file only (that block of useless info). I tought it was a bad invisible character, but I didn't checked. I strongly suspect Chris may have the right explanation (see his previous post).
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #19by Malenfant » 25.09.2006, 23:30

t00fri wrote:It doesn't, if you have a correct installation. I deny to speculate about the cause of your problems before having precise info about what is old and what is new in your hybrid configuration.


Cham and Chris seem to have identified the bug that you claim doesn't exist, and verified that it is repeatable in a full installation. I suspect they managed to see the problem that you failed to identify because they actually listened to what was being reported. Unfortunately, Fridger, despite all your lecturing it turns out that you were completely wrong about this.

However, I will try to download the other files from the CVS so at least I have all the right data in the Celestia folders. But the instructions for windows users on the development board to download and compile the CVS code really needs to be cleaned up and made a lot clearer and less contradictory if they're to be any use.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #20by Malenfant » 26.09.2006, 01:19

Hm. I removed the comment code completely and it still doesn't load. The SSC is definitely the problem too - the STC loads fine for me with or without the comment code at the end.

Unfortunately I can't download the files from the CVS because it's not letting me in...
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system


Return to “Bugs”