Skip to content

Conversation

@gautamkrishnar
Copy link

@gautamkrishnar gautamkrishnar commented Feb 18, 2025

Calling setGpu when user hasnt seleted any images causes the wizzard to crash with the following error:

/wizard/index.js:79
  for (var i=0; i<imagesI.images.length; i++) {
                                 ^

TypeError: Cannot read properties of undefined (reading 'length')
    at setGpu (/wizard/index.js:79:34)
    at Socket.install (/wizard/index.js:115:23)
    at Socket.emit (node:events:517:28)
    at Socket.emitUntyped (/wizard/node_modules/socket.io/dist/typed-events.js:69:22)
    at /wizard/node_modules/socket.io/dist/socket.js:697:39
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Node.js v18.20.6

This occurs whenever user choses to use the GPU but skips selecting an image.

The fix

  • Prevented calling setGpu when there are no images selected

@gautamkrishnar
Copy link
Author

cc: @j-travis @thelamer

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.

1 participant