cheminfo / nmrium

React component to display and process nuclear magnetic resonance (NMR) spectra.
https://docs.nmrium.org
MIT License
55 stars 25 forks source link

Crash with large molecules #3134

Closed lpatiny closed 1 month ago

lpatiny commented 1 month ago

Some users have very large molecules, and currently, if we have more than 250 heavy atoms, we throw an error in order to prevent the program from becoming unresponsive.

This is okay as long as the error is caught and a simple error message is displayed to the end user.

Currently this error is not cached everywhere and leads to application crash with lost of all the work in progress.

In order to repeat one of the cases just drag / drop this molfile.

large.mol.zip

and then try to make auto range picking. We get a crash

2024-07-18 13 46 02

This could happen from various places in NMRium so it should be catched everywhere.

hamed-musallam commented 1 month ago

We have the same issue with react-ocl-nmr when the mouse hovers over the atom

image

lpatiny commented 1 month ago

@hamed-musallam Could you check if the bug is still there ? Normally the library should return undefined and not throw but you can still send a logger to get the information about too large molecules.

hamed-musallam commented 1 month ago

@lpatiny it works well image