elpollodiablo84 / atom-matlab-editor

MATLAB Editor's functionalities and utilities in Atom
3 stars 0 forks source link

[Beginner] Can't use the package #15

Open Nyansheen opened 3 years ago

Nyansheen commented 3 years ago

Hello, I'm new with Atom, and this package is one of my first (allow a good transition from Matlab to Python for me, thanks!). But I can't make it works. Can you help me to find where I'm wrong ? here is my config, and my matlab path :

Capture d’écran 2021-06-14 110353 Capture d’écran 2021-06-14 110553

When I try to execute with F5, nothing is happening. Maybe it's due to my Matlab version (R2018a) ?

Thanks for your help!

elpollodiablo84 commented 3 years ago

Your Matlab version is supported and I don't see anything wrong in your configuration. If you can, select "Log in Developer Tools console" in the package's settings, then open Atom console (CTRL + SHIFT + I) and execute a script with with F5, as usual. Let me know what happens!

mateuslattari commented 3 years ago

I have the same issue, this is the output: [Atom Matlab Editor] ERR: /bin/sh: line 1: /mnt/7096602E965FF2D8/Matlab/extern/engines/java/jar/engine.jar: cannot execute binary file: Exec format error

I use ManjaroLinux

elpollodiablo84 commented 3 years ago

I have the same issue, this is the output: [Atom Matlab Editor] ERR: /bin/sh: line 1: /mnt/7096602E965FF2D8/Matlab/extern/engines/java/jar/engine.jar: cannot execute binary file: Exec format error

I use ManjaroLinux

Probably there's some misunderstanding about your PC architecture between Matlab and this package. First of all, type and execute in Matlab the instruction computer('arch') and check that in the "Computer architecture" package config in Atom there's the same string (the first setting in the original screenshot). Since you are on Linux, you should find something different from win64. If all is coherent and there's still some problem, let me know. Sadly I don't have a Linux installation to test thi myself, so please bear with me...

mateuslattari commented 3 years ago

No, I chose my architecture as glnxa64.

elpollodiablo84 commented 3 years ago

Ok, then I need your help debugging this issue.

  1. Could you list your package options? (like in the original screenshot)
  2. Open the Atom console (CTRL + SHIFT + I) and select the "Sources" tab
  3. Open (CTRL-P) `atom-matlab-editor.js"
  4. Add a breakpoint to the row #391 (before the spawning of the process in `executeText")
  5. With Matlab open, execute a script in atom with F5
  6. Please report the contents of the variables command, pathToLib, pathToMatlab and matlabJava (eventually you can delete sensible information like your name, etc...)

Sorry if these instructions were trivial to you, I'm trying to be as clear as possible in case someone with less experience wants to replicate these steps 😅.

I hope to understand something more after this debug session (like I said, bear with me...)

mateuslattari commented 3 years ago

No, that is okay!

Command: ""/mnt/7096602E965FF2D8/MATLAB2017/sys/java/jre/glnxa64/jre/bin/java" -cp .;"/mnt/7096602E965FF2D8/MATLAB2017/extern/engines/java/jar/engine.jar" pathToLib: "/home/mateus/.atom/packages/atom-matlab-editor/lib/java" pathToMatLab: "/mnt/7096602E965FF2D8/MATLAB2017" matlabJava: "/mnt/7096602E965FF2D8/MATLAB2017/sys/java/jre/glnxa64/jre/bin/java"

elpollodiablo84 commented 3 years ago

I can't find anything wrong/strange... Some ideas:

And that's all I can think sadly... You are linking the correct paths, so this error means only that there's some misunderstanding between some architecture used, probably relative to the 32bit/64bit versions: Java is platform indipendent, and the Javascript methods I used manage themselves the correct way to use the OS proprietary functions... Since I'm not a professional coder, an error on my part is always expected, but I really can't understand where, sorry 😔