Skip to content

offscreenBuffer initialize in main thread#84

Open
bldrvnlw wants to merge 2 commits into
masterfrom
feature/fixopenglcontext
Open

offscreenBuffer initialize in main thread#84
bldrvnlw wants to merge 2 commits into
masterfrom
feature/fixopenglcontext

Conversation

@bldrvnlw

Copy link
Copy Markdown
Contributor

Move initialization of the offscreenBuffer (which sets an openGL context to current) to the main thread. This fixes a macOS crash due to a UI operation not from the UI (main) thread

@bldrvnlw bldrvnlw requested a review from ThomasKroes November 22, 2023 09:24

@ThomasKroes ThomasKroes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On Windows 11 MVS crashes:

tSNE initialized.
Sparse matrix allocated.
Computing high dimensional probability distributions.. Num dims: 13 Num data points: 167281
Probability distributions calculated.

A-tSNE: Compute probability distribution: 21.7643 seconds

QWindowsGLContext::makeCurrent: wglMakeCurrent() failed for existing context data (The requested resource is in use.)
A-tSNE: Set up offscreen buffer in 0.0003292 seconds.
Compute shader info log:

Compute shader info log:

A-tSNE: Init t-SNE 1.64604 seconds.
A-tSNE: Computing gradient descent..

C:/HDPS/Development/DevBundle/imaging_test/install/release/ManiVault Studio.exe (process 64252) exited with code -1073741571.

@bldrvnlw

bldrvnlw commented Nov 22, 2023

Copy link
Copy Markdown
Contributor Author

I've updated this with ifdef/ifndef APPLE to separate the macOS fix from the Windows & Linux functionality in TsneAnalysis.cpp

@ThomasKroes ThomasKroes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works perfectly on Win 11!

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.

2 participants