Segmentation fault @ line 480

Bug #982549 reported by Michael Rawson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
roadrage
New
Low
Unassigned

Bug Description

Compiling with and without debug flags:

load audio()

Program received signal SIGSEGV, Segmentation fault.
0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
    at rr.cpp:480
480 if ((abs(mpos.X - mapfile[bt].node->getPosition().X) >= length) || (abs(mpos.Z - mapfile[bt].node->getPosition().Z) >= length)) {

(gdb) bt
#0 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
    at rr.cpp:480
#1 0x0000000000406a1a in vscreen::gameloop (this=0x0) at rr.cpp:961
#2 0x0000000000401f7e in main () at rr.cpp:1038
(gdb)

Not trying to bring you down with these bugs, just trying to make the software better. :)

Looking at the source now and looking at some of the compiler warnings.

Revision history for this message
Michael Rawson (michael.rawson) wrote :

Well, I've fixed some of the compiler warnings, I'll push those.

The problem with the segmentation fault is that mpos.X at least, equates to NULL. Somehow node->getAbsolutePosition() is failing.

Revision history for this message
Michael Rawson (michael.rawson) wrote :

odd...
$bzr push lp:roadrage
bzr: ERROR: Cannot lock LockDir(chroot-81833104:///%2Bbranch/roadrage/.bzr/branch/lock): Transport operation not possible: readonly transport

Revision history for this message
eross (drarem) wrote : Re: [Bug 982549] Re: Segmentation fault @ line 480

I'm here for a few minutes on irc, freenode.net as skulltip in #ubuntu..

On Sun, Apr 15, 2012 at 4:13 PM, Michael Rawson
<email address hidden>wrote:

> odd...
> $bzr push lp:roadrage
> bzr: ERROR: Cannot lock
> LockDir(chroot-81833104:///%2Bbranch/roadrage/.bzr/branch/lock): Transport
> operation not possible: readonly transport
>
> --
> You received this bug notification because you are a member of BrainDead
> Studios Software, which is the registrant for roadrage.
> https://bugs.launchpad.net/bugs/982549
>
> Title:
> Segmentation fault @ line 480
>
> Status in Road Rage:
> New
>
> Bug description:
> Compiling with and without debug flags:
>
> load audio()
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
> at rr.cpp:480
> 480 if ((abs(mpos.X -
> mapfile[bt].node->getPosition().X) >= length) || (abs(mpos.Z -
> mapfile[bt].node->getPosition().Z) >= length)) {
>
> (gdb) bt
> #0 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
> at rr.cpp:480
> #1 0x0000000000406a1a in vscreen::gameloop (this=0x0) at rr.cpp:961
> #2 0x0000000000401f7e in main () at rr.cpp:1038
> (gdb)
>
>
> Not trying to bring you down with these bugs, just trying to make the
> software better. :)
>
> Looking at the source now and looking at some of the compiler
> warnings.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/roadrage/+bug/982549/+subscriptions
>

Revision history for this message
Michael Rawson (michael.rawson) wrote :

Awesome. I'm on it.

Revision history for this message
eross (drarem) wrote :

the gameloop is within the same class, perhaps on the first pass (class
constructor) it sees a NULL value?

On Sun, Apr 15, 2012 at 5:06 PM, Michael Rawson
<email address hidden>wrote:

> Awesome. I'm on it.
>
> --
> You received this bug notification because you are a member of BrainDead
> Studios Software, which is the registrant for roadrage.
> https://bugs.launchpad.net/bugs/982549
>
> Title:
> Segmentation fault @ line 480
>
> Status in Road Rage:
> New
>
> Bug description:
> Compiling with and without debug flags:
>
> load audio()
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
> at rr.cpp:480
> 480 if ((abs(mpos.X -
> mapfile[bt].node->getPosition().X) >= length) || (abs(mpos.Z -
> mapfile[bt].node->getPosition().Z) >= length)) {
>
> (gdb) bt
> #0 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
> at rr.cpp:480
> #1 0x0000000000406a1a in vscreen::gameloop (this=0x0) at rr.cpp:961
> #2 0x0000000000401f7e in main () at rr.cpp:1038
> (gdb)
>
>
> Not trying to bring you down with these bugs, just trying to make the
> software better. :)
>
> Looking at the source now and looking at some of the compiler
> warnings.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/roadrage/+bug/982549/+subscriptions
>

Revision history for this message
Michael Rawson (michael.rawson) wrote :

Perhaps. But the offending function is only used within the gameloop and the variable seems to be instantiated. IDK.

Revision history for this message
Michael Rawson (michael.rawson) wrote :

Works fine now. :)

Revision history for this message
eross (drarem) wrote :

Hmm.. what changed?

On Mon, Apr 16, 2012 at 5:15 AM, Michael Rawson
<email address hidden>wrote:

> Works fine now. :)
>
> --
> You received this bug notification because you are a member of BrainDead
> Studios Software, which is the registrant for roadrage.
> https://bugs.launchpad.net/bugs/982549
>
> Title:
> Segmentation fault @ line 480
>
> Status in Road Rage:
> New
>
> Bug description:
> Compiling with and without debug flags:
>
> load audio()
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
> at rr.cpp:480
> 480 if ((abs(mpos.X -
> mapfile[bt].node->getPosition().X) >= length) || (abs(mpos.Z -
> mapfile[bt].node->getPosition().Z) >= length)) {
>
> (gdb) bt
> #0 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
> at rr.cpp:480
> #1 0x0000000000406a1a in vscreen::gameloop (this=0x0) at rr.cpp:961
> #2 0x0000000000401f7e in main () at rr.cpp:1038
> (gdb)
>
>
> Not trying to bring you down with these bugs, just trying to make the
> software better. :)
>
> Looking at the source now and looking at some of the compiler
> warnings.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/roadrage/+bug/982549/+subscriptions
>

Revision history for this message
Michael Rawson (michael.rawson) wrote :

I have absolutely no clue. I suggest you look at the diff for rev no. 10...

Revision history for this message
Michael Rawson (michael.rawson) wrote :

Btw, I'm starting work on the actual game, so far, I've got a gameloop class that starts the game, and a media class which makes all of the files available after loading them once.

Revision history for this message
eross (drarem) wrote :

Ok.. I did comment out the assert which may be why you're not exiting now.

On Mon, Apr 16, 2012 at 10:47 AM, Michael Rawson
<email address hidden>wrote:

> Btw, I'm starting work on the actual game, so far, I've got a gameloop
> class that starts the game, and a media class which makes all of the
> files available after loading them once.
>
> --
> You received this bug notification because you are a member of BrainDead
> Studios Software, which is the registrant for roadrage.
> https://bugs.launchpad.net/bugs/982549
>
> Title:
> Segmentation fault @ line 480
>
> Status in Road Rage:
> New
>
> Bug description:
> Compiling with and without debug flags:
>
> load audio()
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
> at rr.cpp:480
> 480 if ((abs(mpos.X -
> mapfile[bt].node->getPosition().X) >= length) || (abs(mpos.Z -
> mapfile[bt].node->getPosition().Z) >= length)) {
>
> (gdb) bt
> #0 0x0000000000404324 in vscreen::Occlude (this=0x0, mpos=..., length=15)
> at rr.cpp:480
> #1 0x0000000000406a1a in vscreen::gameloop (this=0x0) at rr.cpp:961
> #2 0x0000000000401f7e in main () at rr.cpp:1038
> (gdb)
>
>
> Not trying to bring you down with these bugs, just trying to make the
> software better. :)
>
> Looking at the source now and looking at some of the compiler
> warnings.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/roadrage/+bug/982549/+subscriptions
>

Revision history for this message
Michael Rawson (michael.rawson) wrote :

Nah, I put that in to see if it was null or not. Seems to be fixed now, whatever it was. :)

eross (drarem)
Changed in roadrage:
importance: Undecided → Low
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.