Skip to content
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]: assigning global variables to an array using meta-commands make DSF and RepRap to crash #1040

Closed
2 of 25 tasks
fragrama17 opened this issue Sep 8, 2024 · 3 comments
Closed
2 of 25 tasks
Assignees
Labels
bug Bug that has been reproduced

Comments

@fragrama17
Copy link

Duet Forum Discussion Thread

https://forum.duet3d.com/topic/36519/bug-assigning-global-variables-to-an-array-crashes-reprap

Which Duet products are you using?

  • Duet2-Wifi
  • Duet2-Ethernet
  • Duet Expansion Breakout Board
  • Duex2
  • Duex5
  • Duet2-Maestro
  • Maestro Dual Driver Expansion
  • Duet3-6HC
  • Duet3-3HC
  • Duet3-1XD
  • Duet3-1LC
  • Duet3-Tool Distribution Board
  • Duet3-Mini5+
  • Duet3-Mini2+
  • Raspberry Pi or other SBC
  • SmartEffector
  • Magnetic Filament Sensor
  • Laser Filament Sensor
  • PT100 Daughterboard
  • Thermocouple Daughterboard
  • PanelDue
  • Other
  • None

Firmware Version

3.5.1

Duet Web Control Version

None

Are you using a Single Board Computer (RaspberryPi) with your Duet?

  • Yes I use a SBC.
  • No I do not use a SBC.

Please upload the results of sending M122 in the gcode console.

M122 Report

Please upload the content of your config.g file.

Config.g

Please upload the content of any other releveant macro files.

global obj = move.axes

Details specific to your printer.

No response

Links to additional info.

No response

What happened?

Observed result
dsf and reprap break producing these messages
Sep 6, 2024, 8:52:37 AM Internal Error in GetIndex at ../src/ObjectModel/ObjectModel.cpp(577) Sep 6, 2024, 8:52:37 AM Internal Error in GetIndex at ../src/ObjectModel/ObjectModel.cpp(577) Sep 6, 2024, 8:52:37 AM Internal Error in GetIndex at ../src/ObjectModel/ObjectModel.cpp(577) Sep 6, 2024, 8:52:37 AM Internal Error in GetLastIndex at ../src/ObjectModel/ObjectModel.cpp(588)

Steps to reproduce
run command: global obj = move.axes

@fragrama17 fragrama17 added the bug Bug that has been reproduced label Sep 8, 2024
@chrishamm
Copy link
Collaborator

What's the use-case of an assignment like this? Is the bug still present in 3.5.2 stable?

@fragrama17
Copy link
Author

I've observed the same behavior in version 3.5.2.

It's important to note that the issue isn't necessarily with the feature itself, but rather that it could potentially crash the system.

Would it be possible to implement a check like it has already been done for assignment to an object ?
current behavior for an object assignment:
command -> global obj = move.axes[0]
response -> Error: Cannot assign a value of type 'object' to a variable

Thanks for your consideration.

@chrishamm chrishamm transferred this issue from Duet3D/DuetSoftwareFramework Sep 10, 2024
@chrishamm
Copy link
Collaborator

Fixed by 9f11714 but still to be merged into the main 3.5 and 3.6 branches.

@dc42 dc42 closed this as completed Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that has been reproduced
Projects
None yet
Development

No branches or pull requests

4 participants