Skip to content

fix crash on macos on network interface change#225

Open
WesselVS wants to merge 1 commit intosccn:devfrom
WesselVS:master
Open

fix crash on macos on network interface change#225
WesselVS wants to merge 1 commit intosccn:devfrom
WesselVS:master

Conversation

@WesselVS
Copy link

When set_option is called on an unavailable socket, a crash occurs (at least on MacOS). I reproduce this by creating a local outlet, run the GetAllStreams example and unplugging my wire.

@mediashock
Copy link

Hey, which version are you using? do you happen to have the compiled library for osx ARM anywhere?

@WesselVS
Copy link
Author

Hey, which version are you using? do you happen to have the compiled library for osx ARM anywhere?

https://github.com/WesselVS/liblsl/releases/tag/fix_release

@zeyus
Copy link
Contributor

zeyus commented Apr 11, 2025

@WesselVS this crash happens on all platforms I've tried. This includes if I spin up a VM or switch Wifi networks, the app will crash, so this seems invaluable to have

@cboulay cboulay deleted the branch sccn:dev July 13, 2025 05:16
@cboulay cboulay closed this Jul 13, 2025
@cboulay cboulay reopened this Jul 13, 2025
@cboulay cboulay changed the base branch from master to dev July 13, 2025 05:23
@zeyus
Copy link
Contributor

zeyus commented Jan 27, 2026

@WesselVS I forgot about your PR but I have added (complementary) functionality in a new PR #259

I think there is also a larger discussion to be had around interface management, this is not a concern hopefully in most lab environments, but if you add mobile devices into the mix suddenly it can become a problem.

Some issues can be avoided, e.g. if you are using LSL on a laptop, and it has flaky wifi, you can run the experiment over Ethernet, and only bind LSL to the eth interface.

It could be nice to deal with exceptions / interface changes nicely, either with trying to rebind based on the config (with some graceful timeout / check interval) and/or an exposed rebind API method that could be called when required, as long as the app doesn't crash when a change occurs.

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.

4 participants