[epiar-devel] [SPAM] Re: I am getting some errors during compile time.
Christopher Thielen
chris at epiar.net
Sun Aug 1 11:36:49 PDT 2010
FYI, I saw on #epiar the multithreading topic came up - SDL does have
multithreading available for us to use (and we should, since it
implements it in a cross-platform way, if we wanted multithreading), and
SDL itself may also employ multithreading on a given system to do things
like input w/o really telling you - it varies widely from system to system.
On 8/1/10 2:32 AM, Gerard Sweeney wrote:
> I think I eventually found the problem, and I've pushed it to my
> github repository and Matthew has pulled them into his repository.
> The solution that I've implemented is change the 'string name' in the
> StatusBar class into 'vector<char> name' - it seems like something in
> the string reference counting (guessing here) wasn't playing nice with
> the constant reassignment of the string object when it was changed via
> Hud::setStatus() -> StatusBar::setName(). I saw something online about
> it not working too well with multithreading so maybe there's something
> related there? Once I made the fix I wasn't able to reproduce the
> exact same issue again, although there's another crash signature that
> happens sporadically.
>
> If any of you see the issue again please let me know and I'll try to
> figure it out. This fail is a segfault that happens inside
> Hud::setStatus - you'll see a printout for "Entering setStatus", the
> crashing signature is a segfault before you see "Leaving setStatus"
> (or something similar).
>
> ~Ger
>
>
> On Sun, Aug 1, 2010 at 1:41 AM, Gerard Sweeney
> <gerard0sweeney at gmail.com <mailto:gerard0sweeney at gmail.com>> wrote:
>
> Maoserr:
> Yes, shared pointers (now in std::tr1 rather than boost) is what
> I'm referring to.
>
> Matthew:
> You're correct actually - and this late at night I'm having
> trouble coming up with an explanation for it...
> In theory the 'new'ed memory should stay valid, but something is
> corrupting it - from what I could figure out earlier it's
> something to do with the string assignment in setStatus. For some
> reason, not using naked pointers (ie using smart pointers) stops
> this from happening. My first instinct when I see a naked pointer
> is to want to change it to a smart pointer as I've seen this kind
> of thing happen before. I'll try to pinpoint exactly where the
> corruption was occurring before I push my planned changes rather
> than relying on my intuition that this is guaranteed to fix it,
> though :-)
>
>
>
> On Sun, Aug 1, 2010 at 12:52 AM, Maoserr <maoserr at gmail.com
> <mailto:maoserr at gmail.com>> wrote:
>
> I believe he's talking about using boost shared pointers,
> which we aren't
> using right now. It's a reference counting pointer implementation.
>
> On Sat, 31 Jul 2010 19:43:44 -0400, Matthew Zweig
> <thezweig at gmail.com <mailto:thezweig at gmail.com>>
> wrote:
>
> > Our development model so far has been to each work out of
> our own forked
> > github repository. That way, you make your changes, push
> them to your
> > repository, and then I'll pull them into my repository after
> a quick
> > test and review. If you're not using the github email
> service hook to
> > send commit emails to the commits mail list
> (epiar-commits at epiar.net <mailto:epiar-commits at epiar.net>),
> > then either send me an email or a github pull request.
> Otherwise I'll
> > pull changes in when I notice them.
> >
> > You don't need my permission to commit and push your
> changes. I'm only
> > important so long as Chris (and Epiar.net ) keeps pointing
> people
> > towards my repository instead of yours or somebody else's.
> In the
> > future we might want to create a group repository that we
> can all push
> > changes to and label it the 'official' version.
> >
> >
> > As for your change, I don't quite understand it. (How are
> you going to
> > store the actual objects? "new" doesn't give you an object,
> it only
> > gives you a pointer to an object). But my C++ knowledge
> might be
> > incomplete here, if your change solves the bug, I'd be
> thrilled to use
> > it. Obviously I created a bug here, and I can't find it, so
> that alone
> > shows that I'm missing something pretty important.
> >
> > Thanks,
> > ~Matt
> >
> > On Jul 31, 2010, at 4:27 PM, Gerard Sweeney wrote:
> >
> >> I'm pretty sure I've found at least one of the issues with the
> >> StatusBar - there are objects being created with 'new' (in
> >> Hud::newStatus) and the pointers are being stored in a
> list, but the
> >> objects themselves are never stored.
> >>
> >> I'm going to convert the pointers to be stored in a list of
> shared_ptrs
> >> instead of naked pointers as they are now, and I'll push
> the changes to
> >> a branch in the github repository (if I have permissions to
> do so).
> >>
> >>
> >> On Sat, Jul 31, 2010 at 9:22 PM, Matthew Zweig
> <thezweig at gmail.com <mailto:thezweig at gmail.com>>
> >> wrote:
> >> I don't follow, what did you change?
> >>
> >> I doubt that you're running out of memory, I've seen
> problems occur at
> >> about that point in code as well.
> >> For better or for worse, I've always seen the problem to be
> >> intermittent, it only seems to crash there once in a few times.
> >>
> >> Something is wrong with the Hud / StatusBar management.
> Can you new
> >> developers help me find it? "Many eyes make shallow bugs".
> >>
> >> ~Matt
> >>
> >> On Jul 31, 2010, at 12:56 PM, Erkin �nl� wrote:
> >>
> >> > i changed the if control on debug.load and started the
> game. but now
> >> when i create a new player, StatusBar gives an error below,
> maybe my
> >> machine runs out of memory?
> >> >
> >> > Creating Player: erkin
> >> > Creating a new StatusBar 'Coordinate:' : Name(( 0 , 0 ))
> / Ratio(
> >> 0.000000)
> >> > Creating a new StatusBar 'Quadrant:' : Name(( 0 , 0 )) /
> Ratio(
> >> 0.000000)
> >> > Creating a new StatusBar 'Credits:' : Name($0) / Ratio(
> 0.000000)
> >> > Creating a new StatusBar 'HULL:' : Name() / Ratio( 1.000000)
> >> > Creating a new StatusBar 'Target:' : Name() / Ratio(
> 0.000000)
> >> > Creating a new StatusBar 'Target:' : Name() / Ratio(
> 0.000000)
> >> > *** glibc detected *** ./Epiar: free(): invalid next size
> (fast):
> >> 0x0b376170 ***
> >> >
> >> >
> >> > On Sat, Jul 31, 2010 at 10:44 PM, Gerard Sweeney
> >> <gerard0sweeney at gmail.com
> <mailto:gerard0sweeney at gmail.com>> wrote:
> >> > I found '?' so that gets me a bit further at least!
> >> >
> >> >
> >> > On Sat, Jul 31, 2010 at 8:01 PM, Gerard Sweeney
> >> <gerard0sweeney at gmail.com
> <mailto:gerard0sweeney at gmail.com>> wrote:
> >> > Pretty basic question, but - are there instructions for
> actually
> >> playing the game? I have it built but apart from basic
> movement I
> >> haven't really figured out much else. I'm running into a
> couple of
> >> segfaults as well - one is the StatusBar one that was already
> >> mentioned, but also getting one when travelling around.
> >> >
> >> > Also looking for specific stuff to do, mainly hoping for
> C++ work.
> >> >
> >> >
> >> >
> >> > On Fri, Jul 30, 2010 at 9:20 PM, Matthew Zweig
> <thezweig at gmail.com <mailto:thezweig at gmail.com>>
> >> wrote:
> >> > It really depends on what kind of work you're interested
> in doing.
> >> >
> >> > If you are interested in working with Lua, I suggest
> creating a new
> >> AI state machine. See basics.lua and universe.lua. AI.cpp and
> >> AI_Lua.cpp might be helpful if you want to see how things
> are hooked up.
> >> >
> >> > If you want to work with OpenGL, you could create a
> 'shield' for the
> >> Ships that could flash when the get hit.
> >> >
> >> > If you want to solve a lingering bug, look at the
> StatusBar class.
> >> It seg-faults occasionally just after the player is loaded
> and the game
> >> starts. I'm fine with it being completely rewritten if
> that's what it
> >> takes.
> >> >
> >> > I'll come up with a few more short wishlist items for
> people to
> >> explore later. Glad to have you on board.
> >> >
> >> > ~Matt
> >> >
> >> > On Jul 30, 2010, at 10:58 AM, Ryan Borre
> <ryan.borre at gmail.com <mailto:ryan.borre at gmail.com>> wrote:
> >> >
> >> > > Nice. So what exactly needs to be done? Code compiles,
> runs, etc. I
> >> need
> >> > > something to work on.
> >> > >
> >> > > On 7/30/2010 12:31 PM, Christopher Thielen wrote:
> >> > >> Although it's not always active, channel #epiar on
> >> irc.freenode.net <http://irc.freenode.net> is
> >> > >> our 'live chat' standard. If we have any meetings or
> enough people
> >> idle
> >> > >> in there, it can be fun. :)
> >> > >>
> >> > >> On 7/29/10 5:11 PM, Ryan Borre wrote:
> >> > >>
> >> > >>> Is anyone familiar with Google Wave? It works great for
> >> collaborating
> >> > >>> with groups of people. Just thought I would mention it.
> >> > >>>
> >> > >>> On 7/29/2010 12:32 PM, Ryan Borre wrote:
> >> > >>>
> >> > >>>> Are you using Ubuntu?
> >> > >>>>
> >> > >>>> On 7/29/2010 12:29 PM, Maoserr wrote:
> >> > >>>>
> >> > >>>>> hmm, on linux, fresh checkout of the master branch
> doesn't
> >> compile.
> >> > >>>>> Am I
> >> > >>>>> missing something here?
> >> > >>>>>
> >> > >>>>>
> /home/maoserr/Code/Epiar/Source/Engine/simulation.cpp: In member
> >> > >>>>> function
> >> > >>>>> ‘bool Simulation::Run()’:
> >> > >>>>>
> /home/maoserr/Code/Epiar/Source/Engine/simulation.cpp:145:11:
> >> error:
> >> > >>>>> cannot call constructor ‘Hud::Hud’ directly
> >> > >>>>>
> /home/maoserr/Code/Epiar/Source/Engine/simulation.cpp:145:11:
> >> > >>>>> error: for
> >> > >>>>> a function-style cast, remove the redundant ‘::Hud’
> >> > >>>>>
> >> > >>>>>
> >> > >>>>> On Thu, 29 Jul 2010 12:50:04 -0400, Christopher
> >> Thielen<chris at epiar.net <mailto:chris at epiar.net>>
> >> > >>>>> wrote:
> >> > >>>>>
> >> > >>>>>
> >> > >>>>>> Any chance you could sync with knowknowledge's
> Epiar
> >> master and push
> >> > >>>>>> only this one fix (adding the configure.in
> <http://configure.in> checks)? If not let
> >> me know
> >> > >>>>>> as I can push them; I'm not sure since I believe
> you're that
> >> damn cmake
> >> > >>>>>> guy! :)
> >> > >>>>>>
> >> > >>>>>> On 7/29/10 9:23 AM, Maoserr wrote:
> >> > >>>>>>
> >> > >>>>>>> I was going to fix the mixer problem but then the
> memory
> >> corruption
> >> > >>>>>>> issues
> >> > >>>>>>> cropped up and I haven't looked at it since. The
> problem is
> >> that
> >> > >>>>>>> Ubuntu
> >> > >>>>>>> uses an older version of SDL_mixer that cannot
> dynamically
> >> load
> >> > >>>>>>> libraries. While I put in runtime conditionals
> to check for
> >> sdl_mixer
> >> > >>>>>>> version, I did not put in compile time
> conditionals to check
> >> > >>>>>>> against the
> >> > >>>>>>> compiled version. This can be fixed easily with
> a few
> >> preprocessor
> >> > >>>>>>> macros, although I do recommend you compile
> against the
> >> latest version
> >> > >>>>>>> of
> >> > >>>>>>> sdl_mixer if possible so that the binary can run
> on distros
> >> with the
> >> > >>>>>>> latest sdl_mixer.
> >> > >>>>>>>
> >> > >>>>>>> On Thu, 29 Jul 2010 11:36:03 -0400, Christopher
> >> > >>>>>>> Thielen<chris at epiar.net <mailto:chris at epiar.net>>
> >> > >>>>>>> wrote:
> >> > >>>>>>>
> >> > >>>>>>>
> >> > >>>>> <snip>
> >> > >>>>>
> >> > >>>>>>> _______________________________________________
> >> > >>>>>>> epiar-devel mailing list
> >> > >>>>>>> epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > >>>>>>> http://epiar.net/mailman/listinfo/epiar-devel
> >> > >>>>>>>
> >> > >>>>>> _______________________________________________
> >> > >>>>>> epiar-devel mailing list
> >> > >>>>>> epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > >>>>>> http://epiar.net/mailman/listinfo/epiar-devel
> >> > >>>>>>
> >> > >>>>> _______________________________________________
> >> > >>>>> epiar-devel mailing list
> >> > >>>>> epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > >>>>> http://epiar.net/mailman/listinfo/epiar-devel
> >> > >>>>>
> >> > >>> _______________________________________________
> >> > >>> epiar-devel mailing list
> >> > >>> epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > >>> http://epiar.net/mailman/listinfo/epiar-devel
> >> > >>>
> >> > >> _______________________________________________
> >> > >> epiar-devel mailing list
> >> > >> epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > >> http://epiar.net/mailman/listinfo/epiar-devel
> >> > >>
> >> > > _______________________________________________
> >> > > epiar-devel mailing list
> >> > > epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > > http://epiar.net/mailman/listinfo/epiar-devel
> >> >
> >> > _______________________________________________
> >> > epiar-devel mailing list
> >> > epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > http://epiar.net/mailman/listinfo/epiar-devel
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > epiar-devel mailing list
> >> > epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > http://epiar.net/mailman/listinfo/epiar-devel
> >> >
> >> >
> >> > _______________________________________________
> >> > epiar-devel mailing list
> >> > epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> > http://epiar.net/mailman/listinfo/epiar-devel
> >>
> >>
> >> _______________________________________________
> >> epiar-devel mailing list
> >> epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> http://epiar.net/mailman/listinfo/epiar-devel
> >>
> >> _______________________________________________
> >> epiar-devel mailing list
> >> epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> >> http://epiar.net/mailman/listinfo/epiar-devel
> >
> >
> > _______________________________________________
> > epiar-devel mailing list
> > epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> > http://epiar.net/mailman/listinfo/epiar-devel
>
>
> _______________________________________________
> epiar-devel mailing list
> epiar-devel at epiar.net <mailto:epiar-devel at epiar.net>
> http://epiar.net/mailman/listinfo/epiar-devel
>
>
>
>
> _______________________________________________
> epiar-devel mailing list
> epiar-devel at epiar.net
> http://epiar.net/mailman/listinfo/epiar-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://epiar.net/pipermail/epiar-devel/attachments/20100801/c79df262/attachment-0001.html
More information about the epiar-devel
mailing list