使用Java程序中的Matlab Javabuilder应用程序进行分段冲突

时间:2015-04-26 18:48:22

标签: java matlab segmentation-fault matlab-compiler qt-jambi

我在QTJambi中创建了一个GUI,当按下按钮时,它会运行Matlab代码。一切运行正常,输出是从Matlab代码接收的,但是当我关闭GUI的窗口时,我得到了一个分段违规,如下所示:

------------------------------------------------------------------------
       Segmentation violation detected at Sun Apr 26 19:21:03 2015
------------------------------------------------------------------------

Configuration:
  Crash Decoding     : Disabled
  Current Visual     : 0x23 (class 4, depth 24)
  Default Encoding   : UTF-8
  GNU C Library      : 2.19 stable
  MATLAB Architecture: glnxa64
  MATLAB Root        : /usr/local/MATLAB/MATLAB_Compiler_Runtime/v83
  MATLAB Version     : 8.3.0.532 (R2014a)
  Operating System   : Linux 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64
  Processor ID       : x86 Family 31 Model 4 Stepping 3, AuthenticAMD
  Virtual Machine    : Java 1.7.0_79-b14 with Oracle Corporation OpenJDK 64-Bit Server VM mixed mode
  Window System      : The X.Org Foundation (11501000), display :0.0

Fault Count: 1


Abnormal termination:
Segmentation violation

Register State (from fault):
  RAX = 00007fa7adc2f410  RBX = 0000000000000000
  RCX = 00007fa7a8365ae0  RDX = 0000000000000000
  RSP = 00007fa7ae80f300  RBP = 00007fa7a83458d0
  RSI = 0000000000000000  RDI = 00620069006c68a0

   R8 = 00007fa7a833f500   R9 = 00007fa7a8364330
  R10 = 00007fa7ae80f130  R11 = 0000000000000000
  R12 = 0000000000000080  R13 = 0000000000000008
  R14 = 00007fa79bffbfb8  R15 = 0000000000000001

  RIP = 00007fa7adc2f414  EFL = 0000000000010206

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007fa7adc2f414              /lib/x86_64-linux-gnu/libpthread.so.0+00042004 pthread_mutex_lock+00000004
[  1] 0x00007fa799a9e2c7              /usr/lib/x86_64-linux-gnu/libX11.so.6+00279239 XrmDestroyDatabase+00000039
[  2] 0x00007fa799a867b3              /usr/lib/x86_64-linux-gnu/libX11.so.6+00182195 _XFreeDisplayStructure+00001123
[  3] 0x00007fa799a744ef              /usr/lib/x86_64-linux-gnu/libX11.so.6+00107759 XCloseDisplay+00000223
[  4] 0x00007fa79b580d6e        /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+02309486
[  5] 0x00007fa79b517d66        /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+01879398 _ZN12QApplicationD1Ev+00001158
[  6] 0x00007fa7938bdb57            /usr/lib/jni/libcom_trolltech_qt_gui.so+05557079 _ZN25QtJambiShell_QApplicationD0Ev+00000023
[  7] 0x00007fa7a0eaac58       /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+01662040 _ZN7QObject5eventEP6QEvent+00000648
[  8] 0x00007fa79b51bed3        /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+01896147 _ZN12QApplication5eventEP6QEvent+00000067
[  9] 0x00007fa79b516e2c        /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+01875500 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+00000140
[ 10] 0x00007fa79b51d4a0        /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6+01901728 _ZN12QApplication6notifyEP7QObjectP6QEvent+00000624
[ 11] 0x00007fa7a0e924dd       /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+01561821 _ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+00000109
[ 12] 0x00007fa7a0e95b3d       /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+01575741 _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+00000493
[ 13] 0x00007fa7a0e96bb0       /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6+01579952 _ZN16QCoreApplication4execEv+00000192
[ 14] 0x00007fa7a418d7f8                                   <unknown-module>+00000000
[ 15] 0x00007fa7a41811d4                                   <unknown-module>+00000000
[ 16] 0x00007fa7a417b4e7                                   <unknown-module>+00000000
[ 17] 0x00007fa7ad1f1099 /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so+06193305
[ 18] 0x00007fa7ad1f0b38 /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so+06191928
[ 19] 0x00007fa7ad1ffc6b /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so+06253675
[ 20] 0x00007fa7ad210ed8 /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so+06323928
[ 21] 0x00007fa7ae40f1f9 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/../lib/amd64/jli/libjli.so+00012793
[ 22] 0x00007fa7adc2d182              /lib/x86_64-linux-gnu/libpthread.so.0+00033154
[ 23] 0x00007fa7ae14147d                    /lib/x86_64-linux-gnu/libc.so.6+01025149 clone+00000109


If this problem is reproducible, please submit a Service Request via:
    http://www.mathworks.com/support/contact_us/

A technical support engineer might contact you with further information.

Thank you for your help.

1 个答案:

答案 0 :(得分:0)

http://uk.mathworks.com/matlabcentral/answers/100053-why-does-jboss-7-1-throw-a-segmentation-violation-when-trying-to-call-a-matlab-builder-ja-2-2-4-r20

在QTJambi初始化程序之前,我在程序的主要功能中添加了MWApplication.initialize(MWMCROption.NOJVM);