Hi,
I am using Tcl 8.3.0 with tclBlend 1.3.0 (with the code for the testthread
command compiled in) and Java JS2E v1.3 beta. When my software first
starts, I need to invoke a static Java method, and then later I need to
spawn a Tcl thread that invokes more Java methods (both static and instance
methods). I find that the Tcl thread's Java invocation does not work, as
demonstrated by the following code snippet:
1 package require java
2 java::call Integer parseInt 3
3 set th [testthread create]
4 testthread send $th [list set env(LD_LIBRARY_PATH)
$env(LD_LIBRARY_PATH)]
5 testthread send $th [list package require java]
6 testthread send $th [list java::call Integer parseInt 3]
[Line numbers above are just for discussion, they're not in the actual tcl
script file.]
Basically, if you create a thread and then try to send it some tclblend
commands to run, it doesn't work right. The "package require java" at
line 5 causes the following error output:
#
# HotSpot Virtual Machine Error, Unexpected Signal 11
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F534F4C415249530E4350500820 01
#
# Problematic Thread: Segmentation fault
If I don't do the "package require java" at line 5, Tcl complains 'invalid
command name "java::call"'
If you remove lines 1-2 in the code snippet, it works. I could hack around
this problem by changing the structure of my system to create threads before
it does any tcl/java calls, but that would be kind of a screwy way to
structure my software and I'm hoping not to have to do that. So, any
suggestions would be greatly appreciated.
thanks,
- Mike Schwartz
----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
An archive is available at http://www.mail-archive.com/[email protected]