UnsatisfiedLinkError

Etienne Gagnon <[email protected]>
Newsgroups gmane.comp.java.vm.sablevm.devel
Organization UQAM
Message-ID <[email protected]>
Hi all,

I noticed the following diff in staging 3277:

+      _svmf_printf(env, stderr, "*** Error linking native method %s\n",
+                    method->data.native_method->long_name);
+
        _svmf_error_UnsatisfiedLinkError_msg (env, function_name);

I will revert this code, as it is contrary to the specifications. 
Namely, the VM is not allowed to randomly write information to stderr or 
anywhere, unless specifically instructed to do so.

Actually, there was some equivalent code in older SableVM versions to 
help locating problems with missing JNI library functions, but I have 
fixed the problem a while ago by computing a "jstring" which includes 
the name, and passing it to the constructor of the UnsatisfiedLinkError 
object instance, as you can see above (function_name).  [This required 
putting in place the machinery to construct internal error objects with 
a message argument, which was missing in early versions].

So, the VM's stack trace does now include this name.  Of course, any 
application that catches such an error (!) *should* log it in its error 
log.  In the normal case, the error will cause a VM stack dump, which 
will show the function name.

If a user complains, simply tell him/her to carefully read the stack 
trace!  The missing function name is most probably there.

Etienne

-- 
Etienne M. Gagnon, Ph.D.            http://www.info2.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/

_______________________________________________
SableVM-devel mailing list
[email protected]
http://sablevm.org/lists/control/listinfo/sablevm-devel
signature.asc (application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB6ptQjyrJi4rH84gRAmWZAJwIleov6mVMAdFGa3qSS+xLLDU3VgCfQo91
aF4NBQkhqHpdbZyipMcBts4=
=7t0A
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.