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

masiv_plugin.isPlugin is broken in MATLAB R2016b #3

Closed
raacampbell opened this issue Jan 4, 2017 · 5 comments
Closed

masiv_plugin.isPlugin is broken in MATLAB R2016b #3

raacampbell opened this issue Jan 4, 2017 · 5 comments
Assignees

Comments

@raacampbell
Copy link
Collaborator

The code we use to determine if an .m file is a plugin fails in MATLAB 2016b onwards.

 masiv_plugin.isPlugin('neuriteTracer.m')
Error using meta.class.fromName
Error: File: /home/xxx/MaSIV_plugins_dev/neuriteTracer/neuriteTracer.m Line: 116 Column: 17
A constructor call to superclass masivPlugin appears after the object is used, or after a return.

Error in masiv_plugin.isPlugin (line 41)
            m=meta.class.fromName(className);
@alexanderbrown
Copy link
Collaborator

alexanderbrown commented Jan 4, 2017

Will download new matlab and check it out

@alexanderbrown
Copy link
Collaborator

Sorry, my misunderstanding - i thought this was in my code but it's in your class for handling installation. On a separate but related note, perhaps a little confusing to have functions called masivPlugin and masiv_plugin

@raacampbell
Copy link
Collaborator Author

Unfortunately it's not just installation. I used masiv_plugin.isPlugin to search the plugin paths and populate the plugins menu with whatever it finds there. MaSIV searches for plugins at startup and in R2016b crashes when it finds the first one.

The problem is Line 41 in masiv_plugin.isPlugin where it does m=meta.class.fromName(className). This seems to execute the plugin's constructor and it chokes when it reaches the call for executing the superclass constructor [obj=obj@masivPlugin(caller)] If you comment out that line it doesn't crash, but of course the plugin won't work either. Ideas?

I created Issue #8 for the renaming.

@raacampbell
Copy link
Collaborator Author

raacampbell commented Jan 5, 2017

This could even be a regression in MATLAB itself, so I'll contact the TMW.

@raacampbell
Copy link
Collaborator Author

Ah ha! The problem was, as the error message tried to tell me, that there was a return statement before the constructor call. Only the neurite tracer exhibited the bug and it's now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants