View Issue Details

IDProjectCategoryView StatusLast Update
0000895Spring engineGeneralpublic2008-04-22 01:22
Reporteracidd_uk Assigned To 
PrioritynormalSeveritycrashReproducibilitysometimes
Status closedResolutionunable to reproduce 
Summary0000895: More LuaUI crashes
DescriptionLuaUI crashes -> Spring crashes
Additional InformationIn infolog1, the luaui crashed and then spring crashed on luaui reload. In infolog2, luaui crashed and took spring down with it. Once again, it seems to come down to invalid args to ipairs, and then wierd symbols in variable names, implying uninitialised memory/corruption?
TagsNo tags attached.
Attached Files
infolog1.txt (Attachment missing)
infolog2.txt (Attachment missing)
080416-DeltaSiegeDry-0.76b1.sdf (Attachment missing)
Checked infolog.txt for Errors

Activities

imbaczek

2008-04-16 20:27

reporter   ~0002067

Infologs, unfortunately, aren't of much help in case of this bug; it indeed seems to be memory corruption of some kind. Your replay, OTOH, will be most useful, since it more or less reliably reproduces one instance of this crash. What's needed now is adding some quite extensive logging and checking where and when exactly the bug happens.

acidd_uk

2008-04-16 20:36

reporter   ~0002068

The attached demo was from one of the crashed games - unfortunately the other crashed game had no demo at all, and this one seems to be corrupt/broken... :-(

acidd_uk

2008-04-16 20:40

reporter   ~0002069

Can we start adding some tracing & logging into luaui to trace back the callers of the functions containing the broken ipairs() calls? If we can log this stuff out to a file maybe we can trace back to where the error first entered LuaUI? I'm only guessing, I don't know enough about LuaUI to be able to know what the problem might be, but if we can trace it back to a point where we know the error is about to happen in LuaUI, then maybe we can trigger Spring to dump core/other info in a nicer way and reveal some more info about the C state...?

acidd_uk

2008-04-16 20:42

reporter   ~0002070

To clarify "Can we start adding some tracing & logging into luaui", I mean tracing type code into the LuaUI .lua code itself (eg the widgets.lua file etc)

imbaczek

2008-04-17 18:21

reporter   ~0002071

adding tracing is always possible, I'll try to hack something up.

acidd_uk

2008-04-17 18:40

reporter   ~0002072

I'd be happy to have a go at it myself, but I need is a function or 2 I can call to log info to a logfile somewhere, rather than to the spring console...

imbaczek

2008-04-17 19:03

reporter   ~0002073

spring console gets logged into the infolog, so no problem here. use LogOutput as usual.

acidd_uk

2008-04-17 19:05

reporter   ~0002074

Yes but then I will get my spring console spammed with random debugging crap. Since I want to be able to play normal games while I wait for the errors to happen, this isn't a good solution...

imbaczek

2008-04-17 19:33

reporter   ~0002075

oh, in this case, simply create a global logging output stream (e.g. fstream) and use this instead of log output. pretty simple.

acidd_uk

2008-04-17 19:55

reporter   ~0002076

/me goes to Lua tutorial website :-)

imbaczek

2008-04-17 20:46

reporter   ~0002077

i was talking about c++ side :>

anyways, some remotely good news: the bug occurs in spring built by gcc 4.3 and crashes in free(), so it's most likely a dangling pointer/memory corruption thing.

acidd_uk

2008-04-17 21:51

reporter   ~0002079

So can it be reproduced in a debug build? If you know what game/sim frame the replay crashes on, can you make a special build with a breakpoint at the start of that frame?

imbaczek

2008-04-17 21:53

reporter   ~0002080

that's the plan. i'm 99% sure it's a double free problem.

Kloot

2008-04-22 01:22

developer   ~0002140

Although the demo isn't really long enough to say for certain, the infologs strongly hint that this is the same issue as http://spring.clan-sy.com/mantis/view.php?id=889 . Closing this one because it can't be reproduced and now very likely fixed.

Issue History

Date Modified Username Field Change
2008-04-16 19:40 acidd_uk New Issue
2008-04-16 19:40 acidd_uk File Added: infolog1.txt
2008-04-16 19:40 acidd_uk File Added: infolog2.txt
2008-04-16 20:27 imbaczek Note Added: 0002067
2008-04-16 20:35 acidd_uk File Added: 080416-DeltaSiegeDry-0.76b1.sdf
2008-04-16 20:36 acidd_uk Note Added: 0002068
2008-04-16 20:40 acidd_uk Note Added: 0002069
2008-04-16 20:42 acidd_uk Note Added: 0002070
2008-04-17 18:21 imbaczek Note Added: 0002071
2008-04-17 18:40 acidd_uk Note Added: 0002072
2008-04-17 19:03 imbaczek Note Added: 0002073
2008-04-17 19:05 acidd_uk Note Added: 0002074
2008-04-17 19:33 imbaczek Note Added: 0002075
2008-04-17 19:55 acidd_uk Note Added: 0002076
2008-04-17 20:46 imbaczek Note Added: 0002077
2008-04-17 21:51 acidd_uk Note Added: 0002079
2008-04-17 21:53 imbaczek Note Added: 0002080
2008-04-22 01:22 Kloot Note Added: 0002140
2008-04-22 01:22 Kloot Status new => closed
2008-04-22 01:22 Kloot Resolution open => unable to reproduce