Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Java2DFrameConverter causes JVM crashes #2266

Open
lbz303 opened this issue Aug 7, 2024 · 1 comment
Open

Using Java2DFrameConverter causes JVM crashes #2266

lbz303 opened this issue Aug 7, 2024 · 1 comment

Comments

@lbz303
Copy link

lbz303 commented Aug 7, 2024

Currently, I am experiencing intermittent JVM crashes when using JavaCV to capture the first frame. I found similar issues reported in the issue tracker, with a suggestion to use PointerScope to resolve the problem. Despite adding the recommended code, the issue persists. Could you please advise on what might still be causing the problem?

log.info("5-----------");
if (frame.image == null) {
VideoHttpResult.ERROR_VIDEO_NO_PICTURE_EXISTS.appBizException();
}
log.info("6-----------");
BufferedImage image = null;
try(PointerScope pointerScope = new PointerScope()){
Java2DFrameConverter converter = new Java2DFrameConverter();
log.info("6.11111-----------");
image = converter.convert(frame);
}
log.info("7-----------");

08-07 15:11:51.643 [INFO ] [com.wxy.video.server.util.FFVideoUtil :232 ] [http-nio-8818-exec-20 ] - 4-----------
08-07 15:11:51.644 [INFO ] [com.wxy.video.server.util.FFVideoUtil :236 ] [http-nio-8818-exec-20 ] - 5-----------
08-07 15:11:51.644 [INFO ] [com.wxy.video.server.util.FFVideoUtil :240 ] [http-nio-8818-exec-20 ] - 6-----------
08-07 15:11:51.644 [INFO ] [com.wxy.video.server.util.FFVideoUtil :245 ] [http-nio-8818-exec-20 ] - 6.11111-----------

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007f681553bb65, pid=11, tid=188

JRE version: Java(TM) SE Runtime Environment (11.0.1+13) (build 11.0.1+13-LTS)

Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0.1+13-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)

Problematic frame:

J 22035 c2 org.bytedeco.javacv.Java2DFrameConverter.flipCopyWithGamma(Ljava/nio/ByteBuffer;IILjava/nio/ByteBuffer;IIZDZI)V (635 bytes) @ 0x00007f681553bb65 [0x00007f681553b7e0+0x0000000000000385]

Core dump will be written. Default location: /app/wxy-video-server/core.11

An error report file with more information is saved as:

/app/wxy-video-server/hs_err_pid11.log

Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

Aborted (core dumped)
/app/wxy-video-server/docker-start.sh: 17: [[: not found
Running in docker!

@saudet
Copy link
Member

saudet commented Aug 7, 2024

Please try to set the "org.bytedeco.javacpp.nopointergc" system property to "true".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants