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

Layer-crash using latest Avogadro #800

Closed
ghutchis opened this issue Sep 28, 2021 · 1 comment · Fixed by #806
Closed

Layer-crash using latest Avogadro #800

ghutchis opened this issue Sep 28, 2021 · 1 comment · Fixed by #806

Comments

@ghutchis
Copy link
Member

I haven't fully figured this one out, but there's a crash with a variety of code that "replaces" the current molecule. For example, some of the Python commands, but the easiest is:

  • draw something
  • File => Import => Crystal
  • (crash)
bool PluginLayerManager::isActiveLayerEnabled() const
{
  if (m_activeMolecule == nullptr ||
      m_molToInfo[m_activeMolecule]->enable.find(m_name) ==
        m_molToInfo[m_activeMolecule]->enable.end()) {
    return false;
  }

It seems like m_molToInfo[m_activeMolecule] == nullptr. I think the problem is that the new molecule is assigned / uses the copy constructor but that replaces all layer information.

ghutchis added a commit to ghutchis/avogadrolibs that referenced this issue Oct 5, 2021
Not sure if this is the perfect solution, but it fixes OpenChemistry#800
Might also fix OpenChemistry#752

Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2021

Here are the build results
Avogadro2.AppImage
macOS.dmg
Ubuntu-2004.tar.gz
Win64.exe
Artifacts will only be retained for 90 days.

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

Successfully merging a pull request may close this issue.

1 participant