[epiar-devel] Epiar Segfaults

Ryan Borre ryan.borre at gmail.com
Tue Aug 3 07:06:48 PDT 2010


I receive the same segfault. I commented out line 750 from ai_lua.cpp and
ran the game for a while without any segfault. What is the string that is
returned from (ai)->GetStateMachine().c_str()?

On Tue, Aug 3, 2010 at 6:00 AM, Chris Walton <chris.r.walton at gmail.com>wrote:

> Looks like the AI pointer of the object GetStateMachine() is called on
> is invalid. I assume an AI object was delete'd but not the
> corresponding Lua item.
>
> -- Chris
>
> On Tue, Aug 3, 2010 at 2:35 PM, Krzysztof Chrobak <krzychuch at gmail.com>
> wrote:
> > Hi,
> >
> > Your path completely solved problems with segfaulting status bar, but
> from
> > time to time I get this error in other place. Gdb backtrace is:
> >
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00007ffff65d005f in std::basic_string<char, std::char_traits<char>,
> > std::allocator<char> >::basic_string(std::string const&) ()
> >    from /usr/lib/libstdc++.so.6
> > (gdb) backtrace
> > #0  0x00007ffff65d005f in std::basic_string<char, std::char_traits<char>,
> > std::allocator<char> >::basic_string(std::string const&) ()
> >    from /usr/lib/libstdc++.so.6
> > #1  0x000000000040d301 in AI::GetStateMachine (L=0x90eb20) at
> > ./Source/AI/ai.h:24
> > #2  AI_Lua::ShipGetState (L=0x90eb20) at Source/AI/ai_lua.cpp:750
> > #3  0x00000000004623d9 in luaD_precall(lua_State*, lua_TValue*, int) ()
> > #4  0x000000000046b8f9 in luaV_execute(lua_State*, int) ()
> > #5  0x000000000046289d in luaD_call(lua_State*, lua_TValue*, int) ()
> > #6  0x0000000000461f7a in luaD_rawrunprotected(lua_State*, void
> > (*)(lua_State*, void*), void*) ()
> > #7  0x0000000000462002 in luaD_pcall(lua_State*, void (*)(lua_State*,
> > void*), void*, long, long) ()
> > #8  0x000000000045f80f in lua_pcall ()
> > #9  0x000000000040b222 in AI::Decide (this=0xa1d000) at
> Source/AI/ai.cpp:73
> > #10 0x000000000040b5b9 in AI::Update (this=0x47cee8) at
> Source/AI/ai.cpp:106
> > #11 0x0000000000458892 in QuadTree::Update (this=0x7fffe4016740) at
> > Source/Utilities/quadtree.cpp:360
> > #12 0x0000000000458860 in QuadTree::Update (this=0x7fffdc06c5e0) at
> > Source/Utilities/quadtree.cpp:355
> > #13 0x0000000000458860 in QuadTree::Update (this=0x9b30c0) at
> > Source/Utilities/quadtree.cpp:355
> > #14 0x00000000004381a1 in SpriteManager::Update (this=0x8f4010) at
> > Source/Sprites/spritemanager.cpp:85
> > #15 0x000000000041b7d9 in Simulation::Run (this=<value optimized out>) at
> > Source/Engine/simulation.cpp:166
> > #16 0x00000000004090b5 in main (argc=<value optimized out>, argv=<value
> > optimized out>) at Source/main.cpp:200
> >
> > It looks like problem is somewhere in lua communication, but now I'm not
> > familiar with with it enough to solve this myself. I started reading
> about
> > Lua, so if nobody fixes this probably I will.
> >
> > ~Kch
> >
> >
> > 2010/8/3 Matthew Zweig <thezweig at gmail.com>
> >>
> >> To Anyone who has seen segfaults while running Epiar,
> >>
> >> Please pull my most recent master branch and try again.
> >>
> >>
> http://github.com/knowknowledge/Epiar/commit/e98a0315555adb04595a97676319473e29e03109
> >>
> >> >From what I could tell, the problems were consistently being caused by
> >> bad pointers in the StatusBar objects.  I've take out most of the
> dynamic
> >> memory allocation in the StatusBars.  I've personally tested the code
> dozens
> >> of times, but I would appreciate a bit wider testing.  (And I'm sure you
> >> wouldn't mind playing a game that doesn't crash so often.)
> >>
> >> Please let me know if this doesn't solve your issues.
> >>
> >> Thanks,
> >> ~Matt
> >> _______________________________________________
> >> epiar-devel mailing list
> >> 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
> >
> >
>
> _______________________________________________
> 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/20100803/4aa26448/attachment-0001.html 


More information about the epiar-devel mailing list