Hi Joachim,<br><br><div class="gmail_quote">On Wed, Jun 9, 2010 at 11:20 AM, Joachim Geidel <span dir="ltr"><<a href="mailto:joachim.geidel@onlinehome.de">joachim.geidel@onlinehome.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Am 09.06.10 19:32 schrieb Levente Uzonyi:<br>
>> The attachment contains a stack trace of the place where a user interrupt<br>
>> has always interrupted the stuck process so far. I suspect that the<br>
>> finalization process somehow interferes with the registration of new objects<br>
>> in the WeakRegistry. The problem is in a loop which creates wrapper methods<br>
>> for each of the Java classes found so far. It does not always happen at the<br>
>> same iteration, I have seen it happen for the first and for the fourth class<br>
>> in the list (I checked this only twice so far).<br>
><br>
> Thanks. It would be good to know if another process (for example the<br>
> finalization process) is inside the critical section, or the semaphore is<br>
> left without being signaled.<br>
<br>
As far as I can tell, there can only be two processes which access the<br>
WeakRegistry. One of them is the process running the JVM startup code, the<br>
other one would be the finalization process. JNIPort does not fork other<br>
processes. How could this be analyzed? By instrumenting the finalization<br>
process? How? In VisualWorks, there are code probes which can be used to<br>
monitor variables and more - does something similar exist in Squeak?<br>
<br>
>> What do you mean by "the jvm just failed to start"? Does it mean that the<br>
>> jvm.dll could not be found, i.e. the JNIPortJNIInterface could not load the<br>
>> library?<br>
><br>
> Exactly. Do I have to tell the path to the dll somewhere?<br>
<br>
As far as I know, Alien does not yet accept paths to a library from<br>
Smalltalk.</blockquote><div><br></div><div>I don't understand this. Of course Alien accepts paths to libraries from Smalltalk. Look at Alien class>>primLoadLibrary:, which is wrapped by Alien class>>lookup: symbol inLibrary: libraryName.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> I have not used it on Windows, so I don't know what has to be<br>
done there. The jvm.dll is typically located at<br>
C:\Program Files\Java\jre1.6.0_NN\bin\client\jvm.dll<br>
where NN is the patch level of the JRE.</blockquote><div><br></div><div>So you do something like</div><div><br></div><div>entrypoint := Alien lookup: theJREentrypoint inLibrary: 'C:\Program Files\Java\jre1.6.0_NN\bin\client\jvm.dll' </div>
<div><br></div><div>and call through that. Look at Alien class examples.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> You could try adding the "client"<br>
directory to your PATH. If this doesn't help, try copying jvm.dll into the<br>
directory where the Squeak VM is installed, but I think this might not work.<br>
I faintly remember reading somewhere that on Windows, the jvm.dll looks for<br>
other dlls in ".." relative to its own location, and that this seems to be<br>
hardwired. I don't know for sure, however. Someone who knows more about<br>
Alien might know what to do (Eliot Miranda, John McIntosh,...).<br>
<font color="#888888"><br>
Joachim<br></font></blockquote><div><br></div><div>HTH</div><div>Eliot </div></div><br>