harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LvJimmy´╝îJing" <firep...@gmail.com>
Subject [classlib][nio] we may add Re: [jira] Commented: (HARMONY-3591) [classlib][nio] Can't run simple 3D HWA application using lwjgl library
Date Fri, 13 Apr 2007 05:57:05 GMT
Hi,
   I've just read the 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 for those in-direct
bytebuffer.
   So I suggest we create other classes implements DirectBuffer as a
adapter, e.g, names DirectIntToByteBufferAdapter, so that we can
return this adapter as a DirectBuffer reasonably. What's more, we may
do some performance tuning for DirectBuffer.
   If no objection, I'd like to add a patch for this(raise another JIRA?).

2007/4/13, Mikhail Fursov (JIRA) <jira@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.
>
>


-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Mime
View raw message