Thread blocked in wait state makes Forte erratic...

If a program executed within Forte becomes deadlocked because a thread

is blocked in a waiting state and the program is terminated (using

Terminate Process) Forte behaves erratically...no longer able to

compile/execute programs, open/save files, etc...

The following simple program illustrates this.

-

public class TestThread implements Runnable {

public static void main (String args[]) {

Thread t = new Thread(new TestThread());

t.start();

}

public void run() {

System.out.println("Trapped!");

synchronized(this) {

try {

wait();

}catch(InterruptedException e) {}

}

}

}

-

Product Version = Forte for Java, CE v. 2 Beta (Build 1067)

IDE Versioning= IDE/1 spec=1.1 impl=Build 1067

Operating System = Windows 95 Version 4.0 Running on x86

Java Version = 1.3.0rc3

Java VM Version = Java HotSpot(TM) Client VM 1.3.0rc3-Z

Java Vendor = Sun Microsystems Inc.

Java Vendor URL = http://java.sun.com/

Java Home= C:\JDK1.3\JRE

Java Class Version= 47.0

System Locale= en_US

JIT = unknown or not used

Home Dir= C:\WINDOWS

Current Directory= C:\forte4j

Forte for Java Home= c:\FORTE4J

Forte for Java User Home = c:\FORTE4J

System Directory = c:\FORTE4J\system

CLASSPATH=

;c:\FORTE4J\lib;c:\FORTE4J\lib\developer.jar;c:\FORTE4J\lib\openide.jar;

C:\JDK1.3\jre\lib\i18n.jar;C:\JDK1.3\lib\tools.jar;C:\JDK1.3\lib\dt.jar;

c:\FORTE4J\lib\ext\JDBC20X.ZIP;c:\FORTE4J\lib\ext\ABSOLU~1.JAR;c:\FORTE4

J\lib\ext\JAVAC.JAR;c:\FORTE4J\lib\ext\JAXP.JAR;c:\FORTE4J\lib\ext\JH.JA

R;c:\FORTE4J\lib\ext\PARSER.JAR;c:\FORTE4J\lib\ext\REGEXP.JAR;c:\FORTE4J

\lib\ext\SERVLET.JAR;c:\FORTE4J\lib\ext\DDL.JAR;c:\FORTE4J\lib\ext\IDB.J

AR;c:\FORTE4J\lib\ext\JTA-SP~1.JAR;

-

[INFO] Loaded modules: org.netbeans.modules.clazz/1 (1.2/1067);

org.netbeans.modules.html/1 (1.2/1067);

org.netbeans.modules.httpserver/1 (1.2/1067);

org.netbeans.modules.icebrowser/1 (1.2/1067);

org.netbeans.modules.image/1 (1.2/1067);

org.netbeans.modules.properties/1 (1.2/1067);

org.netbeans.modules.text/1 (1.2/1067);

org.netbeans.modules.usersguide/1 (1.2/1067); org.openidex.util/1

(1.2/1067); org.netbeans.modules.autoupdate/1 (1.2/1067);

org.netbeans.modules.debugger.core/1 (1.1.4/1067);

org.netbeans.modules.applet/1 (1.2/1067);

org.netbeans.modules.debugger.debug/1 (1.4/1067);

org.netbeans.modules.debugger.jpda/1 (1.4/1067);

org.netbeans.modules.editor/1 (1.3/1067);

org.netbeans.modules.jarpackager/1 (1.2/1067);

org.netbeans.modules.java/1 (1.2/1067); org.netbeans.modules.beans/1

(1.2/1067); org.netbeans.modules.form/1 (1.2/1067);

org.netbeans.modules.i18n/1 (1.2/1067); org.netbeans.modules.javadoc/1

(1.2/1067); org.netbeans.modules.objectbrowser/1 (1.2/1067);

org.netbeans.modules.projects/1 (1.2/1067);

org.netbeans.modules.utilities/1 (1.2/1067);

org.netbeans.modules.vcs.cmdline/1 (1.3/1067);

org.netbeans.modules.web.core/1 (1.1.2/1067); org.netbeans.modules.rmi/1

(1.2/1067); org.netbeans.modules.db/1 (1.2/1067);

org.netbeans.modules.jdbc/1 (1.0.9/1067)

--

Matt

[3392 byte] By [I.,Matt] at [2007-11-25 16:50:06]
# 1

I could not reproduce the problem in a similar environment. I used FFJ build 1067, JDK1.3.0, Win98 SE, 320MB RAM. I had some problems with the IDE startup and with the execution window disappearing, but I could still compile and execute. I believe the problems I saw resulted from the known issue with zip.dll access conflicts during startup. I also tested with the stable build 842, and had no problems at all.

I have two suggestions. (1) Try build 842. Let us know if you get the same problem with build 842. (2) Eliminate possible memory conflicts with non-IDE background apps that are launched during Windows startup. Use the cleanup procedure described in http://cgi.netbeans.com/cgi-bin/webx | Knowledge Base | Configuration | article "Java causes invalid page fault in module Kernel32.DLL - Windows 98"

Vaughn Spurlin - Sun Microsystems

> If a program executed within Forte becomes deadlocked because a thread is blocked in a waiting state and the program is terminated (using Terminate Process) Forte behaves erratically...no longer able to compile/execute programs, open/save files, etc...

> The following simple program illustrates this.

> -

>

<pre>

package userCode;

public class TestThread implements Runnable {

public static void main (String args[]) {

Thread t = new Thread(new TestThread());

t.start();

}

public void run() {

System.out.println("Trapped!");

synchronized(this) {

try {

wait ();

}catch(InterruptedException e) {}

}

}

}

</pre>

Spurlin,Vaughn at 2007-7-2 23:47:30 > top of Java-index,Archived Forums,Sun ONE Studio 4...