Help! JNI code freezes inside printf() call

Hi,
I have a JDK 1.1.8 based java app that loads a JNI based dll. When I run the app from DOS prompt it is working fine. When I run the app from my IDE (i.e no access to console stdout/stdin), the app is freezing. So I launched VC++ 6x and attached to the Java app. Found that the JNI code that was trying to print trace messages using std C call "printf()" freeze inside printf().
Is the lack of std dos command window an issue when running an app like this?
I appreciate any pointers.
Thanks
Puri malluru

Is the lack of std dos command window an issue when running an app like this?Could be. If the output is being redirected and the pipe is filling then the io method will block until the pipe clears. Perhaps the IDE has an output window that you need to open or init.

Similar Messages

  • SoS, windows freezing when debugging jni code

    Somebody Help!!!!
    I am desperately trying to debug JNI code with MSDEV debugger.
    This is a flow:
    1. I run the java application from Msdev. Visual 6.0
    2. Insert a breakpoint in the first native method.
    3. The program successfully stops in the breakpoint.
    4. The "next" debugger command freezes WINDOWS :(
    I have tried all last jdk2 releases starting from 1.3 till 1.5.
    Any ideas ?
    10000000x in advance

    Cross-post:
    Duplicate post:
    http://forum.java.sun.com/thread.jspa?threadID=604754
    @OP: QUIT IT!

  • Photoshop CS6 could not update successfully.  Error codes Adobe Photoshop 13.0.1.3 Installation failed. Error Code: U44M1P7  Extension Manager 6.0.8 Update Installation failed. Error Code: U44M1P7  Please help me figure out how to call customer service. 

    Photoshop CS6 could not update successfully.  Error codes Adobe Photoshop 13.0.1.3 Installation failed. Error Code: U44M1P7  Extension Manager 6.0.8 Update Installation failed. Error Code: U44M1P7  Please help me figure out how to call customer service.  I would prefer to talk to someone directly.

    Are you using any disk cleaner or optimization tools like CleanMymac or Mackeeper?
    Regards,
    Ashutosh

  • Hello i am having a problem in my 4s that it dosent run any USSD code it goes on calling , can any one help me i am mack from Karachi Pakistan

    Hello i am having a problem in my 4s that it dosent run any USSD code it goes on calling , can any one help me i am maqsood  from Karachi Pakistan

    Ok so I've done what you said and this is what it's come back ....
    I don't know that these are the errors , but they're the things which don't look right ...
    Throughout the shut down there is a recurring line ;
    It says ;
    Com.apple.launchd 1 0x100600e70.anonymous.unmount 301 PID still valid
    Then there are 2 more which I think are related ;
    Com.apple.securityd 29 PID job has I overstayed its welcome , forcing removal.
    Then the same with fseventd 48 and diskarbitrationd 13
    Oh and on Launchd1 : System : stray anonymous job at shut down : PID 301 PPID13 PGID 13 unmount...
    Then the last process says "about to call: reboot (RB_AUTOBOOT).
    Continuing...
    And stops ...
    Hope this means something to you ... Thanks again for your help so far :-)

  • Please help me!  I have a copy of PS CS6 which I purchased from Adobe but I don't have the activation code!! I cannot get anyone to help! I have made several calls and online chats, but no one seems to get it.

    Please help me!
    I have a copy of PS CS6 which I purchased from Adobe but I don't have the activation code!!
    I cannot get anyone to help!
    I have made several calls and online chats, but no one seems to get it.

    Thank you for replying.    Yes I deleted the old email address..   

  • How to manage the memory within this JNI code

    This is a piece of JNI code that i had written..........
    i am calling these methods in a infinite loop to listen for changes......
    if a change has occured it shpuld get changed. other wise not....
    But the memory is allocated 4 bytes every second.... even if the user doesnt makes a change....... ( memory increases with TIME....... )
    How to get rid of this problem
    Please Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    #include <jni.h>
    #include "ParameterClass.h"
    #include <stdio.h>
    #include <scrpcdll.h>
    const char *NetAddr = "";
    const char *str = NULL;
    int sp= 0;
    double value= 0;
    jsize doubleLen = 0;
    jsize strLen = 0;
    int val=0;
    int i= 0 ;
    jdouble *body = NULL;
    const char *name = NULL;
    jstring *string = NULL;
    const char *tableStr = NULL;
    int sp1 = 0;
    double value1 = 0;
    JNIEXPORT jdouble JNICALL
    Java_ParameterClass_IdentificationValue(JNIEnv *env, jobject obj,jstring parameterName,jdouble parameterValue)
         if(SC_ConnectToSoftcar(NetAddr))
              str = (*env)->GetStringUTFChars(env,parameterName,NULL);
              sp = SC_AddVari(str, 6, "M");
              SC_Set(sp,parameterValue);
              (*env)->ReleaseStringUTFChars(env,parameterName,str);
              (*env)->ReleaseStringUTFChars(env,parameterName,NULL);
              value = SC_Get(sp);
         (*env)->DeleteLocalRef(env,parameterName);
         return value;
    JNIEXPORT void JNICALL
    Java_ParameterClass_OnlineValue(JNIEnv *env1,jobject obj1,jobjectArray str,jdoubleArray doArr)
         if(SC_ConnectToSoftcar(NetAddr))
              doubleLen = (*env1)->GetArrayLength(env1, doArr);
              strLen = (*env1)->GetArrayLength(env1,str);
              body = (*env1)->GetDoubleArrayElements(env1,doArr,NULL);
              for(i = 0; i < doubleLen; i++)
                   *string = (jstring)(*env1)->GetObjectArrayElement(env1,str,i);
                   name = (*env1)->GetStringUTFChars(env1,*string,NULL);
                   val = SC_AddVari(name, 6, "revs");
                   SC_Set(val,body);
                   (*env1)->ReleaseStringUTFChars(env1,*string,name);
                   (*env1)->ReleaseStringUTFChars(env1,*string,NULL);
              (*env1)->ReleaseDoubleArrayElements(env1,doArr,body,0);
              (*env1)->DeleteLocalRef(env1, *string);
         SC_DisconnectFromSoftcar();
         return;

    Hai,
    Thanks for your comments.......
    In Java i call the JNI methods inside a Infinite loop...
    when i comment this Infinite loop then the memory doesnt Increase at all.....
    but i cannot comment since i need a functionality to execute through JNI.....
    so if i uncomment this Infinte loop then i get a Probelm.........
    This is the JAVA CODE which calls JNI CODE:::::::::::::::::::::
    while(loopForever)
         streamWrite();
         System.gc();
    public void streamWrite()
    // Getting the Parameter Value from the Softcar
         for(i = 0; i < newparameterArray.length; i++)
              newparameterArray[i] = valueClass.returnIdentificationValue(prefix+parent.parameterName);
              System.gc();
    /*Checking the Array of values: Checking which value of the Array has changed in Softcar      Checking for the Elements of the Array which had been changed by the User if the change is made then Updating to the ASAP-3 Server.........*/
         if(Arrays.equals(parameterArray,newparameterArray) == true)
              for(i = 0; i < newparameterArray.length; i++)
              newparameterArray[i] = valueClass.returnIdentificationValue(prefix+parent.parameterName[i]);
              System.gc();
         else{
              for(i = 0; i < newparameterArray.length; i++)
                   if(parameterArray[i] != newparameterArray[i])
                        parameterArray[i] = newparameterArray[i];
                             parent.commandparameters.setapsparameters.parameterField.setText(parent.parameterName[i]);
                             parent.commandparameters.setapsparameters.parameterValueField.setText(Double.toString(newparameterArray[i]));
              try{
                   bos.write((byte[])parent.commandparameters.setapsparameters.setParameterArray());
                   bos.flush();
                   Thread.sleep(500);
                   readfromStream();
                   serverResponse();
              }catch(IOException exception){System.err.println(" Write Stream Exception" + exception.getMessage());}
              catch(InterruptedException ie){System.err.println(ie.getMessage());};
              //parameterArray[i] = newparameterArray[i];
              System.gc();
    //Getting the TableValue from Softcar.......
              for(j = 0; j < Integer.parseInt(parent.xDimension); j++)
                   newtableValueArray[j] = valueClass.returngetTableValue(arrayString[j]);
                   System.gc();
    //Comparing the Values ( whether the user has chaged the TableValue )
              if(Arrays.equals(tableValueArray,newtableValueArray) == true)
                   for(j = 0; j < newtableValueArray.length; j++)
                        newtableValueArray[j] = valueClass.returngetTableValue(arrayString[j]);
                        System.gc();
              else
                   for(j = 0; j < newtableValueArray.length; j++)
                        if((tableValueArray[j] != newtableValueArray[j]))
                             tableValueArray[j] = newtableValueArray[j];
                             parent.commandparameters.setlookupparameters.yindexField.setText(parent.yDimension);
                             parent.commandparameters.setlookupparameters.xindexField.setText(Integer.toString(j+1));
                             parent.commandparameters.setlookupparameters.valueField.setText(Double.toString(newtableValueArray[j]));
                             try{
                                  bos.write((byte[])parent.commandparameters.setlookupparameters.setlookupArray());
                                  bos.flush();
                                  Thread.sleep(500);
                                  readfromStream();
                                  serverResponse();
                             }catch(IOException exception){System.err.println(" Write Stream Exception" + exception.getMessage());}
                             catch(InterruptedException ie){System.err.println(ie.getMessage());};
                             System.gc();

  • JVM core dump - JNI code

    I am using JNI in my Java application , 12 hours after running my test case get a JVM crash -
    1) These are the parameters with which i invoke my Java program
    java -d64 -Xcheck:jni -Xmx2560M -Xms2560M -Xss256k RunQueries
    2) The Heap output at the time of the core shows "from space" as 100% used , does this signify anything?
    Heap at VM Abort:
    Heap
    def new generation total 848128K, used 672342K [0xfffffffe93c00000, 0xfffffffec9150000, 0xfffffffec9150000)
    eden space 822464K, 78% used [0xfffffffe93c00000, 0xfffffffebb385b90, 0xfffffffec5f30000)
    from space 25664K, 100% used [0xfffffffec7840000, 0xfffffffec9150000, 0xfffffffec9150000)
    to space 25664K, 0% used [0xfffffffec5f30000, 0xfffffffec5f30000, 0xfffffffec7840000)
    tenured generation total 1747648K, used 1350866K [0xfffffffec9150000, 0xffffffff33c00000, 0xffffffff33c00000)
    the space 1747648K, 77% used [0xfffffffec9150000, 0xffffffff1b884830, 0xffffffff1b884a00, 0xffffffff33c00000)
    compacting perm gen total 16384K, used 13550K [0xffffffff33c00000, 0xffffffff34c00000, 0xffffffff37c00000)
    the space 16384K, 82% used [0xffffffff33c00000, 0xffffffff3493b860, 0xffffffff3493ba00, 0xffffffff34c00000)
    Local Time = Mon Feb 12 21:49:40 2007
    Elapsed Time = 61687
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.4.2_07-b05 mixed mode)
    3) A dbx on the Java core shows the location in the JNI code where the core dump occured.
    dbx `which java` core
    For information about new features see `help changes'
    To remove this message, put `dbxenv suppress_startup_message 7.3' in your .dbxrc
    Reading java
    dbx: internal warning: writable memory segment 0x7cb00000[16384] of size 0 in core
    core file header read successfully
    Reading ld.so.1
    Reading libthread.so.1
    Reading libdl.so.1
    Reading libc.so.1
    Reading libc_psr.so.1
    Reading libjvm.so
    Reading libCrun.so.1
    Reading libsocket.so.1
    Reading libnsl.so.1
    Reading libm.so.1
    WARNING!!
    A loadobject was found with an unexpected checksum value.
    See `help core mismatch' for details, and run `proc -map'
    to see what checksum values were expected and found.
    dbx: warning: Some symbolic information might be incorrect.
    t@1 (l@1) terminated by signal ABRT (Abort)
    0xffffffff7eea822c: lwpkill+0x0008: bcc,a,pt %icc,_lwp_kill+0x18 ! 0xffffffff7eea823c
    Current function is Java_getLoid (optimized)
    7239 e = cod_to_long (*(o_object*) data, &loid_as_long);
    (dbx) where
    current thread: t@1
    [1] lwpkill(0x0, 0x6, 0xffffffffffffffe6, 0x0, 0x0, 0x0), at 0xffffffff7eea822c
    [2] raise(0x6, 0x0, 0xffffffff7fffad30, 0x7fbffeff00003ff6, 0x0, 0x2), at 0xffffffff7ee58a8c
    [3] abort(0x0, 0xffffffff7fffae10, 0x0, 0xfffffffffffffff8, 0x0, 0xffffffff7fffae39), at 0xffffffff7ee3e3b8
    [4] os::abort(0x1, 0xffffffff7e9d295c, 0xffffffff7fffaf10, 0xffffffff7e9d24a9, 0x4b007c, 0xffffffff7eb78878), at 0xffffffff7e90951c
    [5] os::handle_unexpected_exception(0x10011e600, 0xa, 0xfffffffe90345704, 0xffffffff7fffbeb0, 0xffffffff7e69c6f8, 0x0), at 0xffffffff7e907e08
    [6] JVM_handle_solaris_signal(0xffffffff7fffbeb0, 0xffffffff7e9d443e, 0xffffffff7fffbbd0, 0x1, 0x0, 0x1), at 0xffffffff7e69c800
    [7] __sighndlr(0xa, 0xffffffff7fffbeb0, 0xffffffff7fffbbd0, 0xffffffff7e69cb9c, 0x0, 0x0), at 0xffffffff7f2188d8
    ---- called from signal handler with signal 10 (SIGBUS) ------
    =>[8] Java_getLoid(vjEnv = ???, cls = ???, handle = ???, attr = ???) (optimized), at 0xfffffffe90345704 (line ~7239) in "j.c"
    I have added checks for this function call to ensure that no invalid pointer is being sent to it which could cause a segmentation violation.
    Please could someone give me some pointers on how to solve this problem, the error occurs at this point only 12 hours after running the test case..

    First step is to add the option -Xcheck:jni to your java command line. It will flag common JNI errors.
    If that doesn't identify the problem, then compile your jni code with debugging symbols (-g) and add the following option to the java command line when you run your test: -XX:+ShowMessageBoxOnError. When you hit the problem again, the VM will keep the process alive instead of calling abort(). Then you can use dbx to attach to the live process and should be able to get a better idea of what went wrong.

  • JVM Seg Fault With Multithreaded JNI Code

    Hello all:
    I'm having a problem with a multi threaded application. The application is used to bridge an exsisting C++ application with an exsisting Java application so I went with a JNI implementation. After I completed my implementation, I found that the bridge would crash after a few hours (or a few million JNI calls). At first I thought there was a memory leak but my memory usage was not going up (according to the task manager) and the heap was staying around 3 MB (according to a third party tool). I finally figured out that the problem was my JNI code. The JNI code is all in a wrapper DLL (built with MinGW) that four other DLL's call dynamically. So I made a test app to test the wrapper dll. The test app is a simple two threaded application that creates a java object and deletes the java object. CODE:
    #include <process.h>
    #include "JNIUtilityInterface.h"  // Link to the JNI dll (GetProcAdress, etc.)
    void test(void * arg) {   
       for (int i = 0; i < 4000000; i++) {
          jobject jTest = createObjectByClass(NULL, "JNITest", "()V");
          deleteObject(jTest);
       int num = (int)arg;
       printf("done - %d\n", num);              
    int main(int argc, char *argv[])
       clearJNIUtilityDll();
       initJNIUtilityDll();
       invokeJVM();         
       for (int i = 0; i < 3; i++) {
          if (i == 0) {
             _beginthread(test, 0, (void*)i);
          } else {           
             _beginthread(test, 0, (void*)i);
       Sleep(240000);
       exitJNIUtilityDll();
       return 0;
    }createObjectByClass code:
    jobject JNIUtility_API createObjectByClass(jboolean * hasException, 
                                               const char * className, 
                                               const char * descriptor, va_list args) {                                                                                                                    
       jclass clazz;
       jmethodID mid;
       jobject obj;
       JNIEnv * env;
       env = getEnv();
       if (env != NULL) {  
          if (env->EnsureLocalCapacity(2) == JNI_OK) {
             jclass clazz = env->FindClass(className);                                                
             jmethodID mid = env->GetMethodID(clazz, "<init>", descriptor);       
             if (mid) {
                obj = env->NewObjectV(clazz, mid, args);                                             
             env->DeleteLocalRef(clazz);          
          if (hasException) {
             *hasException = env->ExceptionCheck();
       env = NULL;
       return obj;
    } getEnv code:
    JNIEnv * getEnv() {          
       JNIEnv * env;
       jint result;
       result = jvm->GetEnv((void **)&env, JNI_VERSION_1_4);
       if (result == JNI_EDETACHED) {
          if (jvm->AttachCurrentThreadAsDaemon((void **)&env, NULL) == JNI_OK) {
             //printf("Attached current thread!\n");
       return env;
    }deleteObject code:
    void JNIUtility_API deleteObject(jobject obj) {
       JNIEnv * env;
       env = getEnv();
       if (env != NULL) {                                                                                                                                               
          env->DeleteLocalRef(obj);
       env = NULL;                             
    }The other code is not important since I know this is where the seg fault is happening. Again this is just test code but when I run this code with only one thread, it works fine (with the 4000000 for loop). The JavaVM is globally cached as well.
    If anybody nows how to properly run two or more native threads that use JNI methods, please let me know or if you have any tips, that will be good too! If you want any more code to try for yourself, I'm willing to send it to you.
    Thanks!!

    Nevermind, I found out that if you build you code using jni.h from 1.5.0_06 and run you code using 1.5.0_04 JRE, you run into problems with multi threading! Don't do this because it leads to headaches and high blood pressure :)

  • 5800XM freezes during the call

    Hi,
    I have had 2 times issue that phone screen freezes during call. No keys helped, but ON/OFFswitch. Updated to last version of v40.0.005.
    Don't remember the exact conditions or sequece of actions, just got unpleasant case.
    I noticed also that batteryindicator showed 1 stripe of battery. After restart , the battery was full.  Is this expected action for this phone?  Should Itake it back to service?
    My phone is used ~1 week, so there can't be any issues caused by wrong usage.

    It's verry tempting to make you do a soft reset as it often clear out glitches, but it might as well be a faulty fw install, sou you will need to reflash.
    When did the issues occure? -After installing some apps, or doing something with the simcard, memorycard etc?
    It's likely that a nokia care point would just reflash and reset it, so you could do that your self.
    Back up your content with pc suite and diall *#7370# and security code 12345. Then perform a format of the memorycard (back up music and pics if you have any) . Maybe go for a reflash to if you have the possibility.
    If this does not help, and it freezes more often - you should take it to a Nokia care point and tell them what you have done, and let them look at it. Might be a faulty memorycard, but it could be something else that's hard to know about - especially for us who cannot see the phone.

  • Call transaction inside of call function in back ground task

    Hi,
        Is it possible to use call transaction statemement inside of call function in back ground task. I am getting error if i use the same. Any help will be highly appreciated.

    Hi,
    I don't think this is possible. The call goes into error in SM58, what you can try to do is after the function is called, you can submit the program RSARFCEX by setting the user name as sy-uname and other parameters as * and set all the checkboxes.
    regards,
    Advait

  • Need to use default package for JNI code?

    Hi,
    I don't have much experience with JNI code, so excuse me if I make a silly mistake.
    I have a set of DLLs to interface with Microsoft native speech code ("Microsoft Sam") -- a GPL library called Quadmore. Quadmore has some sample Java code to work with the libraries, all of which they put in the default package (no package). If I move their code to a named package, it breaks. The Java code is able to load th libraries, but can't find any of the methods.
    Looking at the source for their DLLs (though I don't speak C++), the method names are things like
    JNIEXPORT jboolean JNICALL Java_QuadmoreTTS_SpeakDarling(JNIEnv *env,jobject obj,jstring strInput)As far as I understand, this implies that the QuadmoreTTS.class that calls the code must be in the default package, as otherwise the method name needs to be prepended with a package name.
    If that's so, then there's no way I can use the code as-is, right? Naturally, the rest of my program is in named packages, and I can't import any class that is in the default package, right? I've tried placing all their code in a jar and adding the jar to my classpath, but I still can't import any of their classes as they are in the default package.
    Is the only solution to re-compile all their C/C++ code to let it use packages? Am I being dumb and missing something? I'm pretty sure other people have used Quadmore before, so I can't believe that they've never had this problem before.
    Any suggestions greatly appreciated!
    Sam

    C/C++ functions in JNI must conform to the prototypes produced by running the javah compiler against the class file with native methods in it. So if you move the class to another package, the prototypes change. If you doun't change the compiled C coudes to suit, you will get undefined method errors when you load the dll as the JVM won't be able to match the native methods to the methods in the dll (it will call WinLoadLibrary() and WinLoadProcAddress() or somesuch under Windows).

  • "Deadlock in safepoint code. Should have called back to the VM"

    We experience a VM crash in Safepoint.cpp with the following message:
    # An unexpected error has been detected by Java Runtime Environment:
    # Internal Error (safepoint.cpp:558), pid=5452, tid=1900
    # Error: Deadlock in safepoint code. Should have called back to the VM before blocking.
    # Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode windows-x86)
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    This happens in JRE 1.6.0.11 + Microsoft VS2008 C++, on Windows Server 2003. Happens in a busy customer site once in every few days, cannot reporoduce in the lab.
    There are two relevant threads:
    * Thread A: Created in Java right after system start up. It makes some preparations and then calls C++ code via JNI. In the JNI, Java data types are converted to C++ data types by GetBooleanArrayElements() and GetStringUTFChars(). It remains in C++ forever (until shutdown) and calls back the Java code via JNI every few seconds (that is: the stack contains Java frames, then C++ frames, then from time to time more Java frames and even further C++ frames).
    * Thread B: Created upon need, invokes a C++ function via JNI, converts parameters by GetStringUTFChars() and at return by ReleaseStringUTFChars(). The function may take few milliseconds and up to few minutes to complete, eventually it returns to Java and the thread is deleted.
    At time of crash we see the following:
    * Most of the threads in the system are in state threadblocked - we guess that the VM blocked them for GC.
    * Thread A is the active one. As far as we can tell it is in Java (called back from C++), maybe trying to invoke a C++ function via JNI. It locked and released a mutex ("synchronized") just before the crash (we suspect that while performing this lock its thread's Safepoint state may have changed to callback). The thread state is threadin_native_trans.
    * Thread B is blocked in the JNI trying to return to Java, maybe while invoking ReleaseStringUTFChars(). It's state is threadblocked.
    Another important detail: the crash happens usually certain time (few seconds or even few minutes) after thread B is blocked, and always while thread A is in Java called back from C++. We guess that something caused the Safepoint locking to wait forever while thread B tried to returns to from C++ to Java, and that the activity of thread A make the Safepoint realize that there's a deadlock (so its activity it's not the root cause but a side-effect).
    We always see two mutex / monitors with name UNKNOWN at time of error, and 100% "eden" memory utilization.
    hotspot error dump fragment:
    --------------- T H R E A D ---------------
    Current thread (0x26d51400): JavaThread "DialogicBridge" [_thread_in_native_trans, id=1900, stack(0x28490000,0x284e0000)]
    Stack: [0x28490000,0x284e0000]
    [error occurred during error reporting (printing stack bounds), id 0xc0000005]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j telemessage.telephony.DialogicBridge.initializeDialogic(Ljava/lang/String;IIIIIIIIIIIILjava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;IZZ[Z)I+0
    j telemessage.telephony.DialogicBridge$1.run()V+293
    j java.lang.Thread.run()V+11
    v ~StubRoutines::call_stub
    0x2ed00400 JavaThread "<< Call#16207 >> " [_thread_blocked, id=8604, stack(0x2e5c0000,0x2e610000)] // this is thread B
    =>0x26d51400 JavaThread "DialogicBridge" [_thread_in_native_trans, id=1900, stack(0x28490000,0x284e0000)] // this is thread A
    Other Threads:
    0x269f7000 VMThread [stack: 0x26a80000,0x26ad0000] [id=2104]
    0x26a29000 WatcherThread [stack: 0x26cb0000,0x26d00000] [id=9300]
    VM state:synchronizing (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x002a8be0] UNKNOWN - owner thread: 0x269f7000
    [0x002a9040] UNKNOWN - owner thread: 0x2ed00400
    Heap
    def new generation total 2816K, used 2707K [0x02730000, 0x02a30000, 0x04e90000)
    eden space 2560K, 100% used [0x02730000, 0x029b0000, 0x029b0000)
    from space 256K, 57% used [0x029f0000, 0x02a14f50, 0x02a30000)
    to space 256K, 0% used [0x029b0000, 0x029b0000, 0x029f0000)
    tenured generation total 30272K, used 17667K [0x04e90000, 0x06c20000, 0x22730000)
    the space 30272K, 58% used [0x04e90000, 0x05fd0d88, 0x05fd0e00, 0x06c20000)
    compacting perm gen total 12288K, used 10995K [0x22730000, 0x23330000, 0x26730000)
    the space 12288K, 89% used [0x22730000, 0x231ecdf8, 0x231ece00, 0x23330000)
    No shared spaces configured.

    Thanks for the advice.
    Eventually (after few days of digging) we found that in certain case we're using the JNIEnv of one thread in the other thread. This leads to sporadic crashes. We managed to simulate the situation in the lab and ensure that fixing the JNIEnv mixture really makes the problem go away.

  • My JNI codes get NoSuchMethodException when release to user

    My JNI codes run well in my development environment(JBuilder7), but when they release to user, they get java.lang.NoSuchMethodException. The error generates when the C++ code try to call the java side method.
    The release package was built by my colleague. And I found that they obfuscate my codes after the normal build work.
    So I wonder is this the reason I got NoSuchMethodException ?
    Thanks in advance!

    Yes. I have figured out that it is the obfuscator causes the problem.
    I have spent too much time and energy in sloving the problem, so I think it might be worthwhile to write down what I have learned and let others avoid the same pitfall.
    A common trick played by obfuscate is to change the method and variable, so that a line of code that once said:
    draw(imageList.get(i));
    may change to
    a(b.a(c));
    When my c++ code try to call the java-side code using GetMethodID(..."draw"...) or GetStaticMethodID(..."draw"...), it will, of course, cause the NoSuchMethodException
    After I skipping obfuscating the Java classes called by the c++ codes, the problem solves.
    Thank you very much

  • Differnces between Search Help & Match Codes

    Hi,
    what is the Differences between Search Help & Match Codes ? which is goof to use ?

    Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input help to a field.
    Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a collective search help with the same name. Each matchcode ID of the matchcode object is converted into an elementary search help with the same name and assigned to the collective search help created from the matchcode object.
    A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP Dictionary in two steps:
    You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes the set of all possible search paths for a search string.
    You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search path for a search string. The matchcode ID defines the fields or field combinations to be used in the search.
    Search Help
    Use
    With this function you can search for objects, thereby defining and linking different selection conditions for the search help.
    Prerequisites
    You can call this function by:
    · Selecting Object ® Search... () in the main menu bar of the Integration Builder
    · Placing the cursor on a software component version and selecting Search... () in the context menu (only in the Integration Repository)
    In this case the software component version is defined as the search criteria.
    Features
    Defining the Object Type
    You can select the object type in a dropdown list in field Object Type.
    In the design (Integration Repository) you can
    · Select an object type (for example Message Interface)
    · Select a cross-object category (for example Interface Objects)
    In the configuration (Integration Directory) you can select types Values Mapping Group and schema in addition to the individual object types.
    CHECK THIS LINK TO CREATE A SEARCH HELP.
    http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
    CHECK THIS LINK TO CREATE A MATCHCODE OBJECT
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci553386,00.html
    more details...

  • Search helps & match codes - Urgent plz

    Hi ,
    1.   Could any one give me the difference between search helps & match codes.
    2. assume that you are giving input matnr from selection screen.and executed based on input matnr you have generated an interactive report with fields matnr,etc...
    if i want to change that particular matnr realted fields how can i do that from this report.Shell i call mm02 tcode.How to do that.how to pass the selected parameter to the transaction.(screen matnr field.please give me an example.
    Regards
    SAISRI

    Hi,
    Check this example for interactive reporting..which will take you MM02
    TYPE-POOLS: slis.
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: BEGIN OF wa_material,
    MATNR LIKE MARA-MATNR,
    END OF wa_material.
    DATA: v_repid TYPE syrepid.
    v_repid = sy-repid.
    DATA it_material LIKE STANDARD TABLE OF wa_material WITH HEADER LINE.
    SELECT * UP TO 100 ROWS
    FROM MARA
    INTO CORRESPONDING FIELDS OF TABLE it_material.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
              i_program_name     = v_repid
              i_internal_tabname = 'WA_MATERIAL'
              i_inclname         = v_repid
         CHANGING
              ct_fieldcat        = gt_fieldcat.
    * have hotspot for a PO.
    DATA: s_fieldcat LIKE LINE OF gt_fieldcat.
    s_fieldcat-hotspot = 'X'.
    MODIFY gt_fieldcat FROM s_fieldcat TRANSPORTING hotspot
           WHERE fieldname = 'MATNR'.
    * Pass the program.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
              i_callback_program      = v_repid
              it_fieldcat             = gt_fieldcat
              i_callback_user_command = 'USER_COMMAND'
         TABLES
              t_outtab                = it_material.
    *       FORM display_detail                                           *
    *  -->  UCOMM                                                         *
    *  -->  SELFIELD                                                      *
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
      IF ucomm = '&IC1' AND selfield-fieldname = 'MATNR'.
        READ TABLE it_material INDEX selfield-tabindex.
        IF sy-subrc = 0.
          SET PARAMETER ID 'MAT' FIELD it_material-matnr.
          CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.
    ENDFORM.
    Thanks
    Naren

Maybe you are looking for

  • Can anybody help me resolve this Windows 8.1 Issue?

    In summary, a couple of hours ago whilst surfing the internet, a message popped up on my screen and without doing anything told me that my computer was "installing Windows 8.1", and no matter what I did it wouldn't let me exit, and not being all that

  • Bizarre permissions issue: Can't write to owned folders

    Has anyone experienced this and possibly has a fix ? I used Carbon Copy Cloner to duplicate a drive, and everything seems to be OK with the new drive (all the files are there and read properly), except I cannot write to any of the drive's subdirector

  • Error ORABPEL-11802 while calling Stored Procedure

    Hi, I am trying to call a stored proc in oracle through DB adapter in BPEL services. The procedure accepts custom data types only. I am able to assign values to each element in the custom data type but while executing the same it is throwing the erro

  • Error cost estimate urgent

    Dear Friends , Please give some solution for following error , Cost estimate for material S1 / plant 1000 is incorrect Message no. CK168 *Diagnosis* *The system found errors in the cost estimate of material component S1 from plant 1000.* *System Resp

  • Custom Field/Column in Sourcing Cockpit Overview

    Hi All, We are using SRM 5.0 Classic Scenario and requirement is to add custom fields like Material No. and Delivery date on Sourcing cockpit overview as columns. I have already checked the Templates and the Screen for SAPLBBP_SOCO_UI_ITS screen 200