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

Graph visualisation would only work if CUDASimulation was explicitly init() #1243

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

Robadob
Copy link
Member

@Robadob Robadob commented Oct 26, 2024

applyConfig_derived() is not implicitly called, I assumed otherwise. Hence, CUDAEnvironmentDirectedGraphBuffers was not receiving it's ptr to the visualisation.

Also noticed an edge-case with invalid characters in filepaths on Windows so improved the exception thrown.

@Robadob Robadob added the bug label Oct 26, 2024
@Robadob Robadob requested a review from ptheywood October 26, 2024 07:52
@Robadob Robadob self-assigned this Oct 26, 2024
@Robadob
Copy link
Member Author

Robadob commented Oct 28, 2024

Thinking about this, technically it's possible for a user to activate a visualisation after the simulation has been init, e.g. if manually stepping the model. So that call should also be updated to hook if the sim has been init I guess.

Edit: With further changes this should now be addressed, quickly tested it in davids example model by calling CUDASimulation::initFunctions() and then just stepping the model and creating the vis between a couple of random steps.

…licitly init()

It should now work if the simulation is not explicitly init, or is init before the visualiser is created.
… provided.

On Windows (under visual studio) if a std::filesystem::path contains ':', extension() returns empty string.

There's not an obvious method within std::filesystem to check a path for bad characters.
Copy link
Member

@ptheywood ptheywood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (I've not tested it myself).

Nice spot of the incorrect exception message in LoggerFactory too.

@Robadob Robadob merged commit ba93b32 into master Oct 28, 2024
21 of 22 checks passed
@Robadob Robadob deleted the bugfix_2024_10_26 branch October 28, 2024 14:15
ptheywood added a commit that referenced this pull request Nov 18, 2024
This regression was introduced by an edge-case fix for MSVC's filepath implementation, in #1243 / ba93b32
ptheywood added a commit that referenced this pull request Nov 20, 2024
This regression was introduced by an edge-case fix for MSVC's filepath implementation, in #1243 / ba93b32
ptheywood added a commit that referenced this pull request Nov 21, 2024
This regression was introduced by an edge-case fix for MSVC's filepath implementation, in #1243 / ba93b32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants