You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Fursov (JIRA)" <ji...@apache.org> on 2007/04/08 11:24:32 UTC

[jira] Created: (HARMONY-3591) [drlvm][ia32] Can't run simple 3D HWA application using lwjgl library

[drlvm][ia32] Can't run simple 3D HWA application using lwjgl library
---------------------------------------------------------------------

                 Key: HARMONY-3591
                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Mikhail Fursov
         Attachments: lwjgl.zip

I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
This crash prevents even simple scenarios to be run.
I found that the crash is reproduced for every JIT or interpreter mode we have.
HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.

Here is the list of the last methods compiled before crash:
EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I


Here is stacktrace I've got on  Windows:

>	lwjgl.dll!01865f90() 	
 	lwjgl.dll!0186620e() 	
 	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
 	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
 	011fe010()	
 	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
 	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
 	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
 	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
 	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
 	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
 	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
 	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
 	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
 	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
 	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
 	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
 	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
 	java.exe!mainCRTStartup()  Line 398 + 0xe	C



I checked the same test with SUN and BEA VMs.
Sun1.4/1.5/1.6 and BEA1.4 runs OK.
BEA 1.5 crashes.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-3591:
----------------------------------------

    Assignee: Alexey Varlamov

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [drlvm][ia32] Can't run simple 3D HWA application using lwjgl library

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488005 ] 

Mikhail Fursov commented on HARMONY-3591:
-----------------------------------------

After a small investigation I've found that VM is crashed after  GetDirectBufferAddress method call with object of type java/nio/IntToByteBufferAdapter passed as parameter. This method returns NULL because java/nio/IntToByteBufferAdapter  is not a subclass of org/apache/harmony/nio/internal/DirectBuffer.

It looks like that this is the problem in our NIO implementation and bug should be moved to [classlib] module.


> [drlvm][ia32] Can't run simple 3D HWA application using lwjgl library
> ---------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov resolved HARMONY-3591.
--------------------------------------

    Resolution: Fixed

Fixed at r527979.
Regression test is added to DRLVM regression suite, due to several reasons:
1) this suite provides decent support for mixed java+native tests;
2) J9 currently does not support JNI NIO
3) JNI functionality is basically VM-specific.

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488028 ] 

Alexey Varlamov commented on HARMONY-3591:
------------------------------------------

The problem was that all BufferAdaptors may wrap both direct/non-direct buffers but did not provide neccessary interface in case of direct ones.

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3591) [drlvm][ia32] Can't run simple 3D HWA application using lwjgl library

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov updated HARMONY-3591:
------------------------------------

    Attachment: lwjgl.zip

Testcase to reproduce.

> [drlvm][ia32] Can't run simple 3D HWA application using lwjgl library
> ---------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488465 ] 

Mikhail Fursov commented on HARMONY-3591:
-----------------------------------------

>need to raise this question on dev-list@.
Yes, please, start the thread. I do not feel comfortable to do it by myself because I will limit my participation only with email posts while doing real tasks on JIT side.

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Jimmy, Jing Lv (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488021 ] 

Jimmy, Jing Lv commented on HARMONY-3591:
-----------------------------------------

    As RI behaves well here, I doubt if it is IntToByteBufferAdapter  which  cause the crash. May it be a direct buffer, or the factory should create a DirectBuffer for use.
    Can we access the source code of lwjgl?

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488023 ] 

Mikhail Fursov commented on HARMONY-3591:
-----------------------------------------

I see that we do not violate spec here.
But lwjgl library is very popular product and unless we fix classlib or lwjgl we can't run anything with it.

Sources can be found here: http://lwjgl.org/
lwjgl is distrubuted under BSD license.

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488383 ] 

Alexey Varlamov commented on HARMONY-3591:
------------------------------------------

I'm working on a regression test for this issue, obtained 2 interesting findings so far:
1) J9 does not support JNI NIO at all, so no surprise it won't pass the test;
2) another JNI func GetDirectBufferCapacity() also misbehaves on non-byte buffer views (i.e. on direct CharBuffer, IntBuffer, etc), but RI does the same! I better file a new JIRA for that, so it could be moved to Non-Bug_difference category.

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488019 ] 

Alexey Varlamov commented on HARMONY-3591:
------------------------------------------

The crash still looks bad :( 
OTOH this is most probably non-ideal error handling issue in lwjgl natives, not much we can do about it. J9 also crashes on this test, it gives the following diagnostic:

Thread: main (priority 5) (LOCATION OF ERROR)
 NATIVE   org/lwjgl/opengl/WindowsDisplayPeerInfo.nInitDC(Ljava/nio/ByteBuffer;)V
 00000004 org/lwjgl/opengl/WindowsDisplayPeerInfo.initDC()V
 0000002b org/lwjgl/opengl/WindowsDisplay.createWindow(Lorg/lwjgl/opengl/DisplayMode;ZII)V
 00000062 org/lwjgl/opengl/Display.createWindow()V
 00000039 org/lwjgl/opengl/Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;)V
 00000002 org/lwjgl/opengl/Display.create(Lorg/lwjgl/opengl/PixelFormat;)V
 00000007 org/lwjgl/opengl/Display.create()V
 00000052 Lesson02.createWindow()V
 00000001 Lesson02.init()V
 00000006 Lesson02.run(Z)V
 0000001e Lesson02.main([Ljava/lang/String;)V

On DRLVM the stack looks slightly different:
Windows reported exception: 0xc0000005
Registers:
    EAX: 0x035a0000, EBX: 0x00000020, ECX: 0x00000000, EDX: 0x035a0000
    ESI: 0x00000020, EDI: 0x00000000, ESP: 0x0013ee4c, EBP: 0x00000000
    EIP: 0x02935f90
Stack trace:
        0: Java_org_lwjgl_opengl_WindowsDisplay_nReshape (??:-1)
        1: org/lwjgl/opengl/WindowsDisplay.nSetWindowIcon32(Ljava/nio/IntBuffer;)I (WindowsDisplay.j
ava:-2)
        2: org/lwjgl/opengl/WindowsDisplay.setIcon([Ljava/nio/ByteBuffer;)I (WindowsDisplay.java:468
)
        3: org/lwjgl/opengl/Display.setIcon([Ljava/nio/ByteBuffer;)I (Display.java:931)
        4: org/lwjgl/opengl/Display.createWindow()V (Display.java:262)
        5: org/lwjgl/opengl/Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;
)V (Display.java:694)
        6: org/lwjgl/opengl/Display.create(Lorg/lwjgl/opengl/PixelFormat;)V (Display.java:648)
        7: org/lwjgl/opengl/Display.create()V (Display.java:632)
        8: Lesson02.createWindow()V (Lesson02.java:139)
        9: Lesson02.init()V (Lesson02.java:147)
        10: Lesson02.run(Z)V (Lesson02.java:56)
        11: Lesson02.main([Ljava/lang/String;)V (Lesson02.java:47)
<end of stack trace>

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Jimmy, Jing Lv (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488035 ] 

Jimmy, Jing Lv commented on HARMONY-3591:
-----------------------------------------

    Yes, IBMVME also crash because of some other reason (they crash on different stack trace). The stack trace was:
 NATIVE   org/lwjgl/opengl/WindowsDisplayPeerInfo.nInitDC(Ljava/nio/ByteBuffer;)V
 00000004 org/lwjgl/opengl/WindowsDisplayPeerInfo.initDC()V
 0000002b org/lwjgl/opengl/WindowsDisplay.createWindow(Lorg/lwjgl/opengl/DisplayMode;ZII)V
 00000062 org/lwjgl/opengl/Display.createWindow()V
 00000039 org/lwjgl/opengl/Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;)V
 00000002 org/lwjgl/opengl/Display.create(Lorg/lwjgl/opengl/PixelFormat;)V
 00000007 org/lwjgl/opengl/Display.create()V
 00000052 Lesson02.createWindow()V
 00000001 Lesson02.init()V
 00000006 Lesson02.run(Z)V
 0000001e Lesson02.main([Ljava/lang/String;)V
      It is in the native code, when WindowsDisplayPeerInfo.nInitDC call GetDirectBufferAddress() (or after that). I shall take a deeper look, but I doubt if the VM cause the crash.

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488094 ] 

Mikhail Fursov commented on HARMONY-3591:
-----------------------------------------

>Here is the patch, the test works now with the DRLVM.

This is really good news!
I'm going to try running Quake2 on Harmony this weekend using lwjgl. :)

BTW: AFAIK another popular OpenGL driver: JOGL uses jawt.dll to for direct access to some native AWT data. I can find this library is in SUN distribution from V1.5 of JDK. BEA does not have this library.
Do we have any plans on jawt.dll support?

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488416 ] 

Alexey Varlamov commented on HARMONY-3591:
------------------------------------------

Regarding JAWT, yes it is AWT native interface analogous to JNI, which we don't support yet and I don't recall in TODOs, need to raise this question on dev-list@.

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Fursov updated HARMONY-3591:
------------------------------------

    Component/s:     (was: DRLVM)
                 Classlib
        Summary: [classlib][nio] Can't run simple 3D HWA application using lwjgl library  (was: [drlvm][ia32] Can't run simple 3D HWA application using lwjgl library)

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Jimmy, Jing Lv (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488575 ] 

Jimmy, Jing Lv commented on HARMONY-3591:
-----------------------------------------

Hi Alexey Varlamov,
    I just read your patch for this JIRA, I find it workable, but may need some enhancement for:
    1. IntToByteBufferAdapter (and all related adapters) may not be DirectBuffer, let it implement DirectBuffer does not make sense.
    2. all DirectBuffer methods implemented in these classes, e.g, getEffectiveAddress(), check if the ByteBuffer is DirectBuffer, otherwise return null . These do not make sense.
    So I suggest we create other classes implements DirectBuffer as a adapter, e.g, names DirectIntToByteBufferAdapter.
    If no objection, I'd like to add a patch for this.

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Assigned To: Alexey Varlamov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-3591:
-------------------------------------

    Attachment: nio_view.diff

Here is the patch, the test works now with the DRLVM. 
Seems J9 has some other problem, it fails with the same diagnostics as before.
Do we need a native regression test? Volunteers welcome ;)

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip, nio_view.diff
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library

Posted by "Jimmy, Jing Lv (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488020 ] 

Jimmy, Jing Lv commented on HARMONY-3591:
-----------------------------------------

Hi Mikhail,
    The spec of JNI method GetDirectBufferAddress reads: "... Returns NULL if the memory region is undefined, if the given object is not a direct java.nio.Buffer. ..." So I believe this method performs correctly here.
    I've debugged in but seems lwjgl does not have source code. Can you tell me what method calls GetDirectBufferAddress() and what method uses the return value(NULL)?  
   Thanks!

> [classlib][nio] Can't run simple 3D HWA application using lwjgl library
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-3591
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3591
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mikhail Fursov
>         Attachments: lwjgl.zip
>
>
> I've tried to run simple 3D HWA application using popular openGL Java wrapper: lwjgl library and found that Harmony crashes at a very early stage of lwjgl initialization.
> This crash prevents even simple scenarios to be run.
> I found that the crash is reproduced for every JIT or interpreter mode we have.
> HereI think that the problem is with DLRVM threading support or with Classlibs NIO implementation.
> Here is the list of the last methods compiled before crash:
> EM: compile start:[CS_OPT n=980] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile done:[CS_OPT n=980: OK] java/nio/DirectByteBuffer::get([BII)Ljava/nio/ByteBuffer;
> EM: compile start:[CS_OPT n=981] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile done:[CS_OPT n=981: OK] org/apache/harmony/luni/platform/PlatformAddress::getByteArray(I[BII)V
> EM: compile start:[CS_OPT n=982] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> EM: compile done:[CS_OPT n=982: OK] org/lwjgl/opengl/WindowsDisplay::setIcon([Ljava/nio/ByteBuffer;)I
> Here is stacktrace I've got on  Windows:
> >	lwjgl.dll!01865f90() 	
>  	lwjgl.dll!0186620e() 	
>  	harmonyvm.dll!m2n_free_local_handles()  Line 267 + 0xc	C++
>  	harmonyvm.dll!get_vm_thread(HyThread * thr=0x011fdfa0)  Line 190 + 0xb	C++
>  	011fe010()	
>  	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f794, int sz=1, void * f=0x01800010)  Line 77	C++
>  	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 200	C++
>  	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 539 + 0x16	C++
>  	em.dll!ExecuteMethod(_jmethodID * meth=0x03105890, jvalue * return_value=0x00000000, jvalue * args=0x02ffa948)  Line 43 + 0x21	C++
>  	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x03105890, jvalue * result=0x00000000, jvalue * args=0x02ffa948)  Line 51 + 0x1b	C++
>  	harmonyvm.dll!call_static_method_no_ref_result(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948, jvalue * result=0x00000000)  Line 1154 + 0x11	C++
>  	harmonyvm.dll!CallStaticVoidMethodA(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, jvalue * args=0x02ffa948)  Line 1562 + 0x17	C++
>  	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, char * args=0x0013fa18)  Line 1547	C++
>  	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011fe050, _jobject * clazz=0x03103ee0, _jmethodID * methodID=0x03105890, ...)  Line 1537	C++
>  	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011fe050, char * mainClassName=0x00366f79, int nameIsUTF=0, int java_argc=0, char * * java_argv=0x0036247c, HyPortLibrary * portLibrary=0x0013fbb8)  Line 1311 + 0x1b	C
>  	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=7, char * * argv=0x00362460, unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized='', char * mainClass=0x00366f79, unsigned int classArg=6, char * propertiesFileName=0x0015db60, int isStandaloneJar=0, char * vmdllsubdir=0x0013fb44)  Line 732 + 0x2c	C
>  	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 381 + 0x33	C
>  	java.exe!main(int argc=7, char * * argv=0x00362460, char * * envp=0x00364180)  Line 147 + 0xc	C
>  	java.exe!mainCRTStartup()  Line 398 + 0xe	C
> I checked the same test with SUN and BEA VMs.
> Sun1.4/1.5/1.6 and BEA1.4 runs OK.
> BEA 1.5 crashes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.