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] Reset View throws an error when CPU Rendering is enabled #4643

Open
Omid-Heydarzadeh opened this issue Jan 4, 2025 · 0 comments
Open
Assignees
Labels
Bug Verified Bug reported, reproducible, and verified.

Comments

@Omid-Heydarzadeh
Copy link

Describe the Bug

After manually enabling CPU rendering, reset view button throws an error

on Chrome:

Context: Route /viewer
Error Message: Cannot read properties of undefined (reading 'isA')
Stack: TypeError: Cannot read properties of undefined (reading 'isA')
at actorIsA (http://localhost:3000/app.js:19312:27)
at isImageActor (http://localhost:3000/app.js:19308:13)
at StackViewport.getTransferFunction (http://localhost:3000/app.js:2985:82)
at StackViewport._resetProperties (http://localhost:3000/app.js:2690:39)
at StackViewport.resetProperties (http://localhost:3000/app.js:2676:14)
at resetViewport (http://localhost:3000/extensions_cornerstone_src_index_tsx.js:1295:33)
at CommandsManager.runCommand (http://localhost:3000/app.js:118597:14)
at http://localhost:3000/app.js:118651:23
at Array.forEach ()
at CommandsManager.run (http://localhost:3000/app.js:118644:14)

on Firefox:

Context: Route /viewer
Error Message: actorToCheck is undefined
Stack: actorIsA@http://localhost:3000/app.js:19312:13
isImageActor@http://localhost:3000/app.js:19308:13
getTransferFunction@http://localhost:3000/app.js:2985:82
_resetProperties@http://localhost:3000/app.js:2690:39
resetProperties@http://localhost:3000/app.js:2676:14
resetViewport@http://localhost:3000/extensions_cornerstone_src_index_tsx.js:1295:16
runCommand@http://localhost:3000/app.js:118597:14
../../core/src/classes/CommandsManager.ts/run/<@http://localhost:3000/app.js:118651:23
run@http://localhost:3000/app.js:118644:14
recordInteraction@http://localhost:3000/app.js:128459:27
../../core/src/hooks/useToolbar.tsx/useToolbar/onInteraction<@http://localhost:3000/app.js:121194:20
onClick@http://localhost:3000/app.js:182792:20
handleOnClick@http://localhost:3000/app.js:166446:12
callCallback@http://localhost:3000/app.js:387052:14
invokeGuardedCallbackDev@http://localhost:3000/app.js:387101:16
invokeGuardedCallback@http://localhost:3000/app.js:387165:31
invokeGuardedCallbackAndCatchFirstError@http://localhost:3000/app.js:387179:25
executeDispatch@http://localhost:3000/app.js:391929:42
processDispatchQueueItemsInOrder@http://localhost:3000/app.js:391961:22
processDispatchQueue@http://localhost:3000/app.js:391974:37
dispatchEventsForPlugins@http://localhost:3000/app.js:391985:23
../../../node_modules/react-dom/cjs/react-dom.development.js/dispatchEventForPluginEventSystem/<@http://localhost:3000/app.js:392176:12
batchedUpdates$1@http://localhost:3000/app.js:409062:12
batchedUpdates@http://localhost:3000/app.js:386879:12
dispatchEventForPluginEventSystem@http://localhost:3000/app.js:392175:17
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay@http://localhost:3000/app.js:389353:38
dispatchEvent@http://localhost:3000/app.js:389345:84
dispatchDiscreteEvent@http://localhost:3000/app.js:389318:18

Steps to Reproduce

  1. Add useCPURendering: true to config file
  2. Run yarn dev
  3. Open any study, change position or window level and click reset view button

The current behavior

OHIF throws an error and viewer canvas becomes black

The expected behavior

It should reset image position, zoom, etc to their default values

OS

Windows 11

Node version

20.11.0

Browser

Chrome v131.0.6778.205, Firefox v133.0.3

@Omid-Heydarzadeh Omid-Heydarzadeh added the Awaiting Reproduction Can we reproduce the reported bug? label Jan 4, 2025
@sedghi sedghi removed the Awaiting Reproduction Can we reproduce the reported bug? label Jan 6, 2025
@sedghi sedghi added the Bug Verified Bug reported, reproducible, and verified. label Jan 6, 2025 — with Linear
@linear linear bot assigned sedghi Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Verified Bug reported, reproducible, and verified.
Projects
None yet
Development

No branches or pull requests

2 participants