# MWorks client crash on remote connection

**URL:** <https://mworks.discourse.group/t/mworks-client-crash-on-remote-connection/1081>\
**Category:** Support\
**Created:** [March 19, 2025, 8:21pm UTC](https://mworks.discourse.group/t/mworks-client-crash-on-remote-connection/1081 "2025-03-19T20:21:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hokysung](https://avatars.discourse-cdn.com/v4/letter/h/ac8455/32.png) [@hokysung](https://mworks.discourse.group/u/hokysung)\
**Post date:** [March 19, 2025, 8:21pm UTC](https://mworks.discourse.group/t/mworks-client-crash-on-remote-connection/1081/1 "2025-03-19T20:21:35Z")

</div>

Hi Chris, the issues that I generally described here are happening again:

> [@MWorks client error](https://mworks.discourse.group/t/mworks-client-error/1017):
>
> Hi Chris, I’ve been observing an error where MWClient crashes as soon as I open Eye Window when I’m connected to a remote MWServer. This started to happen a few days ago, before that the Eye Window would open fine. The following is the full error message: ‘’’ Translated Report (Full Report Below) Process: MWClient [41626] Path: /Applications/MWClient.app/Contents/MacOS/MWClient Identifier: org.mworks-project.MWClient Version: 0.13 (20…

Both MWorks on my Mac and the rig are up-to-date versions 0.13. I can connect to the experiment remotely, and can view the variables and console in real time. But whenever I open the eye window, the client immediately crashes. The experiment running in the rig is unaffected. I haven’t used this functionality for a while, so I’m not sure what changed since then.

Here is the error message I’m seeing:

* * *

## Translated Report (Full Report Below)

Process: MWClient [46407]  
Path: /Applications/MWClient.app/Contents/MacOS/MWClient  
Identifier: org.mworks-project.MWClient  
Version: 0.13 (2024.05.01)  
Code Type: ARM-64 (Native)  
Parent Process: launchd [1]  
User ID: 501

Date/Time: 2025-03-19 16:08:07.5328 -0400  
OS Version: macOS 15.3.2 (24D81)  
Report Version: 12  
Anonymous UUID: 0E7AEC52-7295-2F8F-029F-21D04837733A

Sleep/Wake UUID: 156C429A-5CD3-42C8-BCEF-03DE9006750D

Time Awake Since Boot: 200000 seconds  
Time Since Wake: 48 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC\_CRASH (SIGABRT)  
Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6  
Terminating Process: MWClient [46407]

Application Specific Information:  
abort() called

Thread 0 Crashed:  
0 libsystem\_kernel.dylib 0x18853b720 \_\_pthread\_kill + 8  
1 libsystem\_pthread.dylib 0x188573f70 pthread\_kill + 288  
2 libsystem\_c.dylib 0x188480908 abort + 128  
3 libc++abi.dylib 0x18852a44c abort\_message + 132  
4 libc++abi.dylib 0x188518a40 demangling\_terminate\_handler() + 348  
5 libobjc.A.dylib 0x1881c13e4 \_objc\_terminate() + 156  
6 libc++abi.dylib 0x188529710 std::\_\_terminate(void (_)()) + 16  
7 libc++abi.dylib 0x1885296b4 std::terminate() + 108  
8 libdispatch.dylib 0x1883c15c8 \_dispatch\_client\_callout + 40  
9 libdispatch.dylib 0x1883d0e08 \_dispatch\_lane\_barrier\_sync\_invoke\_and\_complete + 56  
10 MWorksEyeWindow 0x106560930 -[MWTimePlotView drawRect:] + 300  
11 AppKit 0x18c2e6770 \_NSViewDrawRect + 160  
12 AppKit 0x18ccbddf4 -[NSView \_recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 1084  
13 AppKit 0x18c2e6164 -[NSView(NSLayerKitGlue) \_drawViewBackingLayer:inContext:drawingHandler:] + 536  
14 AppKit 0x18c9707ac -[NSViewBackingLayer drawInContext:] + 56  
15 AppKit 0x18c5ee5e0 0x18c197000 + 4552160  
16 AppKit 0x18c5e9420 0x18c197000 + 4531232  
17 AppKit 0x18c5e4c78 0x18c197000 + 4512888  
18 AppKit 0x18c5e9000 0x18c197000 + 4530176  
19 AppKit 0x18c5e6b70 0x18c197000 + 4520816  
20 AppKit 0x18c65f18c 0x18c197000 + 5013900  
21 AppKit 0x18c65f790 0x18c197000 + 5015440  
22 AppKit 0x18c9703d8 -[NSViewBackingLayer display] + 1272  
23 QuartzCore 0x1911bc1b8 CA::Layer::display\_if\_needed(CA::Transaction_) + 784  
24 QuartzCore 0x19134b0e4 CA::Context::commit\_transaction(CA::Transaction\*, double, double\*) + 528  
25 QuartzCore 0x19119e780 CA::Transaction::commit() + 648  
26 AppKit 0x18c2f5a9c \_\_62+[CATransaction(NSCATransaction) NS\_setFlushesWithDisplayLink]\_block\_invoke + 272  
27 AppKit 0x18cd008f4 \_\_\_NSRunLoopObserverCreateWithHandler\_block\_invoke + 64  
28 CoreFoundation 0x18865bbe8 **CFRUNLOOP\_IS\_CALLING\_OUT\_TO\_AN\_OBSERVER\_CALLBACK\_FUNCTION** + 36  
29 CoreFoundation 0x18865bad4 \_\_CFRunLoopDoObservers + 552  
30 CoreFoundation 0x18865b104 \_\_CFRunLoopRun + 788  
31 CoreFoundation 0x18865a734 CFRunLoopRunSpecific + 588  
32 HIToolbox 0x193bc9530 RunCurrentEventLoopInMode + 292  
33 HIToolbox 0x193bcf17c ReceiveNextEventCommon + 216  
34 HIToolbox 0x193bcf508 \_BlockUntilNextEventMatchingListInModeWithFilter + 76  
35 AppKit 0x18c1d2848 \_DPSNextEvent + 660  
36 AppKit 0x18cb38c24 -[NSApplication(NSEventRouting) \_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688  
37 AppKit 0x18c1c5874 -[NSApplication run] + 480  
38 AppKit 0x18c19c068 NSApplicationMain + 888  
39 MWClient 0x10026a440 main + 112  
40 dyld 0x1881f4274 start + 2840

Thread 1:  
0 libsystem\_pthread.dylib 0x18856f0e8 start\_wqthread + 0

Thread 2:  
0 libsystem\_pthread.dylib 0x18856f0e8 start\_wqthread + 0

Thread 3:  
0 libsystem\_kernel.dylib 0x1885366ec \_\_psynch\_cvwait + 8  
1 libsystem\_pthread.dylib 0x188574894 \_pthread\_cond\_wait + 1204  
2 libc++.1.dylib 0x1884aa60c std::\_\_1::condition\_variable::\_\_do\_timed\_wait(std::\_\_1::unique\_lockstd::\_\_1::mutex&, std::\_\_1::chrono::time\_point\<std::\_\_1::chrono::system\_clock, std::\_\_1::chrono::duration\<long long, std::\_\_1::ratio\<1l, 1000000000l\>\>\>) + 100  
3 MWorksCore 0x101504fc0 mw::Event::getNextEvent(long long) const + 148  
4 MWorksCore 0x10157ac7c mw::EventBufferReader::getNextEvent(long long) + 32  
5 MWorksCore 0x1015d7ee0 mw::EventListener::service() + 100  
6 MWorksCore 0x1015d8028 void\* std::\_\_1::\_\_thread\_proxy[abi:ue170006]\<std::\_\_1::tuple\<std::\_\_1::unique\_ptr\<std::\_\_1::\_\_thread\_struct, std::\_\_1::default\_deletestd::\_\_1::\_\_thread\_struct\>, mw::EventListener::startListener()::$\_0\>\>(void\*) + 52  
7 libsystem\_pthread.dylib 0x1885742e4 \_pthread\_start + 136  
8 libsystem\_pthread.dylib 0x18856f0fc thread\_start + 8

Thread 4:: com.apple.NSEventThread  
0 libsystem\_kernel.dylib 0x188532f54 mach\_msg2\_trap + 8  
1 libsystem\_kernel.dylib 0x188545604 mach\_msg2\_internal + 80  
2 libsystem\_kernel.dylib 0x18853baf8 mach\_msg\_overwrite + 480  
3 libsystem\_kernel.dylib 0x18853329c mach\_msg + 24  
4 CoreFoundation 0x18865ca4c \_\_CFRunLoopServiceMachPort + 160  
5 CoreFoundation 0x18865b2ac \_\_CFRunLoopRun + 1212  
6 CoreFoundation 0x18865a734 CFRunLoopRunSpecific + 588  
7 AppKit 0x18c2f7278 \_NSEventThread + 148  
8 libsystem\_pthread.dylib 0x1885742e4 \_pthread\_start + 136  
9 libsystem\_pthread.dylib 0x18856f0fc thread\_start + 8

Thread 5:  
0 libsystem\_pthread.dylib 0x18856f0e8 start\_wqthread + 0

Thread 6:: _/Reaper  
0 libsystem\_kernel.dylib 0x18853901c kevent + 8  
1 MWorksCore 0x1017f4c40 zmq::kqueue\_t::loop() + 228 (kqueue.cpp:163)  
2 MWorksCore 0x101820e60 thread\_routine(void_) + 76 (thread.cpp:229)  
3 libsystem\_pthread.dylib 0x1885742e4 \_pthread\_start + 136  
4 libsystem\_pthread.dylib 0x18856f0fc thread\_start + 8

Thread 7:: _/0  
0 libsystem\_kernel.dylib 0x18853901c kevent + 8  
1 MWorksCore 0x1017f4c40 zmq::kqueue\_t::loop() + 228 (kqueue.cpp:163)  
2 MWorksCore 0x101820e60 thread\_routine(void_) + 76 (thread.cpp:229)  
3 libsystem\_pthread.dylib 0x1885742e4 \_pthread\_start + 136  
4 libsystem\_pthread.dylib 0x18856f0fc thread\_start + 8

Thread 8:  
0 libsystem\_kernel.dylib 0x18853b830 poll + 8  
1 MWorksCore 0x10180edcc zmq::signaler\_t::wait(int) const + 76 (signaler.cpp:219)  
2 MWorksCore 0x1017f5aa4 zmq::mailbox\_t::recv(zmq::command\_t\*, int) + 80 (mailbox.cpp:54)  
3 MWorksCore 0x101810e4c zmq::socket\_base\_t::process\_commands(int, bool) + 76 (socket\_base.cpp:1478)  
4 MWorksCore 0x101813b90 zmq::socket\_base\_t::recv(zmq::msg\_t\*, int) + 348 (socket\_base.cpp:1363)  
5 MWorksCore 0x10182e294 s\_recvmsg(zmq::socket\_base\_t\*, zmq\_msg\_t\*, int) + 16 (zmq.cpp:471) [inlined]  
6 MWorksCore 0x10182e294 zmq\_msg\_recv + 60 (zmq.cpp:622)  
7 MWorksCore 0x1016588cc mw::ZeroMQSocket::Message::recv(mw::ZeroMQSocket&, int) + 48  
8 MWorksCore 0x101659578 mw::ZeroMQSocket::recv(mworks\_boost::shared\_ptrmw::Event&) + 100  
9 MWorksCore 0x101644a50 mw::ZeroMQIncomingConnectionBase::handleNextEvent() + 36  
10 MWorksCore 0x101644fc8 void\* std::\_\_1::\_\_thread\_proxy[abi:ue170006]\<std::\_\_1::tuple\<std::\_\_1::unique\_ptr\<std::\_\_1::\_\_thread\_struct, std::\_\_1::default\_deletestd::\_\_1::\_\_thread\_struct\>, mw::ZeroMQIncomingConnectionBase::startEventHandlerThread()::$\_0\>\>(void\*) + 68  
11 libsystem\_pthread.dylib 0x1885742e4 \_pthread\_start + 136  
12 libsystem\_pthread.dylib 0x18856f0fc thread\_start + 8

Thread 9:  
0 libsystem\_kernel.dylib 0x1885366ec \_\_psynch\_cvwait + 8  
1 libsystem\_pthread.dylib 0x188574894 \_pthread\_cond\_wait + 1204  
2 libc++.1.dylib 0x1884aa60c std::\_\_1::condition\_variable::\_\_do\_timed\_wait(std::\_\_1::unique\_lockstd::\_\_1::mutex&, std::\_\_1::chrono::time\_point\<std::\_\_1::chrono::system\_clock, std::\_\_1::chrono::duration\<long long, std::\_\_1::ratio\<1l, 1000000000l\>\>\>) + 100  
3 MWorksCore 0x101504fc0 mw::Event::getNextEvent(long long) const + 148  
4 MWorksCore 0x10157ac7c mw::EventBufferReader::getNextEvent(long long) + 32  
5 MWorksCore 0x101644ddc mw::ZeroMQOutgoingConnectionBase::handleEvents() + 104  
6 MWorksCore 0x101645098 void\* std::\_\_1::\_\_thread\_proxy[abi:ue170006]\<std::\_\_1::tuple\<std::\_\_1::unique\_ptr\<std::\_\_1::\_\_thread\_struct, std::\_\_1::default\_deletestd::\_\_1::\_\_thread\_struct\>, mw::ZeroMQOutgoingConnectionBase::startEventHandlerThread()::$\_1\>\>(void\*) + 52  
7 libsystem\_pthread.dylib 0x1885742e4 \_pthread\_start + 136  
8 libsystem\_pthread.dylib 0x18856f0fc thread\_start + 8

Thread 10:  
0 libsystem\_pthread.dylib 0x18856f0e8 start\_wqthread + 0

Thread 11:  
0 libsystem\_pthread.dylib 0x18856f0e8 start\_wqthread + 0

Thread 12:: HIE: M\_ 8c056f2c192dd847 2025-03-19 16:08:07.525  
0 libsystem\_kernel.dylib 0x188532f54 mach\_msg2\_trap + 8  
1 libsystem\_kernel.dylib 0x188545604 mach\_msg2\_internal + 80  
2 libsystem\_kernel.dylib 0x188562458 thread\_suspend + 108  
3 HIServices 0x18efec164 SOME\_OTHER\_THREAD\_SWALLOWED\_AT\_LEAST\_ONE\_EXCEPTION + 20  
4 Foundation 0x189825444 **NSThread\_\_start** + 724  
5 libsystem\_pthread.dylib 0x1885742e4 \_pthread\_start + 136  
6 libsystem\_pthread.dylib 0x18856f0fc thread\_start + 8

Thread 0 crashed with ARM Thread State (64-bit):  
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000  
x4: 0x000000018852ee1b x5: 0x000000016fb939a0 x6: 0x000000000000006e x7: 0x00000000000001b0  
x8: 0xba3d8b03703f8e8a x9: 0xba3d8b0281d1c6ca x10: 0x0000000000000051 x11: 0x000000000000000b  
x12: 0x000000000000000b x13: 0x0000000188a3aca2 x14: 0x00000000001ff800 x15: 0x00000000000007fb  
x16: 0x0000000000000148 x17: 0x00000001fa5262c0 x18: 0x0000000000000000 x19: 0x0000000000000006  
x20: 0x0000000000000103 x21: 0x00000001f1ee4920 x22: 0x00000001f1ee6188 x23: 0x00006000000abc90  
x24: 0x000000011a63d4c0 x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x00000001ebfed000  
x28: 0x0000000000000098 fp: 0x000000016fb93910 lr: 0x0000000188573f70  
sp: 0x000000016fb938f0 pc: 0x000000018853b720 cpsr: 0x40000000  
far: 0x0000000000000000 esr: 0x56000080 Address size fault  
… (more)

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [March 20, 2025, 2:26pm UTC](https://mworks.discourse.group/t/mworks-client-crash-on-remote-connection/1081/2 "2025-03-20T14:26:46Z")

</div>

Hi Hokyung,

Based on the crash report, it looks like this is indeed the same issue as before. Back in August, I made a change that should prevent the client crash, so it’s in the [nightly build](https://mworks.github.io/downloads/) but not 0.13.

The fix handles the case where the eye window receives non-numeric or invalid values (e.g. NaN) for some of its parameters. Maybe it’d be worth going through one of your event files and looking for invalid eye position data? If you find some, maybe we can figure out where’s it coming from and thereby track down the root cause of the issue.

Also, are you once again seeing messages of the form `Invalid persistent value for variable "x"`? I’m guessing you’re not, since you’re running MWorks 0.13 for both client and server, but I just wanted to check.

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![hokysung](https://avatars.discourse-cdn.com/v4/letter/h/ac8455/32.png) [@hokysung](https://mworks.discourse.group/u/hokysung)\
**Post date:** [March 25, 2025, 6:45pm UTC](https://mworks.discourse.group/t/mworks-client-crash-on-remote-connection/1081/3 "2025-03-25T18:45:08Z")

</div>

Hi Chris,

I see, I will try to track down the event file and figure out what the issue is. I’m not seeing the errors you mentioned.

Thank you

---

<div class="post-metadata">

**Author:** ![hokysung](https://avatars.discourse-cdn.com/v4/letter/h/ac8455/32.png) [@hokysung](https://mworks.discourse.group/u/hokysung)\
**Post date:** [May 15, 2025, 8:48pm UTC](https://mworks.discourse.group/t/mworks-client-crash-on-remote-connection/1081/4 "2025-05-15T20:48:58Z")

</div>

Hi Chris,

I have started to observe this crash upon trying to open the eye window, this time in the same computer the server is running. Up to now I have only had the crash happen when I was connecting from a remote client. I am using the same MWorks version as before, 0.13. It’s a bit odd because it used to work fine until earlier this week.

I’m plotting microstim\_line (a 0/1 pulse that would send microstimulation signals) and sync\_pulse (a true/false value coming in from an arduino) on the digital window. As far as I can tell, the variable values for these as well as eye\_x, eye\_y look reasonable on the variables window. I am using pupil\_lx, pupil\_ly from the variable window, then passing it through an eye calibrator, boxcar filters, then basic\_eye\_monitor. I am in the middle of an experiment now but once I am done, I can try again with mouse as eye input.

Would switching to the nightly version take care of this issue?

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [May 16, 2025, 3:03pm UTC](https://mworks.discourse.group/t/mworks-client-crash-on-remote-connection/1081/5 "2025-05-16T15:03:51Z")

</div>

Hi Hokyung,

If the underlying issue is that some of the incoming data have invalid values, then switching to the nightly build should prevent the crash. The eye window will also issue an error message (on the MWorks console) about each invalid value, which will confirm the issue.

If you switch to the nightly build and the client _still_ crashes, we’ll know we’re dealing with another issue. Either way, this will give us useful information, so I recommend trying the nightly if you can.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 25, 2026, 3:09pm UTC](https://mworks.discourse.group/t/mworks-client-crash-on-remote-connection/1081/6 "2026-08-25T15:09:57Z")

</div>


