stars8 catalogue is not loaded in 0.10.4 and lower (for me)

Bug #554541 reported by Denri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Medium
Fabien Chéreau

Bug Description

Log:

2010-02-23T19:27:27
Unsupported Windows version ((( I have W7-64x-En)))
Compiled with GCC 4.4.0
Qt runtime version: 4.6.2
Qt compilation version: 4.6.2
Addressing mode: 32-bit
Total memory: 3327 MB (unreliable)
Total virtual memory: 2047 MB (unreliable)
Physical memory in use: 38%
Processor speed: 2747 MHz
Processor name: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz
Processor speed: 2747 MHz
Processor name: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz
Processor speed: 2746 MHz
Processor name: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz
Processor speed: 2747 MHz
Processor name: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz
C:\Program Files (x86)\Stellarium\stellarium.exe
 -------------------------------------------------------
[ This is Stellarium 0.10.4 - http://www.stellarium.org ]
[ Copyright (C) 2000-2010 Fabien Chereau et al ]
 -------------------------------------------------------
Writing log file to: "C:/Users/Denri/AppData/Roaming/Stellarium/log.txt"
File search paths:
  0 . "C:\Users\Denri\AppData\Roaming\Stellarium"
  1 . "."
Attempting to use an existing older config file.
Config file is: "C:\Users\Denri\AppData\Roaming\Stellarium/config.ini"
WARNING StelFileMgr::setScreenshotDir dir is not writable: "C:/Users/Denri/Desktop"
WARNING: problem while setting screenshot from config file setting: NOT_VALID
Qt GL paint engine is: "OpenGL2"
QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
 "
QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
 "
Cache directory is: "C:\Users\Denri\AppData\Local\stellarium\stellarium\cache"
Sky language is "ru"
Application language is "ru"
Loading Solar System data ...
Loaded 38 / 38 planet orbits
Loading star data ...
QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
 "
"Loading "./stars/default/stars_0_0v0_1.cat": 0_0v0_1; 5013"
"Loading "./stars/default/stars_1_0v0_1.cat": 1_0v0_1; 21999"
"Loading "./stars/default/stars_2_0v0_1.cat": 2_0v0_1; 151416"
"Loading "./stars/default/stars_3_1v0_0.cat": 3_1v0_0; 434064"
"Loading "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_4_1v0_0.cat": 4_1v0_0; 1725497"
"Loading "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_5_2v0_0.cat": 5_2v0_0; 7669011"
"Loading "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_6_2v0_0.cat": 6_2v0_0; 26615233"
"Loading "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_7_2v0_0.cat": 7_2v0_0; 57826266"
Found file "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_8_2v0_0.cat" , checking md5sum..
MD5 sum correct!
ERROR: SpecialZoneArray( 8 )::SpecialZoneArray: QFile( "C:/Users/Denri/AppData/Roaming/Stellarium/stars/default/stars_8_2v0_0.cat" .map( 5242912 , 701538504 ) failed: "Not enough storage is available to process this command."
"Loading "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_8_2v0_0.cat": 8_2v0_0; - initialization failed"
Finished loading star catalogue data, max_geodesic_level: 7
navigation/preset_sky_time is a double - treating as jday: 2.45151e+06
Loaded 10051 NGC records
Loading NGC name data ...
Loaded 222 / 222 NGC name records successfully
Loaded 88 / 88 constellation records successfully for culture "western"
Loaded 85 / 85 constellation art records successfully for culture "western"
Loaded 89 / 89 constellation names
Loading constellation boundary data ...
Loaded 782 constellation boundary segments
Loading star names from "./skycultures/western/star_names.fab"
Loaded 230 / 230 common star names
Loading star names from "./stars/default/name.fab"
Loaded 3215 / 4359 scientific star names
Creating GUI ...
QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
 "
QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
 "
QGLShader::link: "Fragment shader(s) linked, vertex shader(s) linked.
 "
Downloaded 0 files (0 kbytes) in a session of 34.343 sec (average of 0 kB/s + 0 files from cache (0 kB)).

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Could you please download the test build from here:
https://launchpad.net/stellarium/+download

And report if the problem is still present in it?

Revision history for this message
Denri (denri) wrote :

This is Stellarium 0.10.5 (SVN r6110)

Log:
...
"Loading "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_7_2v0_0.cat": 7_2v0_0; 57826266"
Found file "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_8_2v0_0.cat" , checking md5sum..
Error: Unable to checksum file "stars/default/stars_8_2v0_0.cat"
Finished loading star catalogue data, max_geodesic_level: 7
...

Revision history for this message
Denri (denri) wrote :

This is Stellarium 0.10.5 (SVN r6177)

Log:

...
Found file "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_7_2v0_0.cat" , checking md5sum..
MD5 sum correct!
"Loading "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_7_2v0_0.cat": 7_2v0_0; 57826266"
Found file "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_8_2v0_0.cat" , checking md5sum..
Error: Unable to checksum file "stars/default/stars_8_2v0_0.cat"
Finished loading star catalogue data, max_geodesic_level: 7

Revision history for this message
Fabien Chéreau (xalioth) wrote :

OK, this must be because mmap apparently doesn't manage to map the large file. In this case we should fallback to the previous (slower) method. I'll do that now.

Changed in stellarium:
assignee: nobody → Fabien Chéreau (xalioth)
milestone: none → 0.10.5
importance: Undecided → Medium
Revision history for this message
Fabien Chéreau (xalioth) wrote :

Denri, could you please try again with rev 6183?

Changed in stellarium:
status: New → Fix Committed
Revision history for this message
Denri (denri) wrote :

Fabien Chéreau, yes, i can.

But https://launchpad.net/stellarium/+download doesn't provide a link to rev 6183.

Wait...

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Reverting to the previous method only returns us to the situation in the original post. From both my log (revision 6183) and the log in the bug description:

ERROR: SpecialZoneArray( 8 )::SpecialZoneArray: QFile( "D:/StellariumUserData/stars/default/stars_8_2v0_0.cat" .map( 5242912 , 701538504 ) failed: "Not enough storage is available to process this command."

Note that QFile::map() fails at exactly the same place.

I think that the reason is insufficient memory. Which is strange, because on my computer this happens only in Windows, not in Ubuntu - I can load all catalogs there. Linux has better memory management? :) The compiler adds less bloat?

Changed in stellarium:
status: Fix Committed → Confirmed
Revision history for this message
Matthew Gates (matthew-porpoisehead) wrote : Re: [Bug 554541] Re: stars8 catalogue is not loaded in 0.10.4 and lower (for me)

Which windows? I think XP had a 2 gig address limit or something.

Revision history for this message
Fabien Chéreau (xalioth) wrote :

I see. Then I guess I can just revert my hack..

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Windows XP.

Fabien, don't revert it - it still fixes the problem with the checksum.

I'm going to upload a new test build (revision 6183).

Revision history for this message
Denri (denri) wrote :

SVN r6184

Log:
...
Found file "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_8_2v0_0.cat" , checking md5sum..
MD5 sum correct!
ERROR: SpecialZoneArray( 8 )::SpecialZoneArray: QFile( "C:/Users/Denri/AppData/Roaming/Stellarium/stars/default/stars_8_2v0_0.cat" .map( 5242912 , 701538504 ) failed: "Not enough storage is available to process this command."
"Loading "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_8_2v0_0.cat": 8_2v0_0; - initialization failed"
Finished loading star catalogue data, max_geodesic_level: 7
...

Revision history for this message
Fabien Chéreau (xalioth) wrote :

Oh yes indeed Bogdan, so I let it like that. I guess we cannot do more for this bug since it's a hardware/OS problem.
Fab

Changed in stellarium:
status: Confirmed → Fix Committed
Revision history for this message
Denri (denri) wrote :

It is not a hardware/OS problem.

XP 32bit has limit for memory up to 2 GB.

But i have Se7en 64bit, and NO limit for memory up to 2 GB.

This problem was with 8GB memory on Se7en 64bit, now i have 3.3GB memory on Se7en 64bit with the same problem.

I guess you can do more for this bug since it's a problem with the checksum.

***This is Stellarium 0.10.5 (SVN r6110)
***Found file "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_8_2v0_0.cat" , checking md5sum..
***Error: Unable to checksum file "stars/default/stars_8_2v0_0.cat"
*******
***This is Stellarium 0.10.5 (SVN r6177)
***Found file "C:\Users\Denri\AppData\Roaming\Stellarium/stars/default/stars_8_2v0_0.cat" , checking md5sum..
***Error: Unable to checksum file "stars/default/stars_8_2v0_0.cat"

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

The checksum problem has been fixed by Fabien and the fix hasn't been reverted. If you look at the log in your original report and in comment #11, you will notice this:

ERROR: SpecialZoneArray( 8 )::SpecialZoneArray: QFile( "..." .map( 5242912 , 701538504 ) failed: "Not enough storage is available to process this command."

I think it's a problem in the Windows implementation of Qt's file engine, something under the map() function - cache size or something else. It appears that "Not enough storage is available to process this command." is a Windows native error message.

Barry Gerdes mentioned that after some of the previous changes, he was able to load catalog 8 together with 7.

Revision history for this message
Denri (denri) wrote :

I do not know what to say...

0.10.5 will be able or not to load this 8 catalog?

Answer me, please...

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I don't know. Right at the moment, there is no fix that addresses the problem that occurs on both my and your system. If this remains so, then - no.

Revision history for this message
Matthew Gates (matthew-porpoisehead) wrote :

Maybe your file is corrupted? What md5 checksum do you get for the file? It should be:

b804136f5c5584e9508f21a1f7aa1a28 stars_8_2v0_0.cat

Matthew

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Matthew, please read again the log in comment #11. The MD5 checksum is performed OK. What fails is the QFile::map() operation in SpecialZoneArray.

Revision history for this message
Matthew Gates (matthew-porpoisehead) wrote :

my bad

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

After a user mentioned that number 8 has worked for him in 0.10.2, I decided to have a look at the changes that have been made since then.
https://answers.launchpad.net/stellarium/+question/108429

As there seems to be a problem with QFile::map(), I tried to build a version where ZoneArray::create is called with use_mmap=false for catalog #8. (See line 347 in StarMgr.cpp.)

Unfortunately, it can't run - while loading catalog #8, Stellarium crashes with a segmentation fault in StelPainter (!). Some debugging later I found out that the crash is caused by line 327 in ZoneArray.cpp:

zones = new SpecialZoneData<Star>[nr_of_zones];

I don't know what relation this has to StelPainter, I guess some kind of memory overflow.

Does anyone has any ideas?

(All of this happens on Windows XP SP3.)

Revision history for this message
Fabien Chéreau (xalioth) wrote :

It's strange, normally is the allocation fails it should exit, not crash in another place.... you could have a try with valgrind if it exists on win32.
Fab

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Correction to the previous comment - It's actually line 404 in ZoneArray.cpp:

stars = new Star[nr_of_stars];

Fabien, according to the GCC documentation, if the "new" operator fails, it throws a std::bad_alloc exception, but this is not captured anywhere in the code.

Revision history for this message
Fabien Chéreau (xalioth) wrote :

Ah OK it makes much more sense here indeed. Did you try to add a catch there? It's probably going to solve the problem.
Thanks,
Fabien

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Yes, I've confirmed with a try/catch that it throws a std::bad_alloc. I will re-write the code to make it fail gracefully, like it does in the QFile::map case - now it just exits.

But this doesn't solve the mystery why I can load all catalogues on Linux, but not on Windows.

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I've tracked the QFile::map() problem to the QFSFileEnginePrivate::map() method in qfsfileengine_win.cpp (line 1916+).

It seems that this is a problem either with Qt's or Windows' implementation of file mapping.
http://msdn.microsoft.com/en-us/library/aa366537.aspx
http://msdn.microsoft.com/en-us/library/aa366761.aspx

It seems that on Linux, the file is mapped to the virtual memory, but on Windows this fails for some reason.

Changed in stellarium:
status: Fix Committed → Fix Released
Revision history for this message
Keatah (keatah) wrote :

I still continue to have the problem of being able to load the last catalog due to lack of memory on a 2gb system, but it loads just fine on my 1gb system. And both are xp-sp3 now. So this isn't an OS problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.