0

I'm doing a calculator app design. Uses Java, Python, JEP. After calling the code below, it gets EXCEPTION_ACCESS_VIOLATION. This error is caused by importing the scipy library. anyone know how to fix it?

 public void analyticalMethod() {
                try (Jep jep = new Jep() {}) {
                    jep.exec("""
                            import sympy
                            import scipy
                            x=sympy.Symbol('x')
                            def analytical(x):
                            \treturn\040""" + hiddenIntegral .getText() +
                            """
                            \nresult=scipy.integrate.quad(analytical,""" + lowerLimit + """
                            ,""" + upperLimit+ """
                            )
                            \nc=result[0]
                            """);

                     result.setText(String.valueOf(jep.getValue("c")));
                } catch (Exception e) {
                    System.out.println("EXCEPTION: " + e);
                }

        }

EXCEPTION_ACCESS_VIOLATION

Kola
  • 1
  • 1
  • 1
    Please don't screenshot exceptions, instead paste them in the question as text formatted as code. For assistance with these kinds of questions, you must provide a [mcve] so your problem can be replicated without change in somebody else's environment *with no change*. The example should provide links to all library versions (preferably a maven or gradle build file), and information about the JDK/JavaFX versions used. – jewelsea Oct 06 '22 at 21:58
  • 1
    It would seem that the issue is with invoking the scipy library you are using, and appears unrelated to JavaFX, if so, remove the JavaFX tag and in your minimal example provide a stand-alone program (e.g. class with a main method) that does not use JavaFX and exhibits the issue. Try asking on forums or support specifically for the library you are trying to integrate with (outside stack overflow). – jewelsea Oct 06 '22 at 22:00

0 Answers0