Stack overflow error in b91.....

Confirmed bugs should get a single post here. Check the READ ME FIRST sticky thread for the format.

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice, MapTool BugReport Manager

Forum rules
Posts that do not conform to the READ ME FIRST sticky thread are subject to deletion.
Post Reply
madmaxneo
Giant
Posts: 148
Joined: Thu Jun 20, 2013 5:04 pm
Location: NW Indiana

Stack overflow error in b91.....

Post by madmaxneo »

I haven't used Maptools in a while time though I was using b90 very successfully. I found out about b91 and decided to give it a try. It loads up fine but now I get a "Stack overflow" error whenever I try to use one of my macros. I also get the same error when I try it again in b90. So how can I fix or troubleshoot this?

Bruce

Edit: It is only 1 macro so far that doesn't work. My attack macro, here it is:
Spoiler

Code: Select all

[h: BallAndChain = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Bardiche = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: BastardAxe1H = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: BastardAxe2H = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: BastardSword1H = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: BastardSword2H = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: BattleAxe = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: BeakedAxe = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Bite = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Blowgun = json.set("","Range Increment",10,"PB Bonus",0,"PB Range",0)]
[h: Bola = json.set("","Range Increment",40,"PB Bonus",10,"PB Range",20)]
[h: Boletta = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Boomerang = json.set("","Range Increment",25,"PB Bonus",5,"PB Range",15)]
[h: Broadsword = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Claw = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Claymore1H = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Claymore2H = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Club = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: CompositeBow = json.set("","Range Increment",50,"PB Bonus",5,"PB Range",25)]
[h: Cormal = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Cudgel = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Cutlass = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Dagger = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Darts = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Dirk = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: DirMac = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Falchion = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Fauchard = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Flail = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Foil = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: GirMahta = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Glaive = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Gnorish = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Guisarme = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Halberd = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: HandAxe = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: HandCrossBow = json.set("","Range Increment",15,"PB Bonus",10,"PB Range",5)]
[h: Harpoon = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: HeavyCrossbow = json.set("","Range Increment",70,"PB Bonus",35,"PB Range",35)]
[h: Javelin = json.set("","Range Increment",25,"PB Bonus",10,"PB Range",15)]
[h: Jo = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Katana1H = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Katana2H = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: KirierMac = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Kolran = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Lance = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: LightCrossbow = json.set("","Range Increment",50,"PB Bonus",25,"PB Range",25)]
[h: LongBow = json.set("","Range Increment",80,"PB Bonus",20,"PB Range",40)]
[h: LongSword = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Mace = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Madu = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: MahtaMac = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: MainGuache = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: ManCatcher = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Mattock = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: MorningStar = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Nunchaku = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: OrcishHammer = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: OrcishKalmer = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Partisan = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Pick = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: PickHammer = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Pike = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Pilum = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: PoleArms = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: PoleAxe = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Quarterstaff = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Raka = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Ranseur = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Rapier = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: RopeDart = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Saber = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Sai = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Scimitar = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: ShortBow = json.set("","Range Increment",30,"PB Bonus",10,"PB Range",15)]
[h: ShortSword = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Shuriken = json.set("","Range Increment",5,"PB Bonus",0,"PB Range",0)]
[h: Sling = json.set("","Range Increment",30,"PB Bonus",15,"PB Range",15)]
[h: Spear = json.set("","Range Increment",20,"PB Bonus",15,"PB Range",10)]
[h: SpikeThrower = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Stinger = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Tail = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: ThrowingDagger = json.set("","Range Increment",5,"PB Bonus",0,"PB Range",0)]
[h: ThrowingDirk = json.set("","Range Increment",5,"PB Bonus",0,"PB Range",0)]
[h: TitaKirier = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Tomahawk = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Tonfa = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Trident = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: TuryaRaka = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: TwinBladedSword = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: TwoHandedWarhammer = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: TwoHandedSword = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: Voulge = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: WarHammer = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: WarMattock = json.set("","Range Increment",0,"PB Bonus",0,"PB Range",0)]
[h: weaponObject = json.set("","Ball and Chain", BallAndChain, "Bardiche", Bardiche, "Bastard Axe 1H", BastardAxe1H, "Bastard Axe 2H", BastardAxe2H, "Bastard Sword 1H", BastardSword1H, "Bastard Sword 2H", BastardSword2H, "Battle Axe", BattleAxe, "Beaked Axe", BeakedAxe, "Bite", Bite, "Blowgun", Blowgun, "Bola", Bola, "Boletta", Boletta, "Boomerang", Boomerang, "Broadsword", Broadsword, "Claw", Claw, "Claymore 1H", Claymore1H, "Claymore 2H", Claymore2H, "Club", Club, "Composite Bow", CompositeBow, "Cormal", Cormal, "Cudgel", Cudgel, "Cutlass", Cutlass, "Dagger", Dagger, "Darts", Darts, "Dirk", Dirk, "Dir-mac", DirMac, "Falchion", Falchion, "Fauchard", Fauchard, "Flail", Flail, "Foil", Foil, "Gir-Mahta", GirMahta, "Glaive", Glaive, "Gnorish", Gnorish, "Guisarme", Guisarme, "Halberd", Halberd, "Hand Axe", HandAxe, "Hand Crossbow", HandCrossbow, "Heavy Crossbow", HeavyCrossbow, "Javelin", Javelin, "Jo", Jo, "Katana 1H", Katana1H, "Katana 2H", Katana2H, "Kirier-mac", KirierMac, "Kolran", Kolran, "Lance", Lance, "Light Crossbow", LightCrossbow, "Long Bow", LongBow, "Long Sword", LongSword, "Mace", Mace, "Madu", Madu, "Mahta-mac", MahtaMac, "Main Guache", MainGuache, "Man Catcher", ManCatcher, "Mattock", Mattock, "Morning Star", MorningStar, "Nunchaku", Nunchaku, "Orcish Hammer", OrcishHammer, "Orcish Kalmer", OrcishKalmer, "Partisan", Partisan, "Pick", Pick, "Pick Hammer", PickHammer, "Pike", Pike, "Pilum", Pilum, "Pole Arms", PoleArms, "Pole Axe", PoleAxe, "Quarterstaff", Quarterstaff, "Raka", Raka, "Ranseur", Ranseur, "Rapier", Rapier, "Rope Dart", RopeDart, "Saber", Saber, "Sai", Sai, "Scimitar", Scimitar, "Short Bow", ShortBow, "Shuriken", Shuriken, "Sling", Sling, "Spear", Spear, "Spike Thrower", SpikeThrower, "Stinger", Stinger, "Tail", Tail, "Tita-Kirier", TitaKirier, "Tomahawk", Tomahawk, "Tonfa", Tonfa, "Trident", Trident, "Turya-raka", TuryaRaka, "Twin Bladed Sword", TwinBladedSword, "Two Handed Warhammer", TwoHandedWarhammer, "Two Handed Sword", TwoHandedSword, "Throwing Dagger", ThrowingDagger, "Throwing Dirk", ThrowingDirk, "Voulge", Voulge, "War Hammer", WarHammer, "War Mattock", WarMattock)]
[H: WpnList                = ""]
[H,COUNT(10): WpnList    = listAppend(WpnList, getStrProp(eval("Weapon"+roll.count), "WpnName"))]
[H: WpnNum                = getStrProp(Private, "DefaultWpn", 0)]

[H: abort(input(
    "WpnNum | " + WpnList + " | Select weapon to use | LIST | SELECT    = " + WpnNum
))]

[H: Private                = setStrProp(Private, "DefaultWpn", WpnNum)]
 
[H: varsFromStrProp(eval("Weapon" + WpnNum), "suffixed")]
[h: '<!-- WpnName_ WpnAttackBonus_ WpnDefenseBonus_ WpnRange_ WpnKeyword_ WpnFumble_ -->']
[H: conditions = json.set("{}",
   "range",json.set("{}",
      "token",currentToken(),
      "distancePerCell",5,
      "upto",WpnRange_
   )
)]
[h: tokenList = getTokenNames(",",conditions)]
[H: abort(input(
    "target |"    + tokenList + "|Choose Target|LIST|VALUE=STRING",
    "MiscOB |"    + WpnAttackBonus_    + "|Offensive bonus",
    "MiscDB |"    + WpnDefenseBonus_   + "|Defensive bonus",
    "MiscRange |"    + WpnRange_ + "|Range/Reach",
    "MiscCTT |"    + WpnKeyword_ + "|Critical Type",
    "MiscFMB |"    +  WpnFumble_  + "|Fumble Range"
))]
[h: Dist = getDistance(target)]
[h: RangeInc = json.get(json.get(weaponObject, WpnName_),"Range Increment")]
[h: pbRange = json.get(json.get(weaponObject, WpnName_),"PB Range")]
[h: pbBonus = json.get(json.get(weaponObject, WpnName_),"PB Bonus")]
[if(RangeInc == 0), CODE: {[h: RangeMod = 0]};{[h, if(Dist <= pbRange): RangeMod = pbBonus; RangeMod = 0-((Dist - RangeInc) / RangeInc)* 10)]}]
[h: OpDB    = getProperty("DB", target)]
[h: bonus    = MiscOB - OpDB - RangeMod]
[H: rolls    = ""]
[H: roll    = 100]
[H, while(roll >= 96), code:{
    [H: roll        = 1d100]
    [H: rolls        = listAppend(rolls,roll)]
[H: total        = eval(strformat("sum(%{rolls})+bonus)"))]
}]

[H: RollTotal        = eval(strformat("sum(%{rolls})"))]
[H: local.TempDB        = MiscDB+DB]
[h: setProperty("TempDB", local.TempDB, target)]

[h: '<!-- pause("WpnName_","rolls","MiscOB","OpDB","RangeMod","total","local.TempDB","RollTotal","MiscFMB","MiscCTT") -->'] 
[h, if(RollTotal <= MiscFMB), code: 
{
   [H: message = strformat("attacks %{target} with <b>%{WpnName_}</b> 
       <i>Rolls: %{rolls} <b>You Fumbled!</b>")]
 };{
   [h: damage = table(MiscCTT, Total)]
   [H: message = strformat("attacks %{target} with <b>%{WpnName_}</b> 
       <i>Rolls: %{rolls} Bonus: %{MiscOB} - %{OpDB} With a range mod of: %{RangeMod} </i> The total is: %{total}
       <span style    = 'color:red'>(DB is now: %{local.TempDB})</span>
       Damage: <b>%{damage}</b> <i>%{MiscCTT}</i>")]
   [h: damageNumberOnly = replace(damage,"[^0-9]","")]
   [h: damageLetterOnly = replace(damage,"[0-9]","")]
   [h: targetHP = getProperty("HP", target)]
   [h: newTargetHP = targetHP - damageNumberOnly]
   [h: setProperty("HP",newTargetHP,target)]
      [h, token(target): setBar("Health", HP/MaxHP)]
   [h, token(target): setBar("Health2", HP/MaxHP)]
    }
]
[h, token(target): state.Dying=if(HP <= 0, 1, 0)]
[R: message] 
Last edited by madmaxneo on Sat Dec 13, 2014 2:28 pm, edited 1 time in total.


madmaxneo
Giant
Posts: 148
Joined: Thu Jun 20, 2013 5:04 pm
Location: NW Indiana

Re: Stack overflow error in b91.....

Post by madmaxneo »

I used the launcher to set it up with 2048 max and 2mb (default) for stack size. Though for some reason It will not launch from the launcher. I have to go into the folder and click on the "maptool-1.3.b91" to get it to launch.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Stack overflow error in b91.....

Post by aliasmask »

We had a player do the same thing. Basically, you need to install the 64bit version of java in order to use anything above 1400 for max mem.

madmaxneo
Giant
Posts: 148
Joined: Thu Jun 20, 2013 5:04 pm
Location: NW Indiana

Re: Stack overflow error in b91.....

Post by madmaxneo »

Thanks Aliasmask. What's weird is the only thing I have done since the last time I used Maptools was update Java and for some reason it somehow changed my Java from 64 bit to 32 bit. Not sure how that happened.

That fixed that error but now I am having another error where a campaign macro references one of two library macros (dodge and sudden dodge from a list) but when I click on it nothing happens. But the two macros dodge and sudden dodge work fin in their own individual buttons... I will post that in another thread.

Thanks for the help.

Post Reply

Return to “Bug Reports”