"MATLAB is exiting because of fatal error" when invoked from compiled java library

46 views (last 30 days)
The .m file is a quite simple test, just invoke bwmorph, it works fine in matlab GUI:
function [outputFile] = matSkel(inputFile,method)
%MATSKEL Summary of this function goes here
% Detailed explanation goes here
clear img
img=imread(inputFile);
img=bwmorph(img,method,Inf);
imwrite(img,inputFile);
outputFile=inputFile;
end
Then compile into library jar with deploytool, if invoked in JVM, the error appears:
_ _ _java: <unknown>:0: <unknown>: Assertion `This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: linuxfb, minimal, offscreen, xcb.
Reinstalling the application may fix this problem.' failed.
------------------------------------------------------------------------
Assertion detected at Tue Oct 24 10:21:59 2017
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Current Graphics Driver: Unknown hardware
Current Visual : 0x21 (class 4, depth 24)
Default Encoding : UTF-8
Deployed : true
GNU C Library : 2.23 stable
Host Name : cs-VirtualBox
MATLAB Architecture : glnxa64
MATLAB Entitlement ID: Unknown
MATLAB Root : /usr/local/MATLAB/R2017b
MATLAB Version : 9.3.0.713579 (R2017b)
OpenGL : hardware
Operating System : Linux 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64
Processor ID : x86 Family 6 Model 60 Stepping 3, GenuineIntel
Virtual Machine : Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : The X.Org Foundation (11903000), display :0
Fault Count: 1
Assertion:
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: linuxfb, minimal, offscreen, xcb.
Reinstalling the application may fix this problem.
Register State (captured):
RAX = 00007f50943eddb0 RBX = 00007f511b8d1358
RCX = 000000000000ff0a RDX = 00007f511b8b2360
RSP = 00007f506b612890 RBP = 00007f506b612c50
RSI = 00007f511b6747d6 RDI = 00007f506b6128a0
R8 = 000000000000fcff R9 = 0000000000000000
R10 = 0000700000000073 R11 = 00007f5000000020
R12 = 00007f506b6130e0 R13 = 00007f506b612c70
R14 = 0000000000000000 R15 = 00007f511b8c12c8
RIP = 00007f511b5e8afe EFL = 00007f5094447b50
CS = 8000 FS = 9444 GS = 7f50
Stack Trace (captured):
[ 0] 0x00007f511b5e2f33 bin/glnxa64/libmwfl.so+00884531
[ 1] 0x00007f511b5e2f8c bin/glnxa64/libmwfl.so+00884620 _ZN10foundation4core4diag15stacktrace_base7captureEm+00000028
[ 2] 0x00007f511b5e4e8c bin/glnxa64/libmwfl.so+00892556
[ 3] 0x00007f511b5e63b4 bin/glnxa64/libmwfl.so+00897972
[ 4] 0x00007f511b5e6442 bin/glnxa64/libmwfl.so+00898114
[ 5] 0x00007f507a743da6 bin/glnxa64/libmwglee.so+01244582
[ 6] 0x00007f5078d49671 /usr/local/MATLAB/R2017b/bin/glnxa64/libQt5Core.so.5+00628337
[ 7] 0x00007f5078d4aff6 /usr/local/MATLAB/R2017b/bin/glnxa64/libQt5Core.so.5+00634870 _ZNK14QMessageLogger5fatalEPKcz+00000150
[ 8] 0x00007f50785d3f0b /usr/local/MATLAB/R2017b/bin/glnxa64/libQt5Gui.so.5+01023755 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv+00005211
[ 9] 0x00007f50785d3f4d /usr/local/MATLAB/R2017b/bin/glnxa64/libQt5Gui.so.5+01023821 _ZN22QGuiApplicationPrivate21createEventDispatcherEv+00000045
[ 10] 0x00007f5078f3f9ec /usr/local/MATLAB/R2017b/bin/glnxa64/libQt5Core.so.5+02685420 _ZN23QCoreApplicationPrivate4initEv+00001148
[ 11] 0x00007f50785d544c /usr/local/MATLAB/R2017b/bin/glnxa64/libQt5Gui.so.5+01029196 _ZN22QGuiApplicationPrivate4initEv+00000028
[ 12] 0x00007f5077dd2709 /usr/local/MATLAB/R2017b/bin/glnxa64/libQt5Widgets.so.5+01500937 _ZN19QApplicationPrivate4initEv+00000009
[ 13] 0x00007f507a744571 bin/glnxa64/libmwglee.so+01246577
[ 14] 0x00007f507a7ba764 bin/glnxa64/libmwglee.so+01730404
[ 15] 0x00007f511bba47a0 /usr/local/MATLAB/R2017b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6+00767904
[ 16] 0x00007f513c2716ba /lib/x86_64-linux-gnu/libpthread.so.0+00030394
[ 17] 0x00007f513bb8d3dd /lib/x86_64-linux-gnu/libc.so.6+01078237 clone+00000109
[ 18] 0x0000000000000000 <unknown-module>+00000000
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.** This crash report has been saved to disk as /home/cs/matlab_crash_dump.3276-1 **
MATLAB is exiting because of fatal error___
the crash dump file is also attached.
  2 Comments
Mao Cai
Mao Cai on 24 Oct 2017
No matter I use libc.so.6 in matlab (under /usr/local/MATLAB/R2017b/sys/os/glnxa64 directory) and use the OS shipped version, the error is same.
Thanks in advance for any hints!
Mao Cai
Mao Cai on 30 Oct 2017
I have just verified the windows edition of Matlab 2017b. It seem to have the similar problem:
Console output and crash file also attached.
.m file is even simpler:
function matSkelFix()
img=imread('H:\image\skel.bmp');
img=bwmorph(img,'skel',Inf);
imwrite(img,'H:\image\skel.s.bmp');
end

Sign in to comment.

Answers (1)

Nate
Nate on 26 Oct 2017
It seems that a library is missing for the display of some graphic components. The easiest way to verify that this is not an incomplete installation problem is to reinstall MATLAB to see if the problem still occurs.
  6 Comments

Sign in to comment.

Categories

Find more on 启动和关闭 in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!