stage patch - fix uninitialized Model::Visibility members

View: New views
2 Messages — Rating Filter:   Alert me  

stage patch - fix uninitialized Model::Visibility members

by Jeff Donner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>From valgrind -

==10087== Conditional jump or move depends on uninitialised value(s)
==10087==    at 0x4ED1291: Stg::Model::Load() (model_load.cc:191)
==10087==    by 0x4EE6CF7: Stg::Model::Load(Stg::Worldfile*, int)
(stage.hh:2044)
==10087==    by 0x4EE4352: Stg::World::LoadModel(Stg::Worldfile*, int)
(world.cc:303)
==10087==    by 0x4EE4991: Stg::World::Load(char const*) (world.cc:383)
==10087==    by 0x4F0DFC7: Stg::WorldGui::Load(char const*) (worldgui.cc:268)
==10087==    by 0x40151B: main (main.cc:90)
==10087==

  Model::Visibility gravity_return and sticky_return not getting initialized.

Against 8330.

Index: libstage/model.cc
===================================================================
--- libstage/model.cc (revision 8330)
+++ libstage/model.cc (working copy)
@@ -218,7 +218,9 @@
   gripper_return( false ),
   laser_return( LaserVisible ),
   obstacle_return( true ),
-  ranger_return( true )
+  ranger_return( true ),
+  gravity_return( false ),
+  sticky_return( false )
 { /* nothing do do */ }
 
 //static const members

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Playerstage-developers mailing list
Playerstage-developers@...
https://lists.sourceforge.net/lists/listinfo/playerstage-developers

Re: stage patch - fix uninitialized Model::Visibility members

by Richard Vaughan-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hmm, I don't recall adding those. They're not referenced in the rest
of the code, so I'm removing them. If someone wants them badly enough,
they'll let me know.

- rtv

On Tue, Oct 27, 2009 at 6:34 PM, Jeff Donner <jeffrey.donner@...> wrote:

> >From valgrind -
>
> ==10087== Conditional jump or move depends on uninitialised value(s)
> ==10087==    at 0x4ED1291: Stg::Model::Load() (model_load.cc:191)
> ==10087==    by 0x4EE6CF7: Stg::Model::Load(Stg::Worldfile*, int)
> (stage.hh:2044)
> ==10087==    by 0x4EE4352: Stg::World::LoadModel(Stg::Worldfile*, int)
> (world.cc:303)
> ==10087==    by 0x4EE4991: Stg::World::Load(char const*) (world.cc:383)
> ==10087==    by 0x4F0DFC7: Stg::WorldGui::Load(char const*) (worldgui.cc:268)
> ==10087==    by 0x40151B: main (main.cc:90)
> ==10087==
>
>  Model::Visibility gravity_return and sticky_return not getting initialized.
>
> Against 8330.
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Playerstage-developers mailing list
> Playerstage-developers@...
> https://lists.sourceforge.net/lists/listinfo/playerstage-developers
>
>



--
Richard Vaughan
Autonomy Lab / Computing Science / Simon Fraser University

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Playerstage-developers mailing list
Playerstage-developers@...
https://lists.sourceforge.net/lists/listinfo/playerstage-developers