Skip to content

NotificationCenter object is being created multiple times using VIPRE on Windows #21

@jholub15

Description

@jholub15

When attempting to use the VIPRE simple volume viewer examples on Windows, there is an issue when using NotificationCenter to update the rendering. Specifically, hitting the 'v' key for changing the view. Notification Center seems to be creating multiple objects and when this key is pressed, the one it is using does not have any registered values. This issue is not present on a Mac build, so it is assumed this has something to do with the Visual Studio compiler (2015) being used.

The multiple copies can be seen by putting a breakpoint in the NotificationCenter constructor and running the VIPRE simple volume viewer examples. The constructor gets called twice on launch and then if you hit the 'c' button to change the coloring scheme, it gets called again, and only once more. However, the coloring one works after this. So it seems almost like a scope issue where a new copy is being created if NC is being called from different objects.

I have tried several different Singleton implementations to fix this and the constructor still continue to be called multiple times. This should not be a threading issue with a race condition as I can trigger a new constructor after the application is up and running by hitting the 'c' button for changing the color.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions