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

constant crashing #6

Open
lwthompson2 opened this issue Sep 18, 2024 · 6 comments
Open

constant crashing #6

lwthompson2 opened this issue Sep 18, 2024 · 6 comments

Comments

@lwthompson2
Copy link

I'm having a few issues using the online PSTH plugin that causes the GUI to crash.
GUI version 0.6.7
Windows 11

  1. When adding a condition, clicking the channel button will result in a crash. This only happens about 25% of the time. These crashes do not provide a warning message or activity log with debug info.
[open-ephys][action] Label 'Message Display Area' text changed to New Online PSTH created
[open-ephys][debug] Online PSTH (114) editor selected
[open-ephys][action] Button 'Online PSTH (114) Visualizer Tab Button' clicked
[open-ephys][debug] Data Viewport adding tab with index 6
[open-ephys][debug] Refreshing state for PSTH
[open-ephys][action] ComboBox 'Column Number Selector' selected option 4: 4
[open-ephys][action] Button 'configure' clicked
[open-ephys][action] ComboBox 'Trigger Source Type' selected option 1: TTL only
[open-ephys][action] Button 'Channels' clicked
  1. If I am able to select the channel button, clicking on a channel, then add (+) results in a crash. This happens about 70% of the time, Sometimes it will make it through the first couple of conditions I add. These crashes provide a warning that Open Ephys has crashed and produce an activity log with some debug info:
[open-ephys][action] Button '+' clicked
[open-ephys][debug] 
0: juce::SystemStats::getStackBacktrace + 0x93
1: ofSerialDeviceInfo::~ofSerialDeviceInfo + 0x19fde
2: juce::Time::getYear + 0x6a
3: UnhandledExceptionFilter + 0x1ec
4: memcpy + 0x2bbd
5: _C_specific_handler + 0x97
6: _chkstk + 0x12f
7: RtlFindCharInUnicodeString + 0xa96
8: KiUserExceptionDispatcher + 0x2e
9: juce::Viewport::updateVisibleArea + 0x92d
10: juce::Component::sendMovedResizedMessages + 0x112
11: juce::Component::setBounds + 0x1d1
15: getPluginInfo + 0x1ac5
16: juce::Button::sendClickMessage + 0x1f0
17: juce::Button::internalClickCallback + 0x92
18: juce::Button::mouseUp + 0xb6
19: juce::Component::internalMouseUp + 0x2f1
20: juce::Button::setButtonText + 0x1f9
21: juce::MouseInputSource::handleEvent + 0x1f8
22: juce::MouseInputSource::handleEvent + 0x96
23: juce::TooltipWindow::displayTip + 0x6db
24: juce::TooltipWindow::displayTip + 0xa0e
25: juce::DrawableShape::pathChanged + 0xa1c
26: juce::MouseInactivityDetector::wakeUp + 0x259
27: DispatchMessageW + 0x741
28: DispatchMessageW + 0x201
29: juce::MessageManager::runDispatchLoop + 0x111
30: juce::JUCEApplicationBase::main + 0xa9
31: TiledButtonGroupManager::setMinPaddingBetweenButtons + 0xea6
32: BaseThreadInitThunk + 0x1d
33: RtlUserThreadStart + 0x28
  1. Even if I manage to add conditions and record, the next time I open the GUI I cannot use the same configuration. The PSTH plugin will load a ton of duplicate conditions for each electrode (see screenshot).
    LoadPrevious
@anjaldoshi
Copy link
Contributor

anjaldoshi commented Sep 19, 2024

Hi @lwthompson2,

I tested all three issues you mentioned on two different machines and three operating systems (Windows 11, macOS, and Fedora Linux), and everything worked as expected. I didn’t encounter any crashes when clicking the Channels button multiple times, and changing channels then adding conditions with the + button worked fine as well. Reloading the saved configuration with multiple conditions also functioned without any issues, and there were no duplicate conditions created.

It seems the problem may be related to your specific signal chain. Could you please share your config file? I’d like to try reproducing the issue with the same setup you’re using.

Edit: I was able to repro the crashes (clicking on Channels button and clicking on add condition button) on my Linux machine. I have some idea about where the crash is coming from and a potential fix for it. I'll let you know once I have a fix for this ready.

anjaldoshi added a commit that referenced this issue Sep 19, 2024
fixes #6 - class name ambiguity causing undefined behavior
@anjaldoshi
Copy link
Contributor

Hi @lwthompson2,

I've resolved the first two crashes, but I couldn't reproduce the third issue with the plugin loading duplicate conditions for electrodes. Could you please test the attached plugin with these fixes on your end and let me know if everything works as expected? Once you confirm, I'll proceed with deploying a new version of the plugin.

To install the patched plugin, download the zip file below, extract it, and replace the existing DLL in C:\ProgramData\Open Ephys\plugins-api8 with the new one. Then, launch the GUI to load the patched plugin.

Thanks!

online-psth_bugfix_issue_6.zip

@lwthompson2
Copy link
Author

Thanks @anjaldoshi this did indeed fix the crashing problem. It will still load duplicates of the conditions after restarting the GUI, but it is very easy to remove them before starting the experiment now. Let me know if you need any more info.

@anjaldoshi
Copy link
Contributor

Great to hear that the crashes are now fixed!

Regarding the duplicate conditions problem, it'd be helpful if you can share your signal chain config file.

@anjaldoshi
Copy link
Contributor

I was finally able to repro the duplicate trigger conditions on reload bug. It was happening when using a merger in the signal chain that is upstream of the OnlinePSTH plugin (e.g. when merging two sources). I was able to fix it in this commit 957710f.

Can you test the latest patched plugin attached below and confirm if it is fixed on your end as well?

online-psth_fix_duplicate_conditions.zip

@anjaldoshi
Copy link
Contributor

Hi @lwthompson2, can you confirm if the latest plugin zip I sent resolved all of your issues?

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

No branches or pull requests

2 participants