【发布时间】:2015-05-12 23:50:27
【问题描述】:
我一直在从事一个视觉项目,并使用 JNI 编写的一些 Java 中的 C++ 库。
操作系统:Ubuntu 12.04
在我的项目中,我使用boost 库来生成随机数。但有时我会遇到如下异常:
Core dum140002367330048 also had an error]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f54f72a615a, pid=11979, tid=140002352568064
#
# JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libCBIR.so+0x3215a] boost::random::mersenne_twister_engine<unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u>::operator()()+0x3a
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
当我在 StackOverflow 上搜索这个时,我发现了一些与 IDE (Eclipse) 相关的问题。该应用程序独立于 IDE。因此,解决方案也必须独立于 IDE。有什么想法吗?
【问题讨论】:
-
您尝试
ulimit -c unlimited,如错误消息所示? -
尝试在 Ubuntu 中启用核心转储 - ubuntuforums.org/showthread.php?t=1494590
-
我尝试过这样并再次运行应用程序:su - ; ulimit -c 无限; ulimit -a;我再写一次
-
问题解决了!感谢您的回复:)
-
@OmurhanSoysal 你能写出完整的答案吗?我没能做到。
标签: java c++ eclipse opencv boost