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

Linux binary segmentation fault. #42

Closed
hmontenegro opened this issue Aug 14, 2019 · 6 comments
Closed

Linux binary segmentation fault. #42

hmontenegro opened this issue Aug 14, 2019 · 6 comments

Comments

@hmontenegro
Copy link

hmontenegro commented Aug 14, 2019

The linux binary fails with segmentation fault in current Debian testing and Ubuntu 19.04.

Steps to reproduce:

wget https://github.com/j-andrews7/Genotify/releases/download/v1.2.1/Genotify-v1.2.1-linux-x64.tar.gz
tar xzf Genotify-v1.2.1-linux-x64.tar.gz
cd Genotify-v1.2.1/
./Genotify

Debian system information:

uname -a

Linux worknote 4.19.0-5-amd64 #1 SMP Debian 4.19.37-6 (2019-07-18) x86_64 GNU/Linux

Ubuntu system information:

uname -a

Linux precision 5.0.0-25-generic #26-Ubuntu SMP Thu Aug 1 12:04:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Let me know if more information is needed.

@j-andrews7
Copy link
Owner

Did you try installing from source? If so, were you able to get it to run? Packaging these apps can be tricky, and I haven't tested it on Debian or Ubuntu 19.04, I think I tested on Ubuntu 16.04.

I will try testing in a few more VMs when I update the npm packages and fix a few bugs.

@hmontenegro
Copy link
Author

Yes, I installed from source (npm install) and run it successfully (npm start) - great application by the way. How can one build a bundled app?

I suspect the segfault is due to different / incompatible versions of shared libraries between the build OS and the OS where the app is being run.

@j-andrews7
Copy link
Owner

Okay, that's good. Building kind of sucks, as you have to build for each platform (Windows/Mac/Linux) on that platform. I used electron packager for it and built for linux/Mac in VMs. You can see the commands I used in the package.json file actually. Electron forge is another popular tool, but it's basically just a fancy wrapper around electron packager.

You pay for the convenience of cross-platform app development with a mildly sucky build process, but it really is nice to not have to make any changes between platforms.

You're likely right on that front. I will test on a few different versions of Ubuntu this time around to see if building on one versus the others helps compatibility.

@hmontenegro
Copy link
Author

hmontenegro commented Aug 14, 2019

(I am not sure the method used bellow is the recommended method to build an electron app, I just did some very quick reading).

Ok, I just built the package with electron locally, and it segfaulted again. I did:

curl -L https://github.com/j-andrews7/Genotify/archive/v1.2.1.tar.gz -o Genotify-1.2.1.tar.gz
tar -xzf Genotify-1.2.1.tar.gz 
cd Genotify-1.2.1/

npm install electron-packager --save-dev
npm install electron-packager -g

electron-packager .

Which resulted in:

Packaging app for platform linux x64 using electron v2.0.3
Failed to locate module "ProtVista" from "."

Then I did:

npm install ProtVista --save-dev
electron-packager .

Packaging app for platform linux x64 using electron v2.0.3
Wrote new app to /home/hmon/src/Genotify/Genotify-1.2.1/Genotify-linux-x64

However, running the executable resulted in a segmentation fault again. Then it occurred to me I forgot the npm audit fix step before bulding the electron app. So:

rm -rf Genotify-linux-x64/
npm audit fix
electron-packager .
./Genotify-linux-x64/Genotify

The app then runs successfully! So it seems the segfault results from an interaction between old npm modules and a newer OS than the one you originally built and tested at.

The app then loads successfully, but do not work. Typing any gene name fails to retrieve and/or load information - the app works correctly if started with npm start.

@j-andrews7
Copy link
Owner

Hmm, I'd have to look at the console, but my guess is that it's because you're using the npm version of ProtVista, whereas I had to use a version with some slight changes, so I have it install from my fork.

The EBI folks were very helpful in getting it to work/format correctly, but that's a pain I hope I don't have to go through again.

@hmontenegro
Copy link
Author

You are probably right about the ProtVista, in the previous build electron complained about it missing from modules and when I issued npm install ProtVista --save-dev, it installed the upstream EBI ProtVista.

I have installed Genotify from 1) current master, 2) from 1.2.2 branch, and 3) from the 1.2.1 release tarball. All times, electron didn't complain about missing Protvista, and the app built and worked correctly.

I don't know why it complained about failing to find ProtVista a couple of days ago, but now it is working. Maybe it is because of an update electron (electron 2.0.3 failed to locate ProtVista, but now with electron 2.0.18 it worked).

So it is either an unknown PEBCAK, or outdated electron (which would mean the cause of the PEBCAK has been pin-pointed).

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

No branches or pull requests

2 participants