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

Selecting atoms with Dipole Moment turned on causes crash #1806

Open
matterhorn103 opened this issue Nov 21, 2024 · 2 comments
Open

Selecting atoms with Dipole Moment turned on causes crash #1806

matterhorn103 opened this issue Nov 21, 2024 · 2 comments

Comments

@matterhorn103
Copy link
Contributor

matterhorn103 commented Nov 21, 2024

Avogadro version: (please complete the following information from the About box):

  • Avogadrolibs: 1.99.0-754-g9e353edf
  • Qt: 5.15.15 or 6.8.0
  • Format: Both the current Flatpak beta branch and compiled from source

Desktop version: (please complete the following information):

  • OS: Linux

Describe the bug
If the Dipole Moment display type is checked, click-and-drag with the Selection Tool results in a crash.

The accompanying terminal output is:

OBProcess::executeObabel: Running "/prefix/bin/obabel" "-icml -onul --partialcharge mmff94 --print"
...
OBProcess::executeObabel: Running "/prefix/bin/obabel" "-icml -onul --partialcharge mmff94 --print"
terminate called after throwing an instance of 'std::bad_array_new_length'
  what():  std::bad_array_new_length
fish: Job 1, '/prefix/bin/avogadro2' terminated by signal SIGABRT (Abort)

Note that the OBProcess line is printed many times (86 times in this case).

Selecting and deselecting individual atoms is ok, even when multiple are selected by repeated Ctrl+Click. Each individual click is accompanied by a printed OBProcess::executeObabel: Running "/prefix/bin/obabel" "-icml -onul --partialcharge mmff94 --print".

Presumably the dipole moment is being recalculated with every mouse action, even though using the Selection Tool in the view pane never results in a change in the dipole.

As an aside, the dipole is in contrast not currently being recalculated when the Manipulation Tool is used.

@ghutchis
Copy link
Member

I can try to put back the delay timer to minimize repeating calls to re-compute the dipole. It's currently called anytime it's re-rendering.

I'm not sure why it's not being re-calculated with the manipulation tool.

I'd also want to understand why there's a crash if you can run the debugging.

@ghutchis
Copy link
Member

I'm getting all kinds of weird crashes now. I pushed #1809 until I have time to figure out what's happening...

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