Coder Social home page Coder Social logo

Comments (14)

cboulay avatar cboulay commented on July 24, 2024

@krigolson, based on your description (in the original issue), I would guess that the Matlab script that pushes the marker events is misusing the API. If you can share that portion of the script with us then we can probably identify the problem quickly.

from xdf-matlab.

krigolson avatar krigolson commented on July 24, 2024

Will send the script - the team we are supporting is sending the code. I have sample data but cannot upload it here.

from xdf-matlab.

krigolson avatar krigolson commented on July 24, 2024

from xdf-matlab.

cboulay avatar cboulay commented on July 24, 2024

That looks OK to me. You can choose to not provide the ,0 but that's the default so no change there.

So the problem is either in the Muse integration (i.e. it is providing incorrect timestamps) or in EEGLAB's importer. I think we'll need to take a look at a problematic xdf file to be sure.

from xdf-matlab.

krigolson avatar krigolson commented on July 24, 2024

from xdf-matlab.

dmedine avatar dmedine commented on July 24, 2024

Is it possible that a new Matlab release has futzed the type marshalling and that providing a 0 timestamp argument is not behaving as expected? This should be the same as providing no second argument, which I recommend you try. I don't have time to test today, but I will try soon. I haven't updated Matlab for a while so I am still on 2020b. Which version are you using? To be clear, providing a 0 as the second argument in push_sample should tell the outlet to give the sample the default timestamp. Honestly, though, I would be surprised if this is the issue.

There doesn't appear to be any xdf file---attaching it to an email reply to this list won't work, by the way. Maybe host it on a website/github/google drive and provide a link?

from xdf-matlab.

dmedine avatar dmedine commented on July 24, 2024

I just tested @krigolson's code for sending markers on a fresh build of liblsl-Matlab with the latest version of lsl (1.16.0) and the timestamps looked to be correct. Certainly (no surprise) the type-marshalling theory is out.

A sample faulty xdf file that can be downloaded would be most helpful here.

from xdf-matlab.

krigolson avatar krigolson commented on July 24, 2024

from xdf-matlab.

andraderenew avatar andraderenew commented on July 24, 2024

I have this error while trying to run 'build_mex.m'. I don't know if this is related to this issue because I still have lsl 1.16.0 installed with Homebrew and I still have all the markers at the beginning.

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: for: lsl_loadlib_.mexmaci64 (for architecture x86_64) option "-add_rpath @loader_path/" would duplicate path, file already has LC_RPATH for: @loader_path/

from xdf-matlab.

cboulay avatar cboulay commented on July 24, 2024

@andraderenew , can you please comment out those lines 40-42 in build_mex.m and try again?

Also, if you're up to it, it would be good to get a Mac user with Matlab to test modifying this line:
https://github.com/labstreaminglayer/liblsl-Matlab/blob/master/lsl_get_dll.m#L55
Basically we need it to find the liblsl.dylib that gets installed with hombrew.

from xdf-matlab.

dmedine avatar dmedine commented on July 24, 2024

So this issue is still in the wrong place.

The error from install_name_tool, as it says, comes when the path specified is already decorated on the library. You can see what these paths are by hitting

> otool -L <path_to/liblsl-Matlab/bin>/lsl_loadlib_.mexmaci64

If the install_name_tool is making this complaint, it means that Matlab has now (since 202??) updated its mex function for OSX to decorate the mex files with @loader_path automatically---at least that my deduction from what @andraderenew reports. That would mean that the line https://github.com/labstreaminglayer/liblsl-Matlab/blob/8fe8431b30c12bdde67a2277b5ac27a2fea4931c/build_mex.m#L41 needs to be conditional somehow.

However, this decoration is used to help Matlab load lsl_loadlib, not how lsl_loadlib loads LSL and therefor I don't believe that your error has anything to do with Homebrew or lsl.dylib.

Whether or not any of this has anything to do with the incorrect marker timestamps is another question entirely. However, I find it quite telling that now 2 people are having basically the same problem with liblsl-Matlab on Mac. Unfortunately I don't have the hardware or software to diagnose this, but it looks like an update broke something. It is working just fine on Windows at the moment (at least on Matlab 2020b). I'd be interested to know if any liblsl-Matlab users on Linux are also experiencing this issue. In the meantime, I will update my Matlab installation and see if it still works on Windows.

from xdf-matlab.

andraderenew avatar andraderenew commented on July 24, 2024

from xdf-matlab.

dmedine avatar dmedine commented on July 24, 2024

Well, I am sure that Windows is working for 2020b. I still would like to try the newest Matlab, though. By the way, I reopened this on the liblsl-Matlab issues page: labstreaminglayer/liblsl-Matlab#34. It's not over yet, but it I think it is clear that load_xdf.m is not the culprit here.

from xdf-matlab.

andraderenew avatar andraderenew commented on July 24, 2024

@andraderenew , can you please comment out those lines 40-42 in build_mex.m and try again?

Also, if you're up to it, it would be good to get a Mac user with Matlab to test modifying this line: https://github.com/labstreaminglayer/liblsl-Matlab/blob/master/lsl_get_dll.m#L55 Basically we need it to find the liblsl.dylib that gets installed with hombrew.

I can comment L40-42 and build_mex runs without a problem but error of marker at zero timepoint persists.

from xdf-matlab.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.