-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: setting elements of nested arrays sometimes goes wrong #1008
Comments
I identified two issues. The minor one is incorrect calls to lock the heap. This is fixed in commit 702c47b. The major one is that at ArrayHandle.cpp(91) the recursive call to InternalAssignIndexed may trigger compacting garbage collection, which may cause the elements of the array (one of which is being assigned) to be moved. |
Code from user Nine Mile which is claimed to reproduce this: Setup:
Some time later:
|
Here's a macro based on the code from Nine Mile that reproduces it. When invoked with a small Q parameter, it appears to work without error. When invoked with Q values greater than about 20 it either crashes or reports array index out of bounds.
|
Believed fixed now in 3.5-dev. Andy S has confirmed that the fix works in his test setup. Now waiting for feedback from the user who posted the original thread. |
User reported that it looks good, see https://forum.duet3d.com/post/339680. |
When the 'set' command is used to change the value of an element of an array within an array, the assignment can go wrong. See https://forum.duet3d.com/topic/35725/question-array-assignment.
The text was updated successfully, but these errors were encountered: