Why?When send a String type param from Java to C,I get An unexpected error.

The error trace like this:
# An unexpected error has been detected by HotSpot Virtual Machine:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10001d9c, pid=1944, tid=3204
# Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode, sharing)
# Problematic frame:
# C [sample.dll+0x1d9c]
--------------- T H R E A D ---------------
Current thread (0x00036158): JavaThread "main" [_thread_in_native, id=3204]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000051
Registers:
EAX=0x7ffffffe, EBX=0x26c24ad0, ECX=0x00000051, EDX=0x7fffffff
ESP=0x0007f748, EBP=0x0007f9fc, ESI=0x0007fa38, EDI=0x0007fa88
EIP=0x10001d9c, EFLAGS=0x00010206
Top of Stack: (sp=0x0007f748)
0x0007f748: 0007fa88 0007fa38 26c24ad0 7c930738
0x0007f758: 7fffffff 00000030 7c931596 7c9306eb
0x0007f768: 00000007 00000008 26c24ad0 0007f788
0x0007f778: 0007f7b4 00ae29a4 00000000 22bf60d0
0x0007f788: 10001005 00000000 00000001 00000000
0x0007f798: 0007f790 02eb02b0 0007f7e0 7ffffffe
0x0007f7a8: 00000000 00000051 0007f7dc 0007f7f4
0x0007f7b8: 00000000 00000000 00000000 00000000
Instructions: (pc=0x10001d9c)
0x10001d8c: 89 85 a8 fd ff ff 85 d2 74 1e 8b 8d b0 fd ff ff
0x10001d9c: 0f be 11 85 d2 74 11 8b 85 b0 fd ff ff 83 c0 01
Stack: [0x00040000,0x00080000), sp=0x0007f748, free space=253k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [sample.dll+0x1d9c]
C [sample.dll+0x10ca]
C [sample.dll+0x12e7a]
j HelloWorld.sayHello(Ljava/lang/String;)V+0
j HelloWorld.main([Ljava/lang/String;)V+11
v ~StubRoutines::call_stub
V [jvm.dll+0x86401]
V [jvm.dll+0xdb172]
V [jvm.dll+0x862d2]
V [jvm.dll+0x8d2a2]
C [java.exe+0x14c5]
C [java.exe+0x69cd]
C [kernel32.dll+0x16d4f]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j HelloWorld.sayHello(Ljava/lang/String;)V+0
j HelloWorld.main([Ljava/lang/String;)V+11
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00a7f6c8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3216]
0x00a7e3c0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2040]
0x00a7d480 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1760]
0x00a51f58 JavaThread "Finalizer" daemon [_thread_blocked, id=3212]
0x00a50a70 JavaThread "Reference Handler" daemon [_thread_blocked, id=3208]
=>0x00036158 JavaThread "main" [_thread_in_native, id=3204]
Other Threads:
0x00a4e178 VMThread [id=1952]
0x00a808e0 WatcherThread [id=3220]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 238K [0x22bd0000, 0x22c70000, 0x230b0000)
eden space 512K, 46% used [0x22bd0000, 0x22c0b930, 0x22c50000)
from space 64K, 0% used [0x22c50000, 0x22c50000, 0x22c60000)
to space 64K, 0% used [0x22c60000, 0x22c60000, 0x22c70000)
tenured generation total 1408K, used 0K [0x230b0000, 0x23210000, 0x26bd0000)
the space 1408K, 0% used [0x230b0000, 0x230b0000, 0x230b0200, 0x23210000)
compacting perm gen total 8192K, used 339K [0x26bd0000, 0x273d0000, 0x2abd0000)
the space 8192K, 4% used [0x26bd0000, 0x26c24e90, 0x26c25000, 0x273d0000)
ro space 8192K, 67% used [0x2abd0000, 0x2b12d9f8, 0x2b12da00, 0x2b3d0000)
rw space 12288K, 46% used [0x2b3d0000, 0x2b973808, 0x2b973a00, 0x2bfd0000)
Dynamic libraries:
0x00400000 - 0x0040d000      c:\Program Files\Java\jdk1.5.0_07\bin\java.exe
0x7c920000 - 0x7c9b4000      C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c91c000      C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e49000      C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee1000      C:\WINDOWS\system32\RPCRT4.dll
0x77be0000 - 0x77c38000      C:\WINDOWS\system32\MSVCRT.dll
0x6d730000 - 0x6d8c7000      c:\Program Files\Java\jdk1.5.0_07\jre\bin\client\jvm.dll
0x77d10000 - 0x77d9f000      C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f37000      C:\WINDOWS\system32\GDI32.dll
0x76b10000 - 0x76b3a000      C:\WINDOWS\system32\WINMM.dll
0x76300000 - 0x7631d000      C:\WINDOWS\system32\IMM32.DLL
0x62c20000 - 0x62c29000      C:\WINDOWS\system32\LPK.DLL
0x73fa0000 - 0x7400b000      C:\WINDOWS\system32\USP10.dll
0x6d2f0000 - 0x6d2f8000      c:\Program Files\Java\jdk1.5.0_07\jre\bin\hpi.dll
0x76bc0000 - 0x76bcb000      C:\WINDOWS\system32\PSAPI.DLL
0x6d700000 - 0x6d70c000      c:\Program Files\Java\jdk1.5.0_07\jre\bin\verify.dll
0x6d370000 - 0x6d38d000      c:\Program Files\Java\jdk1.5.0_07\jre\bin\java.dll
0x6d720000 - 0x6d72f000      c:\Program Files\Java\jdk1.5.0_07\jre\bin\zip.dll
0x10000000 - 0x10033000      E:\jnis\sample.dll
VM Arguments:
java_command: HelloWorld
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.5.0_07
CLASSPATH=.;.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1E\lib;
PATH=C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;C:\cygwin\usr\X11R6\bin;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\Program Files\Java\jdk1.5.0_07\bin;c:\Program Files\OPENXTRA\Ethereal;c:\Program Files\OPENXTRA\WinDump;d:\Program Files\jProbe\bin;c:\maven-2.0.6-bin\maven-2.0.6\bin;d:\Open Source\apache-ant-1.7.0\bin;d:\swtdlls;d:\Program Files\CVSNT\;c:\Program Files\OPENXTRA\WinPCap
USERNAME=Administrator
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 9, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
Memory: 4k page, physical 515572k(238244k free), swap 1260260k(935080k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0_07-b03) for windows-x86, built on May 3 2006 01:04:38 by "java_re" with MS VC++ 6.0
Java Code like this:
     static{
          try{
               System.loadLibrary("sample");
          }catch(Exception e){
               System.out.println("Can't load sample.dll");
     //Declare native method
     public native void sayHello(String name);
  public static void main(String[] args){
    HelloWorld hw=new HelloWorld();
    hw.sayHello("QUKI");
  }And C code like this:
JNIEXPORT void JNICALL Java_HelloWorld_sayHello
  (JNIEnv *env, jobject obj, jstring s)
     /* Obtain a C-copy of the Java string */
     //printf("Hello,every one");
    const char *str = (*env)->GetStringUTFChars(env, s, 0);
     printf("Java Call C success....%s\n",*str);
}Any one can tell me why??Thanx very much.

const char str = (env)->GetStringUTFChars(env, s, 0);
printf("Java Call C success....%s\n",*str);
Any one can tell me why??Thanx very much.That asterisk(*) in front of str in the printf() statement is dereferencing the variable. Thus it is a char and not a char*. But %s requires a char*.
EXCEPTION_ACCESS_VIOLATION (0xc0000005) Note that when you get the above, with the ...05 error, that it always means you did something incorrect with a pointer somewhere.

Similar Messages

  • I am running iTunes 11.1.4 on a iMac OSX 10.9.1 when I try to retire my iPod classic, generation 6 I get an unexpected error 1429. My iPod serial ends in V9M.

    I am running iTunes 11.1.4 on a iMac OSX 10.9.1 when I try to retire my iPod classic, generation 6 I get an unexpected error 1429. My iPod serial ends in V9M.
    Message was edited by: Normandomac

    Hi Normandomac,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    iPod: Can't restore or update in iTunes with error 1415, 1417, 1418, 1428, 1429, 1430, 1436, or 1439
    http://support.apple.com/kb/TS1372
    Cheers,
    - Judy

  • All the sudden today when i try and purchase music or an app I am getting an unexpected error message?

    I am getting an unexpected error when trying to purchase music and apps with my iphone 5s.

    What is the error message that you are seeing?
    Have you tried connecting to another Wi-Fi network?
    This Apple doc has some tips that can help -> iTunes: Advanced iTunes Store troubleshooting

  • When trying to generate pdf file from firefox 7.0.1 , getting corrupt content error, used to work with previous versions of firefox

    We have done toleration testing on firefox version 5 thru 6 and haven't got an issue with our website generating pdf files for our users. One of our users upgraded to firefox version 7.0.1 and they tried to generate a pdf report, now a screen pops up with Corrupted Content Error The page you are trying to view cannot be shown because an error in the data transmission was detected. I recreated this issue on my pc yesterday by installing firefox 7.0.1. Any hints as to what I need to look at would help. Cannot provide the url because it is a secure website for law enforcement. Thanks.

    You can turn off compatibility checking, but more and more of the Google Toolbar will not work. Google is no longer supporting the Google Toolbar so you should use the alternatives.
    Hi Mark,
    See http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    If you have an aspect that is not covered, indicate what that is; otherwise, expect you to be fully functional within 1-2 weeks.
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • How to call a Oracle Proc,which contains Object Type as in Param, from java

    Hi
    Would like to know how to call a Oracle Procedure which contains the Object Type Parameter from java.
    Here is my code will look like...
    1. CREATE OR REPLACE TYPE emp AS OBJECT
    Empno NUMBER,
    Ename VARCHAR2(50)
    [COLOR=royalblue]In step1 I have created object type.[COLOR]
    2.CREATE OR REPLACE PACKAGE ref_pkg IS
    TYPE tab_emp IS TABLE OF emp;
    END ref_pkg;
    [COLOR=royalblue]In step2,I have created a table type which is of type emp;[COLOR]
    3. CREATE OR REPLACE PROCEDURE p_emp(p_emptab IN ref_pkg.tab_emp) as
    BEGIN
    FOR I IN 1..p_emptab.COUNT
    LOOP
    Some code written here
    END LOOP;
    END;
    [COLOR=royalblue]In step3 I have passed tabletype which is of type emp as argument.[COLOR]
    Now I need to invoke this procedure from JAVA.
    Calling a procedure doesn�t matter.
    But how I can map objecttype ? how will java recognize oracle object ?
    How can I implement this ?
    Any Help/Clues is Appreciated.
    Thanks
    Krishna

    Hi Bob
    You can call a stored proc from a database control with the jc:sql annotation itself.
    Assume a stored proc taking one In parameter
    * @jc:sql statement="call sp_updateData({id})"
    void call_sp_updateCust(int id);
    You can even call stored proc with OUT parameters using
    * @jc:sql statement="{call sp_MyProc(?, ?)}"
    void call_sp_MyProc(SQLParameter[] params)
    You can also call stored functions via db control.
    More info and diff ways to call at
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    Thanks
    Vimala

  • I have Elements 12 installed.  When I am in the catalog, click on a photo, then want to open the Editor, I get an error message.  If I click on Editor from the Welcome screen, I get the same error message.  Why doesn't Editor work?  Thanks.

    I have Elements 12 installed.  When I am in the catalog, click on a photo, then want to open the Editor, I get an error message.  If I click on Editor from the Welcome screen, I get the same error message.  Why doesn't Editor work?  Thanks.

    You'd better ask in the Elements forum.
    Photoshop Elements

  • Out of office message when sending mail to Lotus Notes from SAP

    Hi,
    Is it possible to have an 'out of office' message when sending mail to Lotus Notes from SAP?
    I'm sending account statements by mail via a modified version of function FI_OPT_ARCHIVE_CORRESPONDENCE. The SAP username is send as a parameter, and later converted to the e-mail saved in the user profile. This works, - but I would like to have an out of office reply if the user I send to is out of office.
    Hope someone can help...
    Regards,
    Lene

    As Thomas pointed out, you can use regular SMTP mail to send the contents to Lotus Notes. You can use the function module SO_OBJECT_SEND or any of the SAP Office function modules to do this.
    Only thing to remember is that the SMTP may have been disabled by your basis team due to security risks involved. An alternative could be a lotus notes connector available from IBM.
    Srinivas

  • When i try to download apps from the app store it gives me an error message help!!

    when i try to download apps from the app store it gives me an error message help!!

    Well this is my first time using the support community so I didn't know how it worked. It was giving me the error message 1004. I figured it out though thanks.

  • Why when I tried to update itunes it crashed and now I get a MSVCR80.dll was not found and can not start my itunes any more

    Why when I tried to update itunes it crashed and now I get a MSVCR80.dll was not found and can not start my itunes any more?

    Solving the iTunes Installation Problems in Windows
    1. Apple has posted their solution here: iTunes 11.1.4 for Windows- Unable to install or open - MSVCR80 issue.
    2. If the Apple article does not fully resolve the problem for you, then try Troubleshooting issues with iTunes for Windows updates - MSVCR80.

  • When I try to export a photo to my desktop I get the followiing error message "Export Versions Complete with Errors" any ideas why?

    when I try to export a photo to my desktop I get the followiing error message "Export Versions Complete with Errors" any ideas why?

    Have you tried to export different images as a test to see if it is related to the one you are getting the error on? Also try to export to a different folder other then the Desktop, again to see if the problem is connected to that folder.
    Another thing to do is run the Aperture Library First Aid on the library. Hold the option and command keys down while you start Aperture. First run the Permission Repair and see if that helps. If not quit Aperture and restart and run the Library Repair and try.
    Post back if you still have problems
    regards

  • Why do I get an unexpected error occured when I try to save a form as a pdf file?

    Why do I get an unexpected error occured when I try to save a form as a pdf file?

    Hi MsSunnyD,
    Try uninstalling Adobe Acrobat using the Adobe cleaner Tool  http://labs.adobe.com/downloads/acrobatcleaner.html
    Then, try installing Adobe Reader XI. That should resolve the problem.
    Regards,
    Ajlan Huda.

  • Hi. NOT CALL ME FOR I AM DEAF BETTER U WRITE ONLY EMAIL. When I run the app ALLMYMUSIC FROM WONDERSHARE after installing I get this window up. When I log in with my Apple ID I just get: The Apple ID you entered couldn't be found or your password was incor

    Hi. NOT CALL ME FOR I AM DEAF BETTER U WRITE ONLY EMAIL.
    When I run the app ALLMYMUSIC FROM WONDERSHARE after installing I get this window up.
    When I log in with my Apple ID I just get:
    The Apple ID you entered couldn't be found or your password was incorrect. Please try again.
    I have however made sure that this is the correct Apple ID and password that I am putting in. In the Mac App Store it works.
    Do you have any solution?
    I am running Mavericks 10.9.2.

    To post a screenshot click on the "Camera" button at the top of the reply box and upload it there.
    MtD

  • Why when you log on by icloud on my iPhone show a message saying password error and try again Try again

    Why when you log on by icloud on my iPhone show a message saying password error and try again Try again????????

    Hey sergioo9,
    Thanks for the question. Based on what you stated, it seems like you are having trouble signing into Messages on OSX. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    FaceTime, Game Center, Messages: Troubleshooting sign in issues - Apple Support
    Thanks for using Apple Support Communities.
    Cheers,
    Mario

  • How to send SMS ( Short Message Service ) from java code

    Hi
    How to send SMS ( Short Message Service ) from java code.
    Thanks
    Gaurav

    Do you need to receive SMS? If you need to receive SMS, you will need to host your own GSM device or modem so that people can send you SMS.
    If not, you can just use internet SMS gateways like clickatell as mentioned above will do the work, and post to them by HTTP, XML or email. The cost is about 6-8 cents per SMS. There are cheaper services, but not always reliable. If you need to host your own GSM device, you can use software like http://www.kannel.org (GPL Open Source) or http://www.visualgsm.com. Alternatively, you may obtain a shortcode from your Telco - but these come with monthly subscription of maybe one or two hundreds.
    Regards,
    Joshua
    <SMS Gateway>@Expert

  • When I try to download software from the internet I only get a black screen and the software never downloads.

    When I try to download software from the internet I only get a black screen and nothing downloads.  I attempted mozilla firefox and software from a photobook site just to name a couple.

    How much free space on the startup disk?
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure you have a minimum of 15% free disk space.

Maybe you are looking for

  • TS3367 how can i print off my facetime call history

    how can i print off my facetime call history

  • Reading an SMB Share Without Mounting

    I'm sure hte answer to this must be incredibly simple, but when I Google, almost every link is about mounting SMB shares. I want to be able to read an SMB share on another system from the command line WITHOUT mounting the share. For example, in Windo

  • 10.5.5. update

    hi it's been a long time since i made the update with tiger and then i switched to 10.5.4. now before making the update, have anyone found problems with these interfaces: rme fireface400 esata expresscard 34 (silicon chipset) one more... is it better

  • Account is suspended or blocked

    Dear Sir, As an admin, I  removed my team member from skype manager so that he can enjoy skype independently. But his account is blocked , when he tries to sign in into his account from any device he is unable to sign in into his acount. Neither he h

  • Over 20 MG

    I am trying to download yahoo messenger on my Iphone 4 however I keep receiving a error message that states that the application is over 20MG and that I must connect to a Wi-Fi network or use ITunes on my computer to download, however it still isnt w