The annoying Bookmark bug is still in 1.5.0 !

Report bugs, bug fixes and workarounds here.
Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

The annoying Bookmark bug is still in 1.5.0 !

Post #1by Cham » 22.09.2007, 03:58

I noticed a bug in the bookmarks menu. Apparently, according to Dirkpitt, it's an old bug that was introduced a long time ago and was "forgotten". As an example, I made a simple bookmark of the Milky Way, as seen from the outside :

cel://Follow/OGLE-TR-56/2004-01-08T05:5 ... lect=Milky Way&fov=38.300713&ts=1.000000&ltd=0&rf=578967&lm=0&ver=2

Then, each time I use the bookmark, the view is okay but it is selecting OGLE-TR-56 instead ! The bookmark bug is actually afflicting all my nebulae bookmarks. Each time I use one nebula bookmark from my favorites menu, I get the proper view of the nebula, but nothing is selected in the upper-left corner, even if the bookmark was made with a
selected nebula. This is annoying.
"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!"

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #2by dirkpitt » 22.09.2007, 10:24

Just to add, this bug is reproducible on both Windows and Mac (don't know about Linux). Just select any DSO, bookmark, then select the bookmark to go to the DSO again - a totally wrong object like OGLE-TR-56 will be selected instead. This bug has been around since at least Celestia-FT.

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #3by Vincent » 22.09.2007, 10:42

I can indeed reproduce this bug on Windows.
I noticed it a while ago, but forgot to report it.
I agree with Martin: this bug is quite disturbing.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #4by Vincent » 22.09.2007, 10:57

I had a quick look into the favorites.cel file.
The selected object is defined in the "selection" field.
I tried to save a bookmark with the Milky Way as the selected object,
and then noticed that the selection field was wrongly defined as "#2".
I replaced "#2" with "Milky Way" and that fixed the problem.

So, a turn around would be to manually edit the favorites.cel file.
I'll have a look in the code to see if an easy fix can be found.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #5by Vincent » 22.09.2007, 11:58

The following change in celestiacore.cpp seems to fix the bug, at least on Windows:

Code: Select all

Index: src/celestia/celestiacore.cpp
===================================================================
RCS file: /cvsroot/celestia/celestia/src/celestia/celestiacore.cpp,v
retrieving revision 1.230
diff -u -r1.230 celestiacore.cpp
--- src/celestia/celestiacore.cpp   18 May 2007 19:14:38 -0000   1.230
+++ src/celestia/celestiacore.cpp   22 Sep 2007 11:53:34 -0000
@@ -445,7 +445,13 @@
     fav->name = name;
     fav->isFolder = false;
     fav->parentFolder = parentFolder;
-    fav->selectionName = sim->getSelection().getName();
+   
+    Selection sel = sim->getSelection();
+    if (sel.deepsky() != NULL)
+       fav->selectionName = sim->getUniverse()->getDSOCatalog()->getDSOName(sel.deepsky());
+    else
+       fav->selectionName = sel.getName();
+
     fav->coordSys = sim->getFrame().coordSys;
 
     favorites->insert(pos, fav);


Martin, DW, could you test it on your system, please ?
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #6by Cham » 22.09.2007, 16:20

Vincent,

I made the changes you posted, and after recompilation, I don't see any difference. The bookmarks behave (wrongly) the same. Maybe I didn't edited the code properly ? (but then I don't see what error I may have done : I removed the line associated to the "minus" you gave on line 449, and added the lines associated to the "+" you gave above. The compilation went fine).
"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!"

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #7by dirkpitt » 22.09.2007, 16:30

You did nothing wrong Cham - actually for some reason the Mac version is not using
the cross platform favorites storage (which is what Vincent's code patches), but has
duplicate code that was doing the same thing. (Why? I didn't code it so I don't know...)

Anyway, once this duplicate code was patched the bug appears to be fixed (thanks Vincent!)
The fix appears to be robust under different locales too, which was the main thing I was worrying about.

I've committed a temporary Mac-only fix for now (Cham: CVS has been updated,
Vincent: I only touched the Mac gui code - your patch for the cross platform celestiacore.cpp
still needs to be committed to make the fix available to other platforms).

A longer term solution would be to remove all the duplicate code in the Mac front end
and start using the cross platform favorites storage like every other platform.
Last edited by dirkpitt on 22.09.2007, 16:53, edited 1 time in total.

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

Post #8by Cham » 22.09.2007, 16:51

Thanks DW, I'm updating...
"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!"

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

Post #9by Cham » 22.09.2007, 17:08

Great ! It's working properly now !

Thanks a lot for both of you guys, Vincent and Da Woon.

At least, there is still hope to see some bug fixes and improvements in Celestia ! :D
"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!"

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #10by Vincent » 22.09.2007, 17:15

dirkpitt wrote:I've committed a temporary Mac-only fix for now (Cham: CVS has been updated,
Vincent: I only touched the Mac gui code - your patch for the cross platform celestiacore.cpp
still needs to be committed to make the fix available to other platforms).
Cham wrote:Great ! It's working properly now !

Thanks a lot for both of you guys, Vincent and Da Woon.

At least, there is still hope to see some bug fixes and improvements in Celestia ! :D

Good to know that the patch is working on both Mac and Windows. :)
I'll submit the change I made to the dev list...
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #11by Vincent » 24.09.2007, 15:56

I've committed my change to CVS.
The bug should be fixed on all platforms now.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3


Return to “Bugs”