Java stack overflow

Asked by Jeff_Vallis on 2018-08-18

Game site.
Running normally works fine.
Running Sikuli doing the same as above,after a while I get java stack exceeds maximum size see the java console, from the site that I am running not from Sikuli.

Thought it could be because the code is split into many modules that are included into main script when run.
So to test I recoded all modules it with no sub modules into one script but it has same outcome.
( so now it’s 4,000 lines of code )

Running on IMac

Any suggestions on how I can find out what is causing it would be appreciated

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Jitendra patel (jpatel1011) said : #1

Usually stack overflows are due to a poorly designed recursive function. Save the log to a file and examine it after crash to see if you're stuck in an infinite loop.

Jeff_Vallis (vallis-pj) said : #2

Yep that is what I thought but its not in a loop
Trying to find a way to clear the call stack any ideas

Jeff_Vallis (vallis-pj) said : #3


The only thing I can think is that some of the functions return on if statements eg
def Call():
     do some thing
     do some thing
     if some thing:
     do some thing
     do some thing
     if some thing:
     do some thing
     do some thing
     if some thing:
     do some thing
     do some thing
     < no return function just ends >

I really need to find out how to print the call stack and see if I can work it out

Jeff_Vallis (vallis-pj) said : #4

Lets restate the Problem
Login to Game
Do Stuff Loop of maybe 20
     Do Something Number of Times varies before
                 the Website not the Sikuli Script Reponds with
                see your browser JavaScript console for more info:
                The error was: UncaughtRangeError: Maximu call stack size exceeded
The Games Support Team replied with - you have to many tabs open on the browser.
Which I haven't but can't admit that I am automating it with Sikuli

in Sikuli - when the message appears I call Call_Size_Exceeded which calls Print_Trace
def Print_Trace:
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 2199, in <module>
    Do_I_Run_Auto() ; exit(0)
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 1584, in Do_I_Run_Auto
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 2085, in Main_Menu
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 2001, in Run_Main_Process
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 1877, in Run_Main_Process_Selected
    v_Which_Screen = "Drag Top Left" ; Set_Locations(v_Which_Screen,0)
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 739, in Set_Locations
    v_Result = Load_Location_Range(v_Which_Screen,"Read")
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 564, in Load_Location_Range
    v_Result = Load_Location_Single(v_Which_Screen,v_Screen_Item,v_Check_Waterfall,v_Do_What)
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 640, in Load_Location_Single
    v_Button_Result = Close_X(0.2)
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 161, in Close_X
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 2146, in Call_Size_Exceeded
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/", line 2172, in Print_Trace
So the code in Sikuli is not over flowing but is causing the java game to over flow

Jeff_Vallis (vallis-pj) said : #5

I have concluded that this must be a bug on the Website and cannot get round it.

If no one has any suggestions - please close this quesry

Jeff_Vallis (vallis-pj) said : #6

Its a bug in the game play not Oython or Sikuli