Code Monkey home page Code Monkey logo

Comments (11)

ddsneo4j avatar ddsneo4j commented on September 24, 2024

Thanks, Greg for having transferred this issue to the right place. I was told by Knime support that they also approched you regarding this issue a couple of months ago. Hopefully, this can be fixed soon as crashing Knime blocks my current work.

Thanks,
Dan

from knime-rdkit.

ddsneo4j avatar ddsneo4j commented on September 24, 2024

Any update on this issue?

Thanks,
Dan

from knime-rdkit.

greglandrum avatar greglandrum commented on September 24, 2024

@manuelschwarze : I can reproduce this in KNIME on Windows, but it looks like the problem is not coming from the underlying C++ code. I'm able to read in the example molecule and generate SMILES from Python without problems.
I'm travelling and don't have an eclipse environment installed, could you please take a look at this and figure out which call is causing the crash from within the KNIME nodes?

from knime-rdkit.

greglandrum avatar greglandrum commented on September 24, 2024

@manuelschwarze I did an experiment where I try loading that molecule using the RDKit java wrappers in a java snippet node (workflow attached) and can reproduce the crash there. So, unfortunately for me, it looks like we can blame the RDKit backend (or at least the java wrappers) for this. I will see if I can figure it out.
Github107_simplified.zip

If you have time, it would be interesting to know whether or not you can execute the "This is the one that crashes" Java snippet node on your windows dev env.

from knime-rdkit.

manuelschwarze avatar manuelschwarze commented on September 24, 2024

@greglandrum I ran it with KNIME 4.3 on my Windows 10 system, and it crashed as expected. I also had reproduced the crash before already. Only native code integrated into Java can bring Java immediately down, like RDKit or a gtk issue on Linux. I hope you find the culprit in RDKit or related to Java wrappers (again it would be something native code specific in that case). Thanks for taking the time!

from knime-rdkit.

manuelschwarze avatar manuelschwarze commented on September 24, 2024

@greglandrum Your Java Snippet node had two call. Only the second is actually crashing KNIME: mol.MolToSmiles()
I tried to run it with all combinations of 2 boolean parameters mol.MolToSmiles(bool, bool), and for all of them it fails as well. Maybe it help as a hint. Not much, though...

from knime-rdkit.

greglandrum avatar greglandrum commented on September 24, 2024

Yeah, sorry, I had done that test too

from knime-rdkit.

greglandrum avatar greglandrum commented on September 24, 2024

@ddsneo4j @manuelschwarze after a bunch of poking around and testing, I believe that I have found the problem, which is a JVM problem, and a fix.
To "fix" the problem: edit your knime.ini file and add this line somewhere:

-Xss1024m

Here's what's going on:
When the RDKit generates SMILES it calls a function which recurses over all of the atoms in the molecule (worst case, if the molecule has either no rings or very few rings). This type of deep recursion requires a lot of stack space and it seems like the default stack size for the JVM on Windows is small enough that the recursion on this molecule exhausts the available stack space. The solution is to increase the stack size for the JVM used in KNIME (which is what the line above does).

from knime-rdkit.

ddsneo4j avatar ddsneo4j commented on September 24, 2024

Thanks, Greg. I have made the requested addition to the knime.ini file and started my workflow.
I'll give you an update about the outcome next week.

Thanks and best regards,
Dan

from knime-rdkit.

ddsneo4j avatar ddsneo4j commented on September 24, 2024

Hi,
I can confirm that the workflow ran to completion, i.e. no crashing anymore.
Thanks a lot!

Best,
Dan

from knime-rdkit.

greglandrum avatar greglandrum commented on September 24, 2024

Hi, I can confirm that the workflow ran to completion, i.e. no crashing anymore. Thanks a lot!

Glad to hear it!

from knime-rdkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.