Page 1 of 1
[Solved] Stack Overflow
Posted: Thu Sep 13, 2012 8:29 am
by rock5
People have reported getting "Stack Overflow" errors in the past. I don't think the advice we gave ended up helping much. But I just discovered a possible cause for that error so I thought I would share.
This error effects any users who are using an SVN revisioned version of micromacro, ie. the micromacro folder has the SVN green icon next to it. If you update it using "SVN Update" like you do with the 'rom' folder it will update to the latest revision which is 30 for micromacro. Version 30 seems to have a bug in it that causes that error.
To fix it, change back to revision 29 until it gets fixed. Use "TortoiseSVN/Update to revision" in the right click menu to do so.
Hope that helps.
Re: [Solved] Stack Overflow
Posted: Tue Sep 18, 2012 11:40 am
by Administrator
I haven't noticed this problem. There hasn't been much changed in r30. I'm guessing that the problem probably lies on line 29 of lib/mods/classes.lua:
Now, since that should only create a reference to the parent object and not a separate object, I don't really understand why that is an issue. If anything, that should only cause problems if you had 10s of thousands of inherited objects. Try commenting out that line and see what happens. If that doesn't help, try the other change
detailed here.
Re: [Solved] Stack Overflow
Posted: Tue Sep 18, 2012 12:01 pm
by rock5
I redid the error to show you the output. If I stop it really quickly, I found that it starts by printing correctly. Here is just a sample. If I don't stop it, it never stops printing.
Code: Select all
Command> table.print(player)
table: 05A8A7C0
free_debug1: 0
MaxMP: 6951
MaxHP: 27495
PotionLastOnceUseTime: 0
Mana: 6951
ActualSpeed: 0
Lootable: false
Race: 1
ExpInsertPos: 0
ExpTable: table: 05A8A810
MaxEnergy: 0
Attackable: false
Sleeping_time: 0
Class3: 4
Rage: 0
Type: 1
MaxMP2: 100
Id: 1002
Harvesting: false
Level3: 72
Casting: false
PetPtr: 0
Stance: 0
Pet: table: 05A8AE00
free_debug1: 0
MaxMP: 1000
MaxHP: 1000
PotionLastOnceUseTime: 0
Mana: 0
ActualSpeed: 0
Lootable: false
Race: 0
ExpInsertPos: 0
ExpTable: table: 05A8AE50
MaxEnergy: 0
Attackable: false
Sleeping_time: 0
Class3: -1
Rage: 0
Type: -1
MaxMP2: 1000
Id: -1
Harvesting: false
Level3: 1
Casting: false
PetPtr: 0
Stance: 0
MP: 1000
LastExp: 0
Last_ignore_target_time: 0
ExpUpdateInterval: 10
Fighting: false
Concentration: 0
InventoryDoUpdate: false
Moving: false
MaxMana: 0
Speed: 50
SkillQueue: table: 05A8AEA0
Class1: -1
BotStartTime_nr: 0
InParty: false
TargetIcon: true
Swimming: false
MaxConcentration: 0
LastSkillType: 0
Name: <UNKNOWN>
LastSkillStartTime: 0
Address: 0
Buffs: table: 05A8AE28
HP: 1000
free_flag3: false
Mounted: false
free_flag2: false
Guild: <UNKNOWN>
PotionLastManaEmptyTime: 0
parent: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D
78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function
: 02029D78
update: function: 02029C
98
inheritctor: true
alive: function: 02029D
18
is_a: function: 02029C
58
__index: table: 0
2083C10
hasDebuff:
function: 02029D78
update: function
: 02029C98
inheritctor:
true
alive: function
: 02029D18
is_a: function
: 02029C58
__index:
table: 02083C10
hasDebuf
f: function: 02029D78
update:
function: 02029C98
inheritc
tor: true
alive:
function: 02029D18
is_a:
function: 02029C58
__index:
table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function: 02029D
78
update: function: 02029C98
inheritctor: true
alive: function: 02029D18
is_a: function: 02029C58
__index: table: 02083C10
hasDebuff: function
: 02029D78
update: function: 02029C
Re: [Solved] Stack Overflow
Posted: Sat Sep 22, 2012 5:53 am
by rock5
I've been using the above fix but I just tried to print a base class eg. table.print(CObject) and it went haywire again. I reverted to 29 but it still does it. I don't know what that means but maybe it's another clue in the puzzle.
Ps. Did I forget to mention in my last post that that little fix fixed that problem? Well it did. I just did that printout to show you what it originally did.
Re: [Solved] Stack Overflow
Posted: Mon Sep 24, 2012 8:28 am
by Administrator
I'll have a think on it and see what I can come up with. Perhaps if we use metatables, instead, that'll fix it.
Now, since it would only make sense to loop like that while recursively accessing (in this case printing), I'm still not sure if it is an actual problem or not. Perhaps so. I'm not as familiar with the internals of Lua as I should be, I suppose. Does the error happen at random times, or always in the same section of code, or what? Do you have a snippet of code that causes the error relatively quickly (as opposed to waiting several hours for it to maybe happen)?
Re: [Solved] Stack Overflow
Posted: Mon Sep 24, 2012 9:05 am
by rock5
I did have an error that happened every time that I tracked down as a problem in rev30 but I noticed at that time that it was also printing classes strangely and I've since been using the class print as an indicator of the problem. I'm not sure I remember what the initial problem was with. It might have been survival. Maybe I'll update to 30 again and try and find it.
Re: [Solved] Stack Overflow
Posted: Mon Sep 24, 2012 9:47 am
by rock5
Yep, with 30 you get an error with survivalr5 just before it starts clearing the trash.
Code: Select all
Moving to waypoint #4, (2606, 2843)
Did not find any crashed game clients.
0:43am - C:\Program Files (x86)\micromacro\lib\lib.lua:481: stack overflow
There is a lot of code that happens at that waypoint so that wont help.