View Issue Details

IDProjectCategoryView StatusLast Update
0002997Spring engineLuapublic2012-03-05 21:45
Reporterazaremoth Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Product Version86.0 
Summary0002997: Tech Trees gadget causes Spring 86.0 to crash in special cases
Descriptionzwzsg's Tech tree gadget (Better_Ranged_Counted_Multi_Tech.lua) causes a crash of Spring 86.0 when a unit is created that has the definitions:

  customParams = {
    ProvideTech = "-Prerequisite",
    RequireTech = "0 Prerequisite", },

It does not happen in Spring 85.0.
TagsNo tags attached.
Attached Files
Better_Ranged_Counted_Multi_Tech.lua (Attachment missing)
infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Activities

abma

2012-03-04 15:24

administrator   ~0008391

infolog.txt?

Kloot

2012-03-04 17:18

developer   ~0008392

not reproducable fwiw

azaremoth

2012-03-04 20:47

reporter   ~0008394

It is perfectly reproducable for The Cursed (1.18 #svn). Here is the infolog.txt for a "clean" game: no gadgets except unit_script.lua (loading lua animation scripts), game_spawn (spawning starting units) and the tech tree gadget and no widgets at all.

The bug is easy to avoid for me by changing some unit definitions. Thus it is no big deal for The Cursed, but still - there seems to be something...

abma

2012-03-05 10:52

administrator   ~0008397

where to get 1.18? i couldn't reproduce it, too...

"Error: Spring: Fatal Error std::bad_alloc" seems to be an out of memory which let me think, that there is some infinite recursion...

like function a calls function a, calls a, calls a, ...

i don't know what the tags "RequireTech" + "ProvideTech" means...

does it crash, when its PrerequisiteA and PrerequisiteB ?

azaremoth

2012-03-05 20:33

reporter   ~0008398

The SVN is "private" - you would need to register at https://portal.projectlocker.com. Or you can reproduce the bug in any (?) other game. I can reproduce it in ZeroK by giving a Rocko the above mentioned prerequisites (and copy the gadget into the game). Same effect => crash.

From zwzsg's description about the custom defs:

// Two mutually exclusive unit, of which you can have only one at a time:
[UNITINFO]
    {
    Name=Russell Edwin Nash;
    Unitname=macleod;
    Description=There can be only one;
    [CustomParams]
    {
        RequireTech=0 Highlander;
        ProvideTech=-Highlander;
    }
    ...
}
[UNITINFO]
    {
    Name=Victor Kruger;
    Unitname=kurgan;
    Description=There can be only one;
    [CustomParams]
    {
        RequireTech=0 Highlander;
        ProvideTech=-Highlander;
    }
    ...
}

Kloot

2012-03-05 21:31

developer   ~0008399

Last edited: 2012-03-05 21:44

Thanks, *now* it is reproducable for me.

Edit: not our problem but zwzsg's, there is an infinite loop inside SplitStringNameAndQuantity

Issue History

Date Modified Username Field Change
2012-03-04 13:10 azaremoth New Issue
2012-03-04 13:10 azaremoth File Added: Better_Ranged_Counted_Multi_Tech.lua
2012-03-04 15:24 abma Note Added: 0008391
2012-03-04 17:18 Kloot Note Added: 0008392
2012-03-04 20:47 azaremoth Note Added: 0008394
2012-03-04 20:47 azaremoth File Added: infolog.txt
2012-03-05 10:52 abma Note Added: 0008397
2012-03-05 10:52 abma Status new => feedback
2012-03-05 20:33 azaremoth Note Added: 0008398
2012-03-05 21:31 Kloot Note Added: 0008399
2012-03-05 21:44 Kloot Note Edited: 0008399
2012-03-05 21:45 Kloot Status feedback => closed
2012-03-05 21:45 Kloot Resolution open => won't fix