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

[FIX] Segfault in forward computation #969

Closed
wants to merge 1 commit into from

Conversation

johaenns
Copy link
Contributor

Deleting the QSharedDataPointer causes a segfault when later dereferencing *m_eeg_forward_grad.data()/*m_meg_forward_grad.data() in the call of compute_forward_eeg/compute_forward_meg.

There might be a way to fix this while still deleting the (basically empty) object behind the shared pointer. However, as far as I can see we do not have a guarantee that the value of m_pSettings->compute_grad does not change, so if it would switch to true later on and for some reason calculatedFwd() gets called we would have a problem with the current code anyway.

@johaenns
Copy link
Contributor Author

Included the small bug fix in PR #970

@johaenns johaenns closed this Apr 29, 2024
@johaenns johaenns deleted the fix_fwd_segfault branch April 29, 2024 08:26
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