Java stack overflow

Asked by Jeff_Vallis

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

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Jeff_Vallis
Solved:
Last query:
Last reply:
Revision history for this message
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.

Revision history for this message
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

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#3

1.1.3(2018-07-05_16:27)/Mac10.13.6/Java8(64)1.8.0_25-b17

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:
          return
     do some thing
     do some thing
     if some thing:
          return
     do some thing
     do some thing
     if some thing:
          return
     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

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#4

Lets restate the Problem
Script
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:
       traceback.print_stack()
result:-
::::::::::
traceback.print_stack()
::::::::::
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", line 2199, in <module>
    Do_I_Run_Auto() ; exit(0)
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", line 1584, in Do_I_Run_Auto
    Main_Menu()
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", line 2085, in Main_Menu
    Run_Main_Process()
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", line 2001, in Run_Main_Process
    Run_Main_Process_Selected(selected)
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", 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/Vikings_Main.py", line 739, in Set_Locations
    v_Result = Load_Location_Range(v_Which_Screen,"Read")
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", 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/Vikings_Main.py", line 640, in Load_Location_Single
    v_Button_Result = Close_X(0.2)
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", line 161, in Close_X
    Call_Size_Exceeded()
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", line 2146, in Call_Size_Exceeded
    Print_Trace()
  File "/Users/Jeff/Desktop/SikuliScripts/Vikings/Code/Vikings_Main.sikuli/Vikings_Main.py", line 2172, in Print_Trace
    traceback.print_stack()
::::::::::
So the code in Sikuli is not over flowing but is causing the java game to over flow

Revision history for this message
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

Revision history for this message
Jeff_Vallis (vallis-pj) said :
#6

Its a bug in the game play not Oython or Sikuli