Segfault/assertion failure in sky image loading

Bug #335327 reported by Mike Storm
2
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Undecided
Unassigned

Bug Description

Run the script tests/sky_image.ssc. If compiled in "Release" mode, Stellarium will segfault at line 41 of StelSphereGeometry.cpp. If compiled in "Debug" mode, this is the output:

ASSERT: "fabs(n2.lengthSquared()-1.)<0.000001" in file /home/michael/stellarium-head/src/core/StelSphereGeometry.cpp, line 145

I'll post backtraces if necessary, but it's simple to reproduce the error. Note that in both cases, Stellarium crashed in the image display code. This means that the image was already loaded, but I would guess the data is corrupted. Changing the file name in the script from "../textures/logo24bits.png" to "../textures/callisto.png" makes no difference, and displaying either in eog works fine.

Mike

Revision history for this message
Mike Storm (oopsdude) wrote :

This also happens when you press "c" to show the constellation lines. The backtraces now make me suspect a bug in StelGeom, but I can't know for sure since I don't understand the code. Also, running the tests/sky_image.ssc script crashes instantly now, instead of just after loading the first image. Strange.

Here's the backtrace of pressing "c":
#0 0x00007ff702bc9015 in raise () from /lib/libc.so.6
#1 0x00007ff702bcab83 in abort () from /lib/libc.so.6
#2 0x00007ff70462fb74 in qt_message_output (msgType=QtFatalMsg,
    buf=0x2efc2a8 "ASSERT: \"fabs(n2.lengthSquared()-1.)<0.000001\" in file /home/michael/stellarium-tmp/src/core/StelSphereGeometry.cpp, line 145")
    at global/qglobal.cpp:2001
#3 0x00007ff70462fca1 in qFatal (
    msg=0x7ff7047be140 "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2196
#4 0x00007ff704630185 in qt_assert (
    assertion=0x6f2938 "fabs(n2.lengthSquared()-1.)<0.000001",
    file=0x6f28d0 "/home/michael/stellarium-tmp/src/core/StelSphereGeometry.cpp", line=145) at global/qglobal.cpp:1772
#5 0x0000000000584859 in StelGeom::planeIntersect2 (h1=@0x7fff0ec44cc0,
    h2=@0x7fff0ec44ca0, p1=@0x7fff0ec44d60, p2=@0x7fff0ec44d60)
    at /home/michael/stellarium-tmp/src/core/StelSphereGeometry.cpp:145
#6 0x00000000005e25e6 in Constellation::drawOptim (this=0x29fd6d0,
    sPainter=@0x7fff0ec44e80, nav=0x22ecc00)
    at /home/michael/stellarium-tmp/src/modules/Constellation.cpp:115
#7 0x00000000005e79a7 in ConstellationMgr::drawLines (this=0x26da080,
    sPainter=@0x7fff0ec44e80, nav=0x22ecc00)
    at /home/michael/stellarium-tmp/src/modules/ConstellationMgr.cpp:488
#8 0x00000000005e7ae1 in ConstellationMgr::draw

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

I noticed this happening last night. I tried to run a script and bam, over it went.

It only seems to have started since I did a build with QT 4.5. I commented out the assert and the script runs without a problem.

Are you building with QT 4.5?

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

Tracked it down to revision 4288. Will have a look in a bit.

Revision history for this message
Mike Storm (oopsdude) wrote : Re: [Bug 335327] Re: Segfault/assertion failure in sky image loading

Yes, I am. Qt-4.5-rc1. I tried fixing it myself, but I'm not familiar
enough with that code.

Thanks,
Mike

On Fri, Feb 27, 2009 at 9:30 AM, Matthew Gates <email address hidden> wrote:
> Tracked it down to revision 4288.  Will have a look in a bit.
>
> --
> Segfault/assertion failure in sky image loading
> https://bugs.launchpad.net/bugs/335327
> You received this bug notification because you are a member of
> Stellarium, which is subscribed to Stellarium.
>
> Status in Stellarium: New
>
> Bug description:
> Run the script tests/sky_image.ssc. If compiled in "Release" mode, Stellarium will segfault at line 41 of StelSphereGeometry.cpp. If compiled in "Debug" mode, this is the output:
>
> ASSERT: "fabs(n2.lengthSquared()-1.)<0.000001" in file /home/michael/stellarium-head/src/core/StelSphereGeometry.cpp, line 145
>
> I'll post backtraces if necessary, but it's simple to reproduce the error. Note that in both cases, Stellarium crashed in the image display code. This means that the image was already loaded, but I would guess the data is corrupted. Changing the file name in the script from "../textures/logo24bits.png" to "../textures/callisto.png" makes no difference, and displaying either in eog works fine.
>
> Mike
>

Revision history for this message
Mike Storm (oopsdude) wrote :

Yes, I am. Qt-4.5-rc1. I tried fixing it myself, but I'm not familiar
enough with that code.

Thanks,
Mike

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

Hi guys,
I fixed the problem for the constellations, when I run the tests/sky_image.ssc script, it also crashes but at a different position, so I assume it is a different problem.
Fabien

Changed in stellarium:
milestone: none → 0.10.2
status: New → Fix Committed
Changed in stellarium:
status: Fix Committed → Fix Released
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.