When I run my Hello World program, the Japhar executes it but
then traps with an assert in NSPR. Apparently, nobody ever
calls HVM_DllInit, but Destroy_JavaVM calls HVM_DllExit,
dll_monitor is not initialized, and boom. Any ideas what to do?
The following solves the problem, do you think it is safe?
[zaitcev@js006 java]$ diff -u japhar/arch/dynamic_loading.c
japhar-p3/arch/dynamic_loading.c | more
--- japhar/arch/dynamic_loading.c Wed May 17 19:09:13 2000
+++ japhar-p3/arch/dynamic_loading.c Wed May 24 20:48:08 2000
@@ -321,6 +321,8 @@
PR_IMPLEMENT(void)
HVM_DllExit(void)
{
+ if (NULL == dll_monitor) /* Not a single DLL was loaded ==> */
+ return; /* lt_dlinit was not done, so skip lt_dlexit */
PR_EnterMonitor(dll_monitor);
lt_dlexit();
PR_ExitMonitor(dll_monitor);
--Pete