Open Jaq678 opened 1 week ago
Please provide more details:
Not OP, but Dice is an OpenBoard widget. It can be found under Interactivities
-> Dice
. Just DnD and the described behaviour happens.
Looking at the WebInspector inside OpenBoard, the error occurs in https://github.com/OpenBoard-org/OpenBoard/blob/1665e2e570e5e76c75d9e8a4b7e9a3f0c5071736/resources/library/interactivities/Dice.wgt/js/main.js#L155, where num
is NaN
, so invalid array length.
num
comes from https://github.com/OpenBoard-org/OpenBoard/blob/1665e2e570e5e76c75d9e8a4b7e9a3f0c5071736/resources/library/interactivities/Dice.wgt/js/main.js#L4, and app
is initialised here:
https://github.com/OpenBoard-org/OpenBoard/blob/1665e2e570e5e76c75d9e8a4b7e9a3f0c5071736/resources/library/interactivities/Dice.wgt/js/lib/ubw-main.js#L33-L43
Comparing with Scale.wgt
, that has the function fillParameters
which doesn't exist in Dice.wgt
:
https://github.com/OpenBoard-org/OpenBoard/blob/1665e2e570e5e76c75d9e8a4b7e9a3f0c5071736/resources/library/interactivities/Scale.wgt/js/lib/ubw-main.js#L54-L66
Manually setting num
to 6
resolves the error and displays six dice. This is only academic insofar as the number of dice is supposed to be dynamically set.
OS: Arch Linux Kernel: Linux 6.9.5.arch1-1 openboard: 1.7.1-2 (via AUR) qt6-base: 6.7.1-4
@Vekhir Thanks for clarification! My fault that I missed this app. Yes, I can also reproduce the problem. And also thank you very much for your error analysis. I think you're on the right track. I add the bug label here.
A PR for fixing this and additionally allowing automatic updates is underway. Thanks @Jaq678 for reporting.
Everytime I try to get the interactive dice to work a black box with an arrow in the middle appears but no way to use the dice, can someone help me to use it please?