Skip to content

Fix an endless loop.#3790

Open
mark-v-d wants to merge 1 commit intoLinuxCNC:masterfrom
mark-v-d:2.9
Open

Fix an endless loop.#3790
mark-v-d wants to merge 1 commit intoLinuxCNC:masterfrom
mark-v-d:2.9

Conversation

@mark-v-d
Copy link
Contributor

@mark-v-d mark-v-d commented Feb 5, 2026

The following program created an infinite loop, this patch fixes that


#<_initial>=20
#<_final>=19.726
#<_champher>=0.5
#<_zmax>=0
#<_zmin>=-25
#=2

G54
G7
G18
G21
T2M6G43

o100 sub
o101 if [#<_champher> gt 0]
G1 X[#<_final>-2.0001*#<_champher>]
Z#<_zmax>
X#<_final>C#<_champher>
o101 else
X#<_final>
o101 endif
W-5
U0.5
Z#<_zmin>
X#<_initial>
o100 endsub

M3 G96 S200 d1400
G95 F0.12
G52 z[0.1-#]
;m7
G71 Q100 Z[#<_zmax>+0.8+#] X#<_initial> D# I# R0.3
G52 z0
;m7
g42
G70 Q100 Z[#<_zmax>+1] X#<_initial> D# P1
g40
M9
G0X[#<_initial>+5]

M2

@andypugh
Copy link
Collaborator

andypugh commented Feb 6, 2026

There seems to be a conflict with other changes to interp_g7x.cc

Your change:

	if(std::abs(imag(location)-x)>tolerance || (*p)->ep()==location) {

Existing code in Master:

        // We have added our move commands for the last path, we end the
        // recursive function before calculating and adding intersections.
	if (p==std::prev(end()))
	    return;

	if(std::abs(imag(location)-x)>tolerance) {
>>>>>>> master

Is it possible that this is already fixed?

@mark-v-d
Copy link
Contributor Author

mark-v-d commented Feb 6, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants