Why do I receive "R6025 - pure virtual function call" when attempting to call an abstract Java method in MATLAB 7.4 (R2007a)?

9 次查看(过去 30 天)
I am trying to call an abstract Java method --- one that has not been implemented, as shown by METHODS output:
factory = javax.xml.parsers.DocumentBuilderFactory.newInstance
methods('-full', factory)
abstract boolean getFeature(java.lang.String) throws javax.xml.parsers.ParserConfigurationException % Inherited from javax.xml.parsers.DocumentBuilderFactory
When I attempt to call this method:
factory = javax.xml.parsers.DocumentBuilderFactory.newInstance
factory.getFeature('fred')
I receive a dialog box with the following message:
Title: Microsoft Visual C++ Runtime Library
Icon: white X in red circle
Message:
Runtime Error!
Program: C:\MATLAB_R2007A\bin\win32\MATLAB.exe
R6025
- pure virtual function call
After that MATLAB exits.
Alternatively, if the setFeature() method is call, no error dialog box is displayed.
factory.setFeature('<http://apache.org/xml/features/validation/schema',true>)
Instead MATLAB crashes silenty and produces a java log file with a stack trace similar to this
j java.lang.Throwable.<init>()V+10
j java.lang.Error.<init>()V+1
j java.lang.LinkageError.<init>()V+1
j java.lang.IncompatibleClassChangeError.<init>()V+1
j java.lang.AbstractMethodError.<init>()V+1
v ~StubRoutines::call_stub

采纳的回答

MathWorks Support Team
This is the expected functionality from the MATLAB Java interface.
To work around this behavior, resolve the bug in the underlying class.
In the example above, this would mean implementing the getFeature() method.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call Java from MATLAB 的更多信息

标签

尚未输入任何标签。

产品


版本

R2007a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by