ERROR: maximum recursion depth exceeded

Issue #230 closed
Mike Evans created an issue

While running a hole milling job ( about 250 holes) process terminates with:

  File "/home/mikee/ultradisk/Projects/flatcam-fork/camlib.py", line 328, in flatten > pathonly=pathonly)
 +(many repeats)
  File "/home/mikee/ultradisk/Projects/flatcam-fork/camlib.py", line 3079, in generate_from_geometry_2 > flat_geometry = geometry.flatten(pathonly=True)
  File "/home/mikee/ultradisk/Projects/flatcam-fork/FlatCAMObj.py", line 1543, in job_init > tolerance=0.0005)
  File "/home/mikee/ultradisk/Projects/flatcam-fork/FlatCAMApp.py", line 1059, in new_object > initialize(obj, self)
  File "/home/mikee/ultradisk/Projects/flatcam-fork/FlatCAMObj.py", line 1564, in generatecncjob > self.app.new_object("cncjob", outname, job_init)
  File "/home/mikee/ultradisk/Projects/flatcam-fork/tclCommands/TclCommandCncjob.py", line 82, in execute > obj.generatecncjob(use_thread=False, **args)
  File "/home/mikee/ultradisk/Projects/flatcam-fork/tclCommands/TclCommand.py", line 318, in execute_call > self.output = self.execute(args, unnamed_args)
    while executing
"cncjob $basename-drl_iso"

Comments (8)

  1. Juan Pablo Caram repo owner

    Can you please attach the file that causes the problem and list the steps to reproduce?

  2. Juan Pablo Caram repo owner

    I will need a lot more detail than that. There are many parameters to get from a drill file to a CNC Job. I tried it with default setting using both the GUI and the command line and both worked fine.

    I understand you are "milling" the holes, so

    • Which holes? All of them? There are 12 different tools in the file.
    • What tool diameter do you use when generating the geometry?
    • Once you have the geometry, what values for Cut Z, Travel Z, Feed Rate, Tool dia, Spindle speed, Multi-depth, depth/pass?

    Or you can just post the TCL script.

  3. Mike Evans reporter

    All the holes. tool dia = 0.6mm, cut_z = -1.7, travel_z = +1mm, feedrate = 30mm/m, spindle 24000 rpm, single pass cut.

    Most of these are set using the application settings tab.

    System is Fedora18, 32bit, 3GB of ram. Using github master branch.

    Since it works for you I'll look into if there any system specific issues.

  4. Juan Pablo Caram repo owner

    Cannot reproduce.

    Mike, if you have more data that would help me reproduce it, I can continue to look at it.

  5. Jonathan Hale

    I might have been able to reproduce the issue. Here is my .txt drill file. Here is a GIF animation of steps to reproduce the issue. I am running Windows 10.

    Here are the steps I followed:

    • File > Open Excellon
    • Project Tab > Highlight Demo Temp Sensor PCB.TXT
    • Selected Tab >

      • Plot Options > Highlight tools 1-5
      • Create CNC Job > Cut Z: -0.07, Travel Z: 0.03, Feed rate: 0.15, Tool Change: unchecked, Spindle Speed: 7000,
      • Mill Holes > Tool Dia: 0.035, Generate Geometry
    • Project Tab > Highlight Demo Temp Sensor PCB.TXT_mill

    • Selected Tab > Create CNC Job > Cut Z: -0.07, Travel Z: 0.03, Feed Rate: 0.15, Tool Dia: 0.35, Spindle Speed: 7000, Multi-Depth: Checked, Depth/Pass: 0.025

      • Generate

    Generate button doesn’t do anything. I tried running TCL Command:

    cncjob "Demo Temp Sensor PCB.TXT_mill" -0.07 0.05 0.15 0.035 9000 true 0.024 "Demo Temp Sensor PCB.TXT_mill_cnc"

    And I got the Error message “ERRO: maximum recursion depth exceeded.

    I think the key point at work is that the Tool Diamater (0.035) is the exact same as the smallest hole in the file (0.035). If I make the Tool Diamater smaller (0.0315) then everything works again.

  6. Mike Evans reporter

    Interesting, looks like it’s trying mill a circle with radius of zero instead of just drilling it.

    Same result using Generate button ie no output, but I get

    > cncjob torchy-03.drl_mill -1.6 1.0 30 0.6096 10000 true 0.2 torchy-03.drl_mill.cnc
    ERROR: list index out of range

    When using command line.

    I’m using metric and flatcam-8.5-17 from the Fedora repo. The drill size of 0.6096 is the smallest drill size used. Should be 0.6 but some rounding has occurred I guess.

    Drill file is from KiCad.

  7. Log in to comment