GavriYashar / Matlab-Editor-Plugin

Extends features for the matlab editor, Bookmarks, FileStructure, Clipboard stack
MIT License
74 stars 12 forks source link

MEP wont get started by startup.m #51

Closed michaelkonecny closed 7 years ago

michaelkonecny commented 7 years ago

Loading MEP via the command line works fine.

However, if i try to put at.justin.matlab.Start.start('<path>/CustomProps.properties', ... '<path>/DefaultProps.properties'); in startup.m, Matlab won't start, in fact it won't even get past the splash screen.

Any ideas on what to do?

I'm using Matlab R2016b and MEP 1.07.

GavriYashar commented 7 years ago

I've come across this behaviour once, try the following:

does matlab create any log file?

michaelkonecny commented 7 years ago

I set feature.enableReplacements = false because I don't need it so I didn't set any value to path.mepr.rep and path.mepr.var. Is that OK?

javaclasspath.txt is correct, the classes get correctly loaded and I can use them, just not via the startup.m

I will look for the log file.

michaelkonecny commented 7 years ago

Sorry, I can't find any usable .log file. I tried launching matlab using matlab --logfile "c:\mylogfile.log", but that doesn't seem to do anything.

I've also set some real paths to path.mepr.rep and path.mepr.var, (even though feature.enableReplacements is false), but that didn't change anything.

My instinct would be to think startup.m gets executed before the classes get fully loaded, which might create some mess.

Do you have any ideas?

GavriYashar commented 7 years ago

Could you turn off all features and turn them on one by another, restarting matlab in between?

michaelkonecny commented 7 years ago

Even with all features turned off, Matlab won't start.

michaelkonecny commented 7 years ago

When I add a 10 sec pause before calling the start method, it works fine:

pause(10);

at.justin.matlab.Start.start('c:\Users\user\Documents\MATLAB\MatlabEditorPlugin\CustomProps.properties', ...
                     'c:\Users\user\Documents\MATLAB\MatlabEditorPlugin\CustomProps.properties');

5 secs don't work, however.

This workaround is OK for me, but I would say MEP should be able to wait for whatever it needs to wait for by itself.

GavriYashar commented 7 years ago

8cd457a3998cc4e83febdf728ac9144bda3712e2 may resolve this problem (i forgot to upload V1.08)

michaelkonecny commented 7 years ago

Now I get this error on startup: (splash screen is still open)

error

GavriYashar commented 7 years ago

Is the error statement here even remotely true? Do you have any .M file open in MATLAB?

michaelkonecny commented 7 years ago

Well, yes, because this thing appears when starting matlab, i.e. when the splash screen is still visible - before the main matlab window gets opened, so I suppose no Editor or CommandWindow instance has been created at that moment.

GavriYashar commented 7 years ago

What happens if you press ok? Does matlab start or does matlab stay on the splash screen? If matlab starts is there an error message? Does it even close the error message?

michaelkonecny commented 7 years ago

Lemme try...

michaelkonecny commented 7 years ago

The message closes, but it stays on the splash screen.

GavriYashar commented 7 years ago

Argh....

Okay. Thanks, I'll look into it tomorrow. Sorry for the inconvenience.

@me check if local *.Jar is actually the same as the one on github.

michaelkonecny commented 7 years ago

No probs, thanks for caring ;)

GavriYashar commented 7 years ago

i think i reproduced the error. it might be that we were lucky because we don't start MEP untill the very end of startup, this i think buys us enough time to start properly

GavriYashar commented 7 years ago

could you try this *.jar MEP_1.10.jar.zip

michaelkonecny commented 7 years ago

Thanks. I now get this sequence off errors :) : error1 error2 error3 error4 error5

GavriYashar commented 7 years ago

i think i might have fixed it, could you try this *jar? MEP_1.10.jar.zip

michaelkonecny commented 7 years ago

Yes! 🤝 That works.

GavriYashar commented 7 years ago

good!

Thank you for reporting the bug and for your patience.