You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If attempting to remove over 255 measurements at once through the measurement manager, the corresponding workflow entry for that action will throw an error. This is due to the maximum number of supported arguments for a groovy function being 255.
To Reproduce
Steps to reproduce the behavior:
Create >255 different measurements for a project entry containing detection objects.
Remove >255 measurements through the measurement manager GUI in one action.
Create a script from the workflow tab consisting of all of the above actions. Note the error message: ERROR: MultipleCompilationErrorsException: startup failed: General error during instruction selection: The max number of supported arguments is 255, but found 1191
Expected behavior
The script generated from the workflow tab should be able to reproduce most of the plugin-based actions, including the act of removing measurements. A quick fix is to modify the generated script and distribute the list of measurements to remove over multiple removeMeasurement() operations.
Screenshots
Desktop (please complete the following information):
OS: Windows 10
QuPath Version 0.4.0-SNAPSHOT
Additional context
Minor issue, easy enough to manually distribute the list of measurements to remove over multiple removeMeasurement() statements
The text was updated successfully, but these errors were encountered:
Edit: I think adding an extra method that takes a list rather than a varargs array would be a good solution in the longer term, but looping through a list for now is a good workaround.
Fixesqupath#915
Using an array is enough to overcome the problem.
The following script helps quickly add many measurements to a selected object:
```
def pathObject = getSelectedObject()
def measurements = []
try (def ml = pathObject.getMeasurementList()) {
for (int i = 0; i < 500; i++) {
def n = "Measurement $i"
measurements << n
ml.putMeasurement(n, i*2)
}
}
```
Bug report
Describe the bug
If attempting to remove over 255 measurements at once through the measurement manager, the corresponding workflow entry for that action will throw an error. This is due to the maximum number of supported arguments for a groovy function being 255.
To Reproduce
Steps to reproduce the behavior:
ERROR: MultipleCompilationErrorsException: startup failed: General error during instruction selection: The max number of supported arguments is 255, but found 1191
Expected behavior
The script generated from the workflow tab should be able to reproduce most of the plugin-based actions, including the act of removing measurements. A quick fix is to modify the generated script and distribute the list of measurements to remove over multiple
removeMeasurement()
operations.Screenshots

Desktop (please complete the following information):
Additional context
Minor issue, easy enough to manually distribute the list of measurements to remove over multiple
removeMeasurement()
statementsThe text was updated successfully, but these errors were encountered: