schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.2k stars 281 forks source link

PyMOL crashes after "Copy to Object" #340

Closed boyinthebigcity closed 7 months ago

boyinthebigcity commented 8 months ago

When attempting to create a new object from a selection (1 chain from a PDB structure), PyMOL crashes. I get a pop-up saying:

The action "Run Shell Script" encountered an error: ""

followed by a second pop-up saying:

Python quit unexpectedly.

Wondering if this is a shared issue, and if there is any work around?

PyMOL open-source Version 2.5.0 running on Apple M2 processor in macOS Sonoma 14.2.1

Screenshot 2024-02-28 at 14 18 22
JarrettSJohnson commented 8 months ago

Trying to reproduce. Can you point me to a specific PDBID this is reproducible with?

YoshitakaMo commented 7 months ago

Dear @boyinthebigcity and @JarrettSJohnson, I'll provide relevant information. This issue arises when installing PyMOL using Mac's Homebrew (brew install pymol). Here are the steps to reproduce this issue:

  1. Install PyMOL 2.5.0 on Mac using brew install pymol.
  2. Download PDB ID: "1EW2", Chain name: "A", Assembly: "1" via "File" -> "Get PDB" in PyMOL.
  3. Select "copy to object" or "state" -> "split" from the "1EW2A" object, resulting in a segmentation fault.

This issue is likely associated with building and installing with python 3.12. Homebrew-core always enforces the use of the latest python, and the issue does not occur with python 3.11. However, with python 3.12, segmentation faults consistently occur not only with "copy to object" but also with many other functionalities such as "split states."

I have been circumventing this issue by using an older python version:

# 0. Make sure Homebrew is already installed.
# 1. download pymol.rb on my Desktop
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/24fecc458470a2478f941a5045beab90d25ae543/Formula/p/pymol.rb -O ~/Desktop/pymol.rb
# 2. change the dependency from python3.12 to python 3.11 with gnu-sed
brew install gnu-sed
gsed -i -e "s/3.12/3.11/g" ~/Desktop/pymol.rb
# 3. install pymol according to the modified pymol.rb
brew install ~/Desktop/pymol.rb --verbose --build-from-source

This procedure will circumvent the bug.

but it would greatly help if the PyMOL developers could address this issue.

JarrettSJohnson commented 7 months ago

Hi @YoshitakaMo , are we sure that this hasn't been fixed by https://github.com/schrodinger/pymol-open-source/issues/327 / https://github.com/schrodinger/pymol-open-source/pull/324 ?

YoshitakaMo commented 7 months ago

@JarrettSJohnson Sorry, I've missed the fixes you mentioned. In my case, the bug has been fixed using brew install pymol --HEAD. Thank you!

JarrettSJohnson commented 7 months ago

No worries. Glad to get further confirmation :) Open-Source will be tagged with 3.0 this week, so the fix will also be available there.