QCAD Bugtracker

  • Status Assigned
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category QCAD/CAM
  • Assigned To
    andrew
  • Operating System All Qt 6 Builds
  • Severity Low
  • Priority Very Low
  • Reported Version 3.32.9
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: QCAD Bugtracker
Opened by Mgoodboy - 12.05.2026

FS#2724 - QCAD/CAM QT6 Freeze during CAM EXPORT.

Versions QT6 3.32.8.0, 3.32.9.0 on WIN10 and LINUX Ubuntu 25.10 (don’t work in WIN7)

Versions QT5 OK on WIN7, WIN10 and LINUX

My PlanetCNCW64 software accepts G41/42 but gave an error on generated g-code G40 (“Arc without IJK or R is not valid” G40 X85.6 Y62.24 Their bug?). So, I had to fill “Interpolate axes with line segments” in CAM Configuration. A little window QCAD CAM “Regenerating tool path…” opens, shows 50% all the time, and a button “Abort” that closes that window when clicked, but doesn’t stop the process; a lot of messages “regenerating tool paths…” run at the bottom with great speed, as expected.

With QT6 but not QT5, after a while, these messages start slowing more and more, when I believe the arc segments are being generated, but keep a normal speed on lines, till the program freezes. During this process, with both QT6 and QT5, the memory used is growing, but is not released until the program is closed. Garbage collection problem?

CVH commented on 13.05.2026 08:35

Hi,

First:
Several controllers that I know of don't accept a G41/42 compensation move given a circular entry motion. For example a circular Lead-In. A gradual offset to circular would be some odd spiral motion and most controllers can not cope with that.

The first motion must always be a linear move.
Such can easily be compensated to end in an offset position.
Said to be fixed somehow.

You did fall back on interpolating arcs as (very) short line segments.
A better solution would be to not use G40/41/42 compensation.
And to let QCAD/CAM generate the offset path itself, instead of relying on the controller.

Typically a post-processor with 'offset' in the display name.
Or the specific script includes:

this.outputOffsetPath = true;

Perhaps you can attempt that first.

For the rest it is unclear what went wrong.
With a CAM drawing example Andrew could try to replicate the issue under Qt6.

I think that the large memory usage has more to do with the vast amount of interpolated segments. The garbage collector only acts on intermediate values and/or objects that are no longer in use.

Regards,
CVH

Thank you very much for your comment, CVH.

Besides being quite old, in a sense I’m a newbie, and your explanation is like a foreign language I can’t cope! :-) I didn’t choose the compensation, CAM did, I think… PlanetCNC did not complain about the previous G41, only about G40. Of course, a huge number of segments are being generated since I choose short ones to get more precision, so a corresponding amount of memory should be needed… or does it not? I don’t know how and why the data is being used this way, (holy ignorance! :-) ), but is it needed to keep all the data in memory, all the time and till the end of the program? The g-code generated is only 348KB, the program for this project 340MB, but during the export rises to more than 6GB!Why the green cursor starts and ends with 50% instead of showing the progress of the process? Why the Abort button closes the little window but do not stop the process? When the “slowing” start, it is possible to close the program window, but after some time, I have to kill the program to close it.This is to be used in a little CNC that I built, with only a 500W Spindle, so I’m using 12 passes for the project. Is it needed to keep all the data, all the time and even after the generation of the g-code, to the end of the program? Seems peculiar… As you well wrote,” The garbage collector only acts on intermediate values and/or objects that are no longer in use”.

Please don’t get me wrong, this is one of the most spectacular pieces of software I found, and I dig a lot, there’s more, a license that allow me to run the program in all the Oss and computers I want, it’s unique! This is not only Technique, this is Art!

Best Regards,
Mgoodboy

CVH commented on 14.05.2026 04:33

Hi,
You didn't specified the used post-processor.
I am about sure there exist a calculated 'Offset' variant.
This is selected by the user at the far left in the QCAD/CAM toolbar, typically just above the drawing panel.
Before anything else if you have only one type of machine at your disposal.
QCAD/CAM allows you to generate profiles for different machines in the same file.

At best you attach a minimal CAM drawing file to replicate the issue under Qt6.

What counts for the entry compensation move (G41/42) is also true for the exit compensation move (G40). Both are typically limited to linear.

QCAD/CAM works in several steps:
- On adding a profile it first generates CAM-entities for the given source entities and stores these in the project drawing file. An Arc entity in the source can thus be stored as thousands of short straight CAM-entities or lines in 3D.
In memory and later in the drawing file.
12 passes are 12 times the same CAM-entities at a different Z levels.
- On export it converts these CAM-entities to your textual G-code dialect.
A CAM-Line from A to B is then translated to a G1 to position Bx-By in your case …
… When the last know position was indeed Ax-Ay-Az.
There are many G-code dialects and QCAD/CAM has also post-processors for other export formats.

If you choose to re-generate the CAM-entities on export, the first step is repeated for all existent and already created profiles.

12 passes has probably to do with the limited power, the material, the cutter size.
Even then.
It is common for a cutter to process 10-200% of its diameter in depth in a single pass.
12 passes is rare and probably only used for very deep grooving.
In addition to a CAM program, an operator must also rely on a good tool that calculates things such as optimal feed/speed, chip rate, and required power.
There are indeed a few rough rules of thumb and experience with your own machine is especially important.

The 50% progress is probably some default and can be based on an educated guess.
For example: In a certain custom tool I specified that at some early point in the process I set the Progress Bar at 10% without really knowing if the following steps will take abut 9 times as long.
Even then, when I update the Progress Bar frequently it may still trail or not show any further progress at all until finished.
Then I also discovered that it must be at least 5% more than the last value to actually update the bar.
And finally I found out that overdoing slows everything a lot more than you might expect from a simple bar widget.

Bottom line:
The Progress Bar is not a factual thing.
It is partially based on what is not yet done without really knowing.
Stalling may indicate various things. It can be an endless loop, a program stall, an unexpected vast amount of work in a next step, … Or simply not updated.

Regards,
CVH

Hi.

Thank you once more for your big help.

Now I know what you mean by pos-processor. I found QCAD ten days ago, and that’s a lot of information for grandpa to digest! :-) I’ve built other CNCs and I have a much bigger sister waiting for an upgrade to 2.2KW as the ultimate CNC project. This “job” is for a simple “T” shape 3mm aluminum piece of 76x76.5cm with round top and arms. There are many reasons, but using this little machine minimizes the aluminum mess, my house is old and short of mains power to use the vacuum cleaner at same time. I’m afraid to jeopardize the forum with too many explanations, but this aluminum is terrible, and even with a pass of 0.5mm, a 3.175 drill and 1 flute, cutting the arc vibrate too much and made the material jump from the holds. Of course, I study many sites, made my own program to compute feed rate with help of the AI, etc. and lick all the formulas from www.machiningdoctor.com. :-O LOL

One of the first things I’ve tried was to change the pos-processor, but I don’t know which one you suggest since those I tried did not work. Millimeter options I have are EMC2, ESSI Plasma, Engraver, Firecontrol (offset), G-code (BANDIT), and the one I used G-code (G41/G42). I also tried saving with previous versions of g-code without success.

Just to focus:

1. The Abort button doesn’t stop the process, just close the bar window.
2. QT6 behaves different than QT5.
3. CPU or disk is not the constrain.
4. Memory is not released. If you repeat the process, keeps growing in both QT5 and QT6, but no “slowing” in QT5.

Thanks to you, I just found something that I don’t know what to do about. Shall I edit the post?
1. I had two CAM toolpaths, the full part and a little hole. The Progress Bar shows jobs, since the hole is the first and his Exporting offset path is very fast, it shows 50% done, and I couldn’t see the advance of the second part because it is too slow. Mystery solved!
2. The problem is not only with the EXPORT, but with the Regenerating toolpath “Appending shape to offsetting at…”! As documented, editing the CAM toolpath always reformat, even if no change is made, and that also triggers the problem. QT6 didn’t crash in this situation, but took hours to finish and memory went up to 13GB. With QT5 took minutes and memory went up only to 4GB.
As requested, I’m sending the simplified .dxf.

Best Regards,
Mgoodboy

   Limbo.dxf (107.4 KiB)
CVH commented on 14.05.2026 21:29

Hi,
The counterpart of the post-processor 'G-code (G41/G42) [mm]' is 'G-code (Offset) [mm]'
Creating a profile with that is done in the blink of an eye.
And it looks OK to me.

A attempt using G41/42 also failed under 3.32.7 trial Qt5 win7 32bit
I didn't see any reasonable output report on the Command Line History.
As if every pass started at some position but went nowhere.
It never reached pass 12 and crashed.

Regards,
CVH

CVH commented on 14.05.2026 22:05

You probably mean a mill, a drill bit its geometry is not intended to mill.

To mill metals you need a robust setup.
Conventional is then better than climbing, but for grooving that doesn't matter.
The milling bit must still be sharp.
Some sort of cutting fluid is required when the bit is not Ti coated.
Otherwise the Al will clog your cutter fast.

I used a little diluted soap with success with a single flute mill of 2mm.
It cuts without any trouble 1mm deep per pass but my SPEED can be very high.
Easily between 30 to 60k RPM.
Beyond 2,5mm deep I take it a bit more gentle and I don't cut the last 0.1mm or so.

Are you sure it is aluminium and not titanium? Can you bend the 3mm sheet by hand?
Aluminum with a little zinc in it chips and works better (Engravers aluminum).

Besides 'over-doing' it there is also 'under-doing' it.
For every combination there is a sweet spot … If any.

When whole the setup vibrates more than a little to a lot or shakes, then there is something wrong. It should deflect nowhere more than 1/100.
It must sound as music, as a gentle steady note with some nuances.

Regards,
CVH

Hi.

Your patience has no limits, and I remain very grateful to you.

You are absolutely right; it was a brand-new mill. English is not my natural language and I was too tired after all the tests. You are free to laugh, but if I ever fully explore the postprocessors pull-down menu, I forgot, so I always was seeing the same 10 entries! :-) I found the G-code (Offset) [mm], thanks.
I can’t use lubrication, because my table and sacrificial board are made of MDF. I’m using a little air compressor to help cooling the mill and blow the chips. I will try to screw the material and see if this help, but I only have 10000-12000 rpm. Just a beginner here, because this and previous CNCs were prepared to be flexible, all the inputs, outputs, and power of the Mk 3/4 controller are available outside, so I only used them as Laser cutters, Plotters, etc. but not as miller machines, also due to a very weak spindle then. I’m just a self-taught man with no training on these matters.
Titanium?! It’s a joke isn’t it? But no, I can’t bend 3mm Alu, not this one, and I don’t have the slightest idea of his SAE, DIN, … refence.

About my previous “strangeness” about the number of computations, due to a professional idiosyncrasy as programmer/systems programmer, I always expect use of logic structures like “IF THEN ELSE” or “DO UNTIL” … Since after the generation of the first loop, the x and y remain constant, so it seems would be possible just to copy the result to the following loops, and only change the z. Of course, this must be an oversimplification and the problem must be much more complex…
Everything is a piece of cake, if someone else have to do the real work! ;-)

Best regards,
Mgoogboy

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing