[squeak-dev] JNIPort preview for Squeak and Pharo available on SqueakSource

Joachim Geidel joachim.geidel at onlinehome.de
Wed Jun 9 18:20:37 UTC 2010

Am 09.06.10 19:32 schrieb Levente Uzonyi:
>> The attachment contains a stack trace of the place where a user interrupt
>> has always interrupted the stuck process so far. I suspect that the
>> finalization process somehow interferes with the registration of new objects
>> in the WeakRegistry. The problem is in a loop which creates wrapper methods
>> for each of the Java classes found so far. It does not always happen at the
>> same iteration, I have seen it happen for the first and for the fourth class
>> in the list (I checked this only twice so far).
> Thanks. It would be good to know if another process (for example the
> finalization process) is inside the critical section, or the semaphore is
> left without being signaled.

As far as I can tell, there can only be two processes which access the
WeakRegistry. One of them is the process running the JVM startup code, the
other one would be the finalization process. JNIPort does not fork other
processes. How could this be analyzed? By instrumenting the finalization
process? How? In VisualWorks, there are code probes which can be used to
monitor variables and more - does something similar exist in Squeak?

>> What do you mean by "the jvm just failed to start"? Does it mean that the
>> jvm.dll could not be found, i.e. the JNIPortJNIInterface could not load the
>> library?
> Exactly. Do I have to tell the path to the dll somewhere?

As far as I know, Alien does not yet accept paths to a library from
Smalltalk. I have not used it on Windows, so I don't know what has to be
done there. The jvm.dll is typically located at
  C:\Program Files\Java\jre1.6.0_NN\bin\client\jvm.dll
where NN is the patch level of the JRE. You could try adding the "client"
directory to your PATH. If this doesn't help, try copying jvm.dll into the
directory where the Squeak VM is installed, but I think this might not work.
I faintly remember reading somewhere that on Windows, the jvm.dll looks for
other dlls in ".." relative to its own location, and that this seems to be
hardwired. I don't know for sure, however. Someone who knows more about
Alien might know what to do (Eliot Miranda, John McIntosh,...).


More information about the Squeak-dev mailing list