Directshow + JNI 1.2( NewDirectByteBuffer ) + JMF = Fatal Error Screen
Hi,
I have a stream in directshow with a SampleGrabberFilter for the video and another for the audio. I'm using the code of https://jmds.dev.java.net/ for implementing the layer directchow.
After, I'm trying to create a datasource for JMF with the example "Generating Live Audio/Video Data [Custom DataSource]"
(http://java.sun.com/products/java-media/jmf/2.1.1/solutions/LiveData.html)
But I cannot transfer the buffer in SampleGrabberFilter through JNI 1.2. and I don't find a good example for helping me.
Could you help me ?
Karima
Here a part of my code :
public class LiveStream implements PushBufferStream {
public void read(Buffer _buffer) throws IOException { /////////////////////// Fatal Error Screen !!! Here...
Object data = _buffer.getData();
int length = ((VideoFormat) myFormat).getMaxDataLength();
ByteBuffer newdata = createAndfillByteBuffer(length);
buffer.setData(newdata);
_buffer.setOffset(0);
_buffer.setFormat(myFormat);
_buffer.setLength(newdata.limit());
_buffer.setTimeStamp(Buffer.TIME_UNKNOWN);
_buffer.notifyAll();
public void setTransferHandler(BufferTransferHandler _transferHandler) {
myTransferHandler = _transferHandler;
private class CaptureRunnable implements Runnable {
public void run() {
start0();
// notify sleepers that we're done starting up
synchronized (myRestartLock) {
myRestartLock.notifyAll();
// chill until there is data in the buffer
while (!myStopRequested && getBufferSize() == 0) {
try {
Thread.sleep(100);
}catch (Throwable t) {
t.printStackTrace();
// grab frames as fast as possible
while (!myStopRequested) {
if (myTransferHandler != null) {
myTransferHandler.transferData(LiveStream.this);
else {
// if there's no transfer handler, just wait for a bit and try again
try {
Thread.sleep(100);
}catch (Throwable t) {}
// This sleep is here because there is the
// potential that you can starve your PC
// while polling the capture card for video.
try {
Thread.sleep(20);
}catch (Throwable t) {}
stop0();
// notify waiters that we're done stopping the thread
synchronized (myRestartLock) {
myStarted = false;
myRestartLock.notify();
private native void start0(); // Run the Graph in directshow
private native void stop0(); //stop the Graph in directshow
private native ByteBuffer createAndfillByteBuffer(int capacity);
///////////////////// C
long MAX_BufferVideo = 1024;
BYTE * tabBufferVideo;
JNIEXPORT jobject JNICALL Java_com_mycompagny_media_protocol_Camera_LiveStream_createAndfillByteBuffer
(JNIEnv * pEnv, jobject jLiveStream, jint jcapacity){
HRESULT hr;
long MaxBuffer = MAX_BufferVideo;
long cbBufferLength = -1;
hr = g_pSampleGrabberVideo->GetCurrentBuffer(&cbBufferLength, NULL);
if (hr != VFW_E_WRONG_STATE) {
CheckForFailure(pEnv, "Failed to get buffer size.", hr);
long jLength = (long) jcapacity ;//pEnv->GetDirectBufferCapacity(jByteBuffer);
if (jLength < MaxBuffer){
MaxBuffer = jLength;
if (cbBufferLength < MaxBuffer) {
MaxBuffer = cbBufferLength;
HRESULT hrInitialize = CoInitialize(NULL);
CheckForFailure(pEnv, "CoInitialize Failed.", hrInitialize);
g_pSampleGrabberVideo->GetCurrentBuffer(&MaxBuffer,(long *)tabBufferVideo);
CheckForFailure(pEnv, "Failed to fill buffer.", hr);
if (hrInitialize == S_OK) {
CoUninitialize();
return pEnv->NewDirectByteBuffer(tabBufferVideo,MaxBuffer);
return NULL;
}
1. Did you call g_pSampleGrabberVideo->SetBufferSamples( TRUE ) on the sample grabber?
long MAX_BufferVideo = 1024;
// global variableBYTE * tabBufferVideo; // global variable
2. Where are you allocating the memory for BYTE* tabBufferVideo?
JNIEXPORT void JNICALL Java_mycompany_LiveStream_connect(JNIEnv * pEnv, jobject jDataSource){
...// add filters
CComPtr<ISampleGrabber> pSampleGrabberVideo = NULL;
hr = pGrabberVideo->QueryInterface(IID_ISampleGrabber, (void**)&pSampleGrabberVideo);
CheckForFailure(pEnv, "Failed to retrieve sample grabber Video interface.", hr);
hr = pSampleGrabberVideo->SetBufferSamples(TRUE);
CheckForFailure(pEnv, "Failed to turn on buffering on sample grabber Video.", hr);
... //connect filters
if(tabBufferVideo == NULL)
if (!(tabBufferVideo = (BYTE *)malloc(MAX_BufferVideo))) {
FailWithException(pEnv, "Cannot create the buffer Video ", E_FAIL);
Similar Messages
-
JNI - make dll (fatal error LNK1181)
I make a simple jni program ( it just print "Hello World" )
but, when I compile this program I got a LINK error
D:\JavaProjects\HW>cl -I c:\java\jdk1.3.1_01\include -I c:\java\jdk1.3.1_01\incl
ude\win32 -I c:\java\jdk1.3.1_01\cinclude -LD helloworldimp.c -Fe hello.dll
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
Command line warning D4024 : unrecognized source file type 'hello.dll', object f
ile assumed
helloworldimp.c
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/dll
/implib:helloworldimp.lib
/out:helloworldimp.dll
helloworldimp.obj
hello.dll
LINK : fatal error LNK1181: cannot open input file "hello.dll"
anyone knows this error? then, plz help me
thanxusing VC++6.0?
I got the same problem when trying out the tutorial, check MSDN library on this error, in the C++ source code, you should change all pointers refering to java to how MSDN tells you is microsoft standard, the tutorial c code, maybe works correctly with other compilers or older versions of VC++ compilers.
unfortunatly I lost my source code, only having the .dll file left otherwise I could show you -
FATAL ERROR in native method: Non-array passed to JNI array operations
After stepping up to JDK 1.4.2 we started getting a hotspot error, I added -Xcheck:jni and it yielded the above error which was not existent in JDK 1.4.1 and for the life of me I cannot find out whats wrong:
Native method dec:
private native byte[] cost(final byte[] byte_array,
final double minCostPerMeter,
final int costFuncSelection,
final double maxCostThreshold);
Method call:
ByteArrayInputStream
inputByteStream = new ByteArrayInputStream(
cost(output_byte_stream.toByteArray(),
minCostPerMeter,
costFunctionSelection.length,
maxCostThreshold));
An array is being passed I have no idea why it is complaing about the method call.
Any help would be appreciated.
-RWhat happens if you remove all the code from the JNI method - so it just calls and then returns?
If it still occurs then I would expect that you have a memory problem in a piece of code before this one. Such problems can have no impact when run in one environment but cause failures in another becomes some other legitimate piece of data moved.
If it doesn't then I would expect that the problem is in the method itself and not the call.
It could be some odd VM problem so trying a different version of 1.4.2 might help (but in of itself would not eliminate the possibility that you have a memory problem.) -
Fatal Error in JRE 6.0_24-b07
I have found others facing a similar problem and yet mine is different and I'll be thankful if somebody could point to the possible source of this error and how to fix/diagnose it. I am running a Nutch crawler, writing to a Solr index on an EC2 instance with JRE version 6.0_24-b07 (though I have tried it with other versions as well). The crawler works fine on my local machine but very often the instance gets stuck and eventually creates an error file with contents similar to the following:
# A fatal error has been detected by the Java Runtime Environment:
# Internal Error (safepoint.cpp:247), pid=16632, tid=140208175748864
# guarantee(PageArmed == 0) failed: invariant
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode linux-amd64 compressed oops)
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
--------------- T H R E A D ---------------
Current thread (0x0000000040e30000): VMThread [stack: 0x00007f84c2729000,0x00007f84c282a000] [id=16636]
Stack: [0x00007f84c2729000,0x00007f84c282a000], sp=0x00007f84c2828a80, free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x790f75]
V [libjvm.so+0x324f06]
V [libjvm.so+0x6b3ed6]
V [libjvm.so+0x79f2a7]
V [libjvm.so+0x79edbe]
V [libjvm.so+0x64314f]
VM_Operation (0x00007f84c072fb80): RevokeBias, mode: safepoint, requested by thread 0x0000000041d03000
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0000000041a41000 JavaThread "FetcherThread" daemon [_thread_new, id=18355, stack(0x0000000000000000,0x0000000000000000)]
0x0000000041305800 JavaThread "FetcherThread" daemon [_thread_blocked, id=18354, stack(0x00007f84c032d000,0x00007f84c042e000)]
0x00000000411f1000 JavaThread "FetcherThread" daemon [_thread_blocked, id=18353, stack(0x00007f84c052f000,0x00007f84c0630000)]
0x00000000414b5000 JavaThread "FetcherThread" daemon [_thread_blocked, id=18352, stack(0x00007f84bbbfc000,0x00007f84bbcfd000)]
0x0000000041645800 JavaThread "FetcherThread" daemon [_thread_blocked, id=18351, stack(0x00007f84bb3f4000,0x00007f84bb4f5000)]
0x0000000041304800 JavaThread "FetcherThread" daemon [_thread_blocked, id=18350, stack(0x00007f84c002a000,0x00007f84c012b000)]
0x0000000041d03000 JavaThread "QueueFeeder" daemon [_thread_blocked, id=18349, stack(0x00007f84c0630000,0x00007f84c0731000)]
0x0000000041a1d000 JavaThread "SpillThread" daemon [_thread_blocked, id=18348, stack(0x00007f84c0d4c000,0x00007f84c0e4d000)]
0x000000004118a800 JavaThread "communication thread" daemon [_thread_blocked, id=18347, stack(0x00007f84c0a40000,0x00007f84c0b41000)]
0x00007f84bc4ea800 JavaThread "Thread-1105" [_thread_in_vm, id=18346, stack(0x00007f84c093f000,0x00007f84c0a40000)]
0x000000004195d800 JavaThread "pool-2-thread-1" [_thread_blocked, id=16654, stack(0x00007f84c0c4b000,0x00007f84c0d4c000)]
0x00007f84bc029800 JavaThread "ajp-bio-9009-AsyncTimeout" daemon [_thread_blocked, id=16652, stack(0x00007f84c0f45000,0x00007f84c1046000)]
0x00007f84bc28b000 JavaThread "ajp-bio-9009-Acceptor-0" daemon [_thread_in_native, id=16651, stack(0x00007f84c1046000,0x00007f84c1147000)]
0x00007f84bc005000 JavaThread "http-bio-9000-AsyncTimeout" daemon [_thread_blocked, id=16650, stack(0x00007f84c198d000,0x00007f84c1a8e000)]
0x00007f84bc061000 JavaThread "http-bio-9000-Acceptor-0" daemon [_thread_in_native, id=16649, stack(0x00007f84c1147000,0x00007f84c1248000)]
0x00007f84bc325000 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=16648, stack(0x00007f84c1b55000,0x00007f84c1c56000)]
0x00007f84bc328000 JavaThread "timerFactory" [_thread_blocked, id=16647, stack(0x00007f84c1248000,0x00007f84c1349000)]
0x00000000410c2000 JavaThread "GC Daemon" daemon [_thread_blocked, id=16644, stack(0x00007f84c1dd8000,0x00007f84c1ed9000)]
0x0000000040e64800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=16642, stack(0x00007f84c2123000,0x00007f84c2224000)]
0x0000000040e5f800 JavaThread "CompilerThread1" daemon [_thread_blocked, id=16641, stack(0x00007f84c2224000,0x00007f84c2325000)]
0x0000000040e5c800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=16640, stack(0x00007f84c2325000,0x00007f84c2426000)]
0x0000000040e5a800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=16639, stack(0x00007f84c2426000,0x00007f84c2527000)]
0x0000000040e38800 JavaThread "Finalizer" daemon [_thread_blocked, id=16638, stack(0x00007f84c2527000,0x00007f84c2628000)]
0x0000000040e36800 JavaThread "Reference Handler" daemon [_thread_blocked, id=16637, stack(0x00007f84c2628000,0x00007f84c2729000)]
0x0000000040dd6800 JavaThread "main" [_thread_in_native, id=16633, stack(0x00007f84c7458000,0x00007f84c7559000)]
Other Threads:
=>0x0000000040e30000 VMThread [stack: 0x00007f84c2729000,0x00007f84c282a000] [id=16636]
0x0000000040e6f000 WatcherThread [stack: 0x00007f84c2022000,0x00007f84c2123000] [id=16643]
VM state:synchronizing (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x0000000040dd31a0] Safepoint_lock - owner thread: 0x0000000040e30000
[0x0000000040dd3220] Threads_lock - owner thread: 0x0000000040e30000
Heap
PSYoungGen total 647744K, used 599873K [0x00000000d7f60000, 0x00000000ffee0000, 0x0000000100000000)
eden space 641792K, 93% used [0x00000000d7f60000,0x00000000fc8e0700,0x00000000ff220000)
from space 5952K, 5% used [0x00000000ff910000,0x00000000ff960000,0x00000000ffee0000)
to space 6528K, 0% used [0x00000000ff220000,0x00000000ff220000,0x00000000ff880000)
PSOldGen total 224704K, used 113284K [0x0000000087e00000, 0x0000000095970000, 0x00000000d7f60000)
object space 224704K, 50% used [0x0000000087e00000,0x000000008eca10e8,0x0000000095970000)
PSPermGen total 66176K, used 36389K [0x0000000082c00000, 0x0000000086ca0000, 0x0000000087e00000)
object space 66176K, 54% used [0x0000000082c00000,0x0000000084f894b0,0x0000000086ca0000)
Dynamic libraries:
40000000-40009000 r-xp 00000000 08:01 25426 /usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin/java
40108000-4010a000 rwxp 00008000 08:01 25426 /usr/lib/jvm/java-6-sun-1.6.0.24/jre/bin/java
40dcd000-43d79000 rwxp 00000000 00:00 0 [heap]
82c00000-86ca0000 rwxp 00000000 00:00 0
86ca0000-86db0000 ---p 00000000 00:00 0
86db0000-87e00000 rwxp 00000000 00:00 0
87e00000-95970000 rwxp 00000000 00:00 0
95970000-d7f60000 ---p 00000000 00:00 0
d7f60000-ffee0000 rwxp 00000000 00:00 0
ffee0000-100000000 ---p 00000000 00:00 0
7f84bb17b000-7f84bb1b8000 r-xs 0024f000 08:10 24445502 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/xmlbeans-2.3.0.jar
7f84bb1b8000-7f84bb1bf000 r-xs 00049000 08:10 24445501 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/tika-parsers-0.9.jar
7f84bb1bf000-7f84bb1c0000 r-xs 00015000 08:10 24445500 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/tagsoup-1.2.jar
7f84bb1c0000-7f84bb1c2000 r-xs 00004000 08:10 24445499 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/slf4j-api-1.5.6.jar
7f84bb1c2000-7f84bb1c6000 r-xs 0002f000 08:10 24445498 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/rome-0.9.jar
7f84bb1c6000-7f84bb1d3000 r-xs 000c1000 08:10 24445497 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/poi-scratchpad-3.7.jar
7f84bb1d3000-7f84bb252000 r-xs 0034a000 08:10 24445496 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/poi-ooxml-schemas-3.7.jar
7f84bb252000-7f84bb259000 r-xs 00073000 08:10 24445495 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/poi-ooxml-3.7.jar
7f84bb259000-7f84bb276000 r-xs 0017c000 08:10 24445494 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/poi-3.7.jar
7f84bb276000-7f84bb28a000 r-xs 00339000 08:10 24445492 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/pdfbox-1.4.0.jar
7f84bb28a000-7f84bb2bb000 r-xs 003f0000 08:10 24445490 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/netcdf-4.2-min.jar
7f84bb2bb000-7f84bb2be000 r-xs 00014000 08:10 24445489 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/metadata-extractor-2.4.0-beta-1.jar
7f84bb2be000-7f84bb2c0000 r-xs 0000b000 08:10 24445488 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/jempbox-1.4.0.jar
7f84bb2c0000-7f84bb2c3000 r-xs 00023000 08:10 24445487 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/jdom-1.0.jar
7f84bb2c3000-7f84bb2c5000 r-xs 00006000 08:10 24445486 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/geronimo-stax-api_1.0_spec-1.0.1.jar
7f84bb2c5000-7f84bb2c9000 r-xs 00027000 08:10 24445485 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/fontbox-1.4.0.jar
7f84bb2c9000-7f84bb2ce000 r-xs 00048000 08:10 24445484 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/dom4j-1.6.1.jar
7f84bb2ce000-7f84bb2f3000 r-xs 00172000 08:10 24445478 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/bcprov-jdk15-1.45.jar
7f84bb2f3000-7f84bb2f6000 ---p 00000000 00:00 0
7f84bb2f6000-7f84bb3f4000 rwxp 00000000 00:00 0
7f84bb3f4000-7f84bb3f7000 ---p 00000000 00:00 0
7f84bb3f7000-7f84bb4f5000 rwxp 00000000 00:00 0
7f84bb4f5000-7f84bb4f8000 ---p 00000000 00:00 0
7f84bb4f8000-7f84bb5f6000 rwxp 00000000 00:00 0
7f84bb5f6000-7f84bb5f9000 ---p 00000000 00:00 0
7f84bb5f9000-7f84bb6f7000 rwxp 00000000 00:00 0
7f84bb6f7000-7f84bb6fa000 ---p 00000000 00:00 0
7f84bb6fa000-7f84bb7f8000 rwxp 00000000 00:00 0
7f84bb7f8000-7f84bb7fb000 ---p 00000000 00:00 0
7f84bb7fb000-7f84bb8f9000 rwxp 00000000 00:00 0
7f84bb8f9000-7f84bb8fc000 ---p 00000000 00:00 0
7f84bb8fc000-7f84bb9fa000 rwxp 00000000 00:00 0
7f84bb9fa000-7f84bb9fd000 ---p 00000000 00:00 0
7f84bb9fd000-7f84bbafb000 rwxp 00000000 00:00 0
7f84bbafb000-7f84bbafe000 ---p 00000000 00:00 0
7f84bbafe000-7f84bbbfc000 rwxp 00000000 00:00 0
7f84bbbfc000-7f84bbbff000 ---p 00000000 00:00 0
7f84bbbff000-7f84bbcfd000 rwxp 00000000 00:00 0
7f84bbcfd000-7f84bbd00000 ---p 00000000 00:00 0
7f84bbd00000-7f84bbdfe000 rwxp 00000000 00:00 0
7f84bbdfe000-7f84bbe01000 ---p 00000000 00:00 0
7f84bbe01000-7f84bbeff000 rwxp 00000000 00:00 0
7f84bbeff000-7f84bbf02000 ---p 00000000 00:00 0
7f84bbf02000-7f84bc000000 rwxp 00000000 00:00 0
7f84bc000000-7f84bd5a9000 rwxp 00000000 00:00 0
7f84bd5a9000-7f84c0000000 ---p 00000000 00:00 0
7f84c0000000-7f84c0002000 r-xs 00001000 08:01 25328 /usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/ext/dnsns.jar
7f84c0002000-7f84c0004000 r-xs 0000d000 08:10 24445483 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/commons-logging-1.1.1.jar
7f84c0004000-7f84c000a000 r-xs 00045000 08:10 24445482 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/commons-httpclient-3.1.jar
7f84c000a000-7f84c000e000 r-xs 00024000 08:10 24445481 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-tika/commons-compress-1.1.jar
7f84c000e000-7f84c0018000 r-xs 00088000 08:10 24445643 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/lib/zookeeper-3.3.1.jar
7f84c0018000-7f84c0023000 r-xs 0005f000 08:10 24445642 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/lib/xstream-1.3.1.jar
7f84c0023000-7f84c0025000 r-xs 00018000 08:10 24445451 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/lib-nekohtml/nekohtml-0.9.5.jar
7f84c0025000-7f84c0026000 r-xs 00015000 08:10 24445469 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-html/tagsoup-1.2.jar
7f84c0026000-7f84c0027000 r-xs 00000000 08:10 24445544 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/somethingparser/somethingparser.jar
7f84c0027000-7f84c0028000 r-xs 00004000 08:10 24445467 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/parse-html/parse-html.jar
7f84c0028000-7f84c0029000 r-xs 00003000 08:10 24445449 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/lib-http/lib-http.jar
7f84c0029000-7f84c002a000 r-xs 00001000 08:10 24445511 /something1/packages/thecrawler/webapps/crawlers/WEB-INF/classes/conf/plugins/protocol-http/protocol-http.jar
7f84c002a000-7f84c002d000 ---p 00000000 00:00 0
7f84c002d000-7f84c012b000 rwxp 00000000 00:00 0
7f84c012b000-7f84c012e000 ---p 00000000 00:00 0
7f84c012e000-7f84c022c000 rwxp 00000000 00:00 0
7f84c022c000-7f84c022f000 ---p 00000000 00:00 0
7f84c022f000-7f84c032d000 rwxp 00000000 00:00 0
7f84c032d000-7f84c0330000 ---p 00000000 00:00 0
7f84c0330000-7f84c042e000 rwxp 00000000 00:00 0
7f84c042e000-7f84c0431000 ---p 00000000 00:00 0
VM Arguments:
vm_args: -Djava.util.logging.config.file=/something1/packages/thecrawler/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/something1/packages/apache-tomcat-7.0.20/endorsed -Dcatalina.base=/something1/packages/thecrawler -Dcatalina.home=/something1/packages/apache-tomcat-7.0.20 -Djava.io.tmpdir=/something1/packages/thecrawler/temp
java_command: org.apache.catalina.startup.Bootstrap start
Launcher Type: SUN_STANDARD
Environment Variables:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
USERNAME=root
LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.24/jre/../lib/amd64
SHELL=/bin/bash
Signal Handlers:
SIGSEGV: [libjvm.so+0x791b30], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x791b30], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x640ba0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x640ba0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x640ba0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x640ba0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x643780], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x643380], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTERM: [libjvm.so+0x643380], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x643380], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
--------------- S Y S T E M ---------------
OS:squeeze/sid
uname:Linux 2.6.32-309-ec2 #18-Ubuntu SMP Mon Oct 18 21:00:50 UTC 2010 x86_64
libc:glibc 2.11.1 NPTL 2.11.1
rlimit: STACK 8192k, CORE 0k, NPROC infinity, NOFILE 1024, AS infinity
load average:12.49 12.12 11.91
/proc/meminfo:
MemTotal: 7864548 kB
MemFree: 562736 kB
Buffers: 500660 kB
Cached: 1560628 kB
SwapCached: 0 kB
Active: 4917260 kB
Inactive: 1955200 kB
Active(anon): 4198384 kB
Inactive(anon): 612968 kB
Active(file): 718876 kB
Inactive(file): 1342232 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 104 kB
Writeback: 0 kB
AnonPages: 4811024 kB
Mapped: 666396 kB
Shmem: 180 kB
Slab: 157276 kB
SReclaimable: 144948 kB
SUnreclaim: 12328 kB
KernelStack: 3032 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 3932272 kB
Committed_AS: 5022592 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 6256 kB
VmallocChunk: 34359731576 kB
DirectMap4k: 7864320 kB
DirectMap2M: 0 kB
CPU:total 2 (4 cores per cpu, 1 threads per core) family 6 model 26 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt
Memory: 4k page, physical 7864548k(562736k free), swap 0k(0k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (19.1-b02) for linux-amd64 JRE (1.6.0_24-b07), built on Feb 2 2011 16:55:54 by "java_re" with gcc 3.2.2 (SuSE Linux)
time: Thu Oct 13 08:54:34 2011
elapsed time: 9913 secondsIf you are using JNI or using a third party library that uses JNi then that would likely be the problem.
If not then it is a VM bug. -
Dear all,
I am working on a MacOSX. I am having trouble in using a Dynamic Library generated from C files and accessed from a java project using JNI.
The loading of the library work well bur when i try to access a method I have the following error:
FATAL ERROR in native method: JNI received a class argument that is not a class
at cytosolve.sbmlSolver.SBMLSolver.initSolver(Native Method)
at cytosolve.sbmlSolver.SBMLSolver.<init>(SBMLSolver.java:87)
at cytosolve.sbmlSolver.cytosolve.main(cytosolve.java:29)where the Native method inside the C file is the following:
JNIEXPORT jint JNICALL
Java_cytosolve_sbmlSolver_SBMLSolver_initSolver(JNIEnv *env, jobject obj, jstring model_filename, jdouble totalTime, jint numSteps)and it is called from the Java file as:
int successCode = initSolver(model_filename, totalTime, numSteps);Do you have any idea on where is the problem and how to fix it?
Thank you,
Eva.Everything seems to be right. Maybe you use JNI functions inproperly?
-
FATAL ERROR in native method: Wrong Method ID
I have a piece of C code from which I am trying to launch a piece of Java, but I am having severe problems just trying to get a simple integer value returned from any Java function. I keep getting the error message "FATAL ERROR in native method: Wrong method ID used to invode a Java method"
My C code looks like :
JNIEnv *env;
long result;
jmethodID mid;
jclass cls;
jobjectArray args;
jstring jstr;
jint res;
jobject myObj;
options[0].optionString = "-Djava.class.path=.";
options[1].optionString = "-Djava.compiler=NONE";
options[2].optionString = "-verbose:jni";
vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = 2;
vm_args.ignoreUnrecognized = JNI_FALSE;
// Create the Java VM
result = JNI_CreateJavaVM(&jvm,(void **)&env, &vm_args);
if (result == JNI_ERR )
printf("Can't create Java VM\n");
exit(1);
else
printf("Java VM created successfully\n");
cls = (*env)->FindClass(env, "Example1");
if (cls == 0){
printf("Can't find Class\n");
exit(1);
else
printf("Class Found\n");
mid = (*env)->GetMethodID(env, cls, "GetIntValue", "()I" );
if (mid == 0) {
printf("Can't find function\n");
exit(1);
else
printf("Function Found\n");
res = (*env)->CallIntMethod(env, cls, mid);
if (res != 0)
char pszTempString[256] = {'\0'};
sprintf (pszJavaString, "Returned from Java the value of %d", res);
printf("Returned from Java with ");
printf(pszJavaString);
My GetMethodID call works correctly and I have checked the signature (using javap -s) and that works fine. I've seen many references on these forums about using NewObject prior to calling CallIntMethod, but if I try to use that I then get the error message "FATAL ERROR in native method: a non-constructor passed to NewObject".
Any body got any ideas please.
ThanksWhat I couldn't figure out from your code is where you create the java object that is supposed to return the integer to your C code.
Alternatives:
o This is just code snippets, and you really are creating the object.
o Error - the object should have been created.
o Error - it is a static method, and you should be finding a static method and calling it on a class object.
(Other than that, I didn't see anything obviously wrong. -
Fatal error : can not open file 'msvcrt.lib'
Hello dudes !
I am using windows and jdk1.6. I want to develop one application using JNI. As steps for JNI, i have created Helloworld java class and compiled it, then created header file using jnh. After that i have created HelloWorld.c file.
To build dll file, i am executing the below command
"cl -Ic:\java\include -Ic:\java\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll".
Command giving the output as follows:
HelloWorld.c
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
/dll
/implib:HelloWorld.lib
/out:HelloWorld.dll
HelloWorld.obj
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
Can anybody say why it is giving this problem.
Also i tried giving the msvcrt.lib path as the value for -MD option,
cl -Ic:\java\include -Ic:\java\include\win32 -MD"c:\Microsoft Visual Studio 8\VC\lib" -LD HelloWorld.c -FeHelloWorld.dll
Then it is giving "can not open file LIBCMT.lib" .
Note : ...\VC\lib and ....\VC\include are added in the path.
Can anybody tell the solution for this ?
Thanks in advance!!Hi,
I was with the same problem. You have set the your VCC environment.
Path, Include and Lib.
In your directory VCC (2003 toolkit), you have a .bat file (vcvars32.bat)
Run the bat, or copy and past this command in your command prompt.
In my compilation, I run the code, wihtout -MD and -LF. In your, just:
cl -Ic:\java\include -Ic:\java\include\win32 HelloWorld.c -FeHelloWorld.dll
thanks,
Fabio Pinheiro
Brasil. -
Fatal error using C++ native library
Hi everyone,
I'm currently developing a JNI native library in C++ in order to use an original library from a third vendor. I'm trying to perform a very simple operation, just calling a concrete method from the original library from a Java sample application.
The same test in C++ is working fine, so I assume the vendor library is working correctly. But if I perform exactly the same code from within my native library using JNI, it give a crash like this:
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x000000371c880580, pid=17095, tid=1077307712
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x80580] wchar_t+0x0
I think this is telling me that there was an error in the native library, more concrete in the libc.so library which is part of the GNU C++ compiler used to generate the native library. I don't know what the "wchar_t" wants to mean, since I know that is a primitive type for wide chars. It might be that the error is related to the use of this primitive within the vendor library?
The compilation options that I'm using are the following:
#CCFLAGS = -shared -Wl,-soname,${TARGET} -lstdc++ -ldl -lpthread -fopenmp
CCFLAGS = -shared -Wl,-soname,${TARGET} -ldl -fopenmp
#FPFLAGS = -DLINUX -DGX_NAMESPACES -fPIC -fshort-wchar
#FPFLAGS = -fPIC -fshort-wchar
FPFLAGS = -fPIC
${TARGET} : FPEnginePulnixImpl.o
${CC} -o ${TARGET} FPEnginePulnixImpl.o ${CCFLAGS} -L${JAI_DIR} -lVrs
FPEnginePulnixImpl.o :
${CC} -o FPEnginePulnixImpl.o -I"${JDK_INCLUDES}" -I"${JDK_INCLUDES_LINUX}" -I"../jni/include" -I"${JAI_INCLUDES}" ${FPFLAGS} -c ../src/main/C++/FPEnginePulnixImpl.cc
I played around with those ones, without success so far. I debugged the native code and I know the crash is coming when I call a constructor of a C++ class of the vendor library. Is there something I could do about this? BTW, on Windows is working fine, but indeed, the vendor library is a different one. I've got the impression that there's something in the JNI wrapper of the JDK6 that I'm using that makes the vendor library to crash, either that or something wrong with the compilation of my native library.
Any help will be welcome.
Thanks and regards,
LuisMost often errors are caused by
1. Pointer errors
2. Api misuse, such as using something in the wrong order (which actually leads to a pointer problem but it not really the cause.)
Keep in mind that the fact that code runs 'ok' on one system is NOT a safe indicator that the above problems do not exist.
If it is not that then if the binaries have incompatible build properties then that can cause problems. -
Fatal Error while sending a fax
Hello
I'm having this problem with one of my users the company.
we have a fax server that is working almost fine for everyone but one specific user, whenever she tries to send a fax from her client computer, after dialing and when it says Transmitting...a Fatal Error comes up,, Event
ID 32028
I did all the suggested actions by Microsoft and other people in the forum, no luck
today i tried something else, send a fax with same user on another client computer...same error
so this is a user problem..i checked all the permissions and FAX USERS group, it is the same like others
please help!!Hi,
For Event ID 32028, please refer to following article and check if can help you to troubleshoot this issue.
Event ID 32028 — Sent Fax Status
Meanwhile, please open Registry Editor and follow the path:
HKEY_CURRENT_USER\Software\Microsoft\Fax folder when the problematic user account logon, then compare with other user accounts which can be used to send fax as normal. Any difference?
If any update, please feel free to let me know.
Hope this helps.
Best regards,
Justin Gu
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Adobe Illustrator CS3: Fatal error during installation
Hello,
I just bought the AI CS3. It installed OK on my friend's laptop (windows). However, when I clicked the big button in the installation:
"Install Adobe Illustrator CS3"
A window showed:
Initializing Adobe Illustrator...
Then I got a message:
"Setup has encountered an error and cannot continue. Contact Adobe customer Support for assistance. Fatal error during installation".
I've tried several times. My computer meets all the requirements (it's a really new and faster PC). And there's no old versions of AI on it yet.
Can anyone help? Thanks!!!Do you have any other Adobe products on your computer? When I installed CS3 on my Mac, I kept getting failures. After contacting Adobe, they told me I had to delete ALL other Adobe products -- including Flash and Adobe Reader. Plus, I had to do searches and delete any support files associated with them. It took hours!
-
Installing a trial version of the Illustrator and InDesign App in Creative Cloud on my Mac is impossible. Keep getting 'Installation failed' notices. More information gives 0 fatal error(s), 0 error(s). Already repaired disk permissions in Disk Utility but nothing seems to work. Exit code: 7.
Hi Maarton,
Please follow the link to resolve the issue: Errors "Exit Code: 6," "Exit Code: 7" | CS5, CS5.5
-Ankit -
Hi all,
In the JSP ,if I include the statement <%@ page import="jack.samples.*" %>
it is throwing following error:
This is the Error Message from the Exception:
Server caught unhandled exception from servlet [BaseServlet]: Server caught
unhandled exception from servlet [CategoryDisplay]: Server caught unhandled
exception from servlet [jsp]: Fatal Error: missing resource: java.util.PropertyResourceBundle
I am using Websphere 3.5 on Windows NT.
can somebody please help me what is going wrong here ???I am stopped at
this problem for last 2 days.
Thanks
JackHi,
Finally I was able to resolve after adding this jar file to the classfile
path of the application.
Now,I am trying to access use linkTable.add(new Item(222,"222","333",12.33)) in JSP.
where linkTable is a LinkedList.
It fails giving following error:
This is the Error Message from the Exception:
Server caught unhandled exception from servlet [BaseServlet]: Server caught unhandled exception from servlet : Server caught unhandled exception from servlet [jsp]: Compilation of "softproduct.jsp" failed: d:\ibm\WAServer\temp\default_host\WCSServlets\_jameco_2F_softproduct_2E_jsp_jsp_2.java:824: No constructor matching Item(int, java.lang.String, java.lang.String, double) found in class jack.samples.Item. linkTab.add(new Item(2222,"222","222",22.33)); ^ Note: d:\ibm\WAServer\temp\default_host\WCSServlets\_jameco_2F_softproduct_2E_jsp_jsp_2.java uses or overrides a deprecated API. Recompile with "-deprecation" for details. 1 error, 1 warning
I dont understand why it is failing to add Item object to LinkedList.
can somebody help me in the forum in this regard.
Thanks
Jack -
Itunes: Fatal Error During Installation (it wont download at all) HELP!
Yesterday my iTunes (7.3.1) was working with no problems then the iTunes + Quicktime upgrade came up telling me to download the newer version but I didnt want to download it yet untill after i restarted my computer so I exited out of both the upgrade screen and iTunes then restarted the computer and when I tried to open up iTunes (after restarting), a little window came up saying:
+*Preparing to install...*+
Then after a minute or two it said: *+Please wait while Windows configures iTunes+*
Then another window pops up saying:
*+Error writing to file: C:\Program Files\iTunes\iTunesMiniPlayer.Resources\fi.lproj\iTunesMiniPlayerLocalized.dll. +*
*+Verify that you have access to that directory.+*
and I have no idea what that means so i closed it then a pop up shows saying: *+Fatal Error During Installation.+*
so i deleted iTunes, Quicktime, iPod and everything i could (that my computer would let me) that had to do with Apple and restarted my computer then tried to download iTunes again but now when its reisntalling it says
*+Error writing to file:+* +*C:\Program Files\Common Files\Apple\Mobile Device Support\bin\disnoted.exe.*+
+*Verify that you have access to that directory.*+
Then after this i went to the folder
+*C:\Program Files\Common Files\Apple\Mobile Device Support\bin\disnoted.exe.*+
and made sure that Read Only wasn't checked but everytime i go to uncheck it and click Apply and OK it doesnt stay it just goes right back to being checked...because when u click OK the window goes away so i immediately opened it back up to see if changed but it was filled again
WHAT DO I DO?!?!? please can someone help me
The details for my computer are:
Microsoft Windows XP
Professional Version 2002
Service Pack 2if it helps at all...
I downloaded Quicktime seperately from iTunes and i got that with no problem and it worked just fine but i cant get iTunes at all
and i have follwed the instructions on the website about uninstalling everything but nothing seems to be working
...is there any possible way that anybody can help me out with this.
any help that anyone can offer is very greatly appreciated,
Please & Thank You. -
RC-50004: Fatal: Error occurred in ApplyDatabase:Control file creation fail
Hi,
During the clone of R12.1 instance, while running the post clone on the DB tier, i am getting the following error
RC-50004: Fatal: Error occurred in ApplyDatabase:Control file creation failed.
when i looked into the log file, i can find this
Creating the control file for hr12at1_jsrc-cn6 database ...
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Nov 17 04:41:58 2009
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to an idle instance.
ORACLE instance shut down.
Connected to an idle instance.
ORACLE instance started.
Total System Global Area 1071333376 bytes
Fixed Size 1318172 bytes
Variable Size 427819748 bytes
Database Buffers 629145600 bytes
Redo Buffers 13049856 bytes
Control file created.
alter database open resetlogs
ERROR at line 1:
ORA-01152: file 2 was not restored from a sufficiently old backup
ORA-01110: data file 2:
'/u01/app/oracle11/db/apps_st/u32/oradata/R12HRM/tx_data11.dbf'
Please help
thanks a lot
SasikalaHi,
Sorry, my mistake, I did not pay attention to the cloning part.
For this error, looks like the database was not cleanly shutdown before copying the files or that preclone was not run successfully. You will have to run preclone again, and shutdown the database normally, then copy the file again.
Regards,
Hussein -
LabView Run-time engine 6.1 fatal error on install in XP Pro
I downloaded an application which uses the LVRTE to decode audio signals and display them graphically. I then downloaded the latest (?) version of the RTE installer for Windows .../XP from the NI site and it shows a version number of 1.1.0.0 if I move the pointer over the file. When I try to install the RTE using this file, I get a small message box with the title "Fatal Error" and the text "Installation ended prematurely because of an error" and no other clues. I've disabled the antivirus s/w (Norton) and the firewall (Zonealarm). I've even searched through the registry to see if there are any entries with either "LabView" or "National Instruments" in them and found nothing.
I'm running a properly li
cenced (yes, I paid real money for it) version of XP Pro with all the latest patches installed.
Any clues as to how to get the thing to install would be gratefully received.
Thanks in anticipation
Frustrated of ScotandHI Jim,
do not give up. Go here: LabVIEW runtime engines.
You can reach this over Support >> Drivers and Updates >> All Versions ...
Waldemar
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Maybe you are looking for
-
Is there a way to manually manage apps? I have lots of apps that I don't want on my iphone all the time, but I don't want to delete them from my itunes account permanently.
-
Performance Assistance is not working
Hi One of the user's PC the performance assistance and F1 help was not displayed with his sap user id but at the same time it was displayed on the same PC with another sap user id. Is there any user specific settings in SAP system to display the Help
-
on my macbook, itunes suddenly appears empty, with start-upo tutorials offered, etc. Music files still on hard drive, but where are my playlists?
-
Open all files in 'Open Recent' menu
Is there a way to open all files at once that appear in the 'Open Recent' menu in Preview? If I have 15 PDFs listed, would it be possible to open them all at once (perhaps through Automator?). Any help is appreciated. Thanks.
-
Mac crashes while importing / viewing photos in Lightroom
Does any one have any clue as to what might be causing my Mac to crash/stall when I am: Using Lightoom to import files / viewing the files in library while they download. (It doesn't crash if I just leave it to download and don't view the files). I'm