-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.1.8, 1.2.0, 1.2.1
-
generic, x86
-
generic, windows_95, windows_98, windows_nt
n of amount
amount);
totalDebits[select]+=amount; //Keep total debit tally
//Wait until the second clerk is free
while(clerk2.isBusy())
try
{
Thread.sleep(25);
}
catch(InterruptedException e)
{
System.out.println(e);
}
clerk2.doTransaction(transaction); //Now do the debit
}
//Wait until both clerks are done
while(clerk1.isBusy()||clerk2.isBusy())
try
{
Thread.sleep(25);
}
catch(InterruptedException e)
{
System.out.println(e);
}
//Now output the results
for(int i=0;i<accounts.length;i++)
System.out.println(
"Original balance :$"+initialBalance[i]+"\n"+
"Total credits :$"+totalCredits[i]+"\n"+
"Total debits :$"+totalDebits[i]+"\n"+
"Final balance :$"+accounts[i].getBalance()+"\n"+
"Should be :$"+(initialBalance[i]+totalCredits[i]-totalDebits[i]));
}
}
Account.java
/*
// header - edit "Data/yourJavaHeader" to customize
// contents - edit "EventHandlers/Java file/onCreate" to customize
//
*/
//Defines a customer account
public class Account
{
//Constructor
public Account(int accountNumber, int balance)
{
this.accountNumber=accountNumber; //set the account number
this.balance=balance; //Set the initial balance
}
//return the current balance
public int getBalance()
{
return balance;
}
//Set the current balance
public void setBalance(int balance)
{
this.balance=balance;
}
public int getAccountNumber()
{
return accountNumber;
}
public String toString()
{
return "A//C No. "+accountNumber+" : $"+balance;
}
private int balance; // The current account balance
private int accountNumber; //Identifies this account
}
clerk.java
/*
// header - edit "Data/yourJavaHeader" to customize
// contents - edit "EventHandlers/Java file/onCreate" to customize
//
*/
public class Clerk implements Runnable
{
private Bank theBank; //The employer - an electronic marvel
private Transaction inTray; //The in-Tray holding a transaction
//Constructor
public Clerk(Bank theBank)
{
this.theBank=theBank; //Who the clerk works for
inTray=null;
}
//Receive a transaction
public void doTransaction(Transaction transaction)
{
inTray=transaction;
}
//the working clerk
public void run()
{
while(true)
{
while(inTray==null)//No transaction waiting?
{
try
{
Thread.sleep(150); //Then take a break
}
catch(InterruptedException e)
{
System.out.println(e);
}
}
theBank.doTransaction(inTray);
inTray=null;//In-Tray is empty
}
}
//busy Check
public boolean isBusy()
{
return inTray !=null;
}
}
FYI I was using JPADPro3.7 build 315 as my IDE
(Review ID: 94961)
======================================================================
Name: skT88420 Date: 10/14/99
Here is a relevant piece of source code:
-----------------------------------------------------
public class BugReport
{
public static void main(String args[])
{
String sOne[] = { "string1" };
String sTwo[] = { "string2" };
for(int i=0; i<1; i++)
{
System.out.println("ONE"+sOne[i]+"THREE");
System.out.println(sTwo[i]);
System.out.println(sOne[i]);
}
}
}
-----------------------------------------------------
Whenever the above code is executed, the following displays
on the console:
-----------------------------------------------------
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive'
has occurred in :
'BugReport.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
-----------------------------------------------------
For your convenience, here is the o/p of 'java -version'/'java -fullversion':
-----------------------------------------------------
O/p of 'java -version':
java version "1.2"
Classic VM (build JDK-1.2-V, native threads)
O/p of 'java -fullversion':
java full version "JDK-1.2-V"
-----------------------------------------------------
(Review ID: 96580)
======================================================================
Name: krT82822 Date: 11/24/99
a non fatal internal JIT (3.00.078(x)) error 'binaryNonCommunitive has occured
in : 's11.main([l java/lang/String;)V' interpreting method . please report this
at java.sun.com/cgi-bin/bugreport.cgi
for(int ht = 0 ; ht < nq ; ht++)
{
sqlQid[ht] = "SELECT [question].
[Question_text], [question].[Complexity_id]," +
" [options].
[Option_text], [options].[Option_type] FROM topic," +
" situation,
situation_x_question, question, complexity," +
" question_x_options,
options WHERE " +
"((([question].
[Complexity_id])=[complexity].[complexity_id])" +
" And (([topic].
[Topic_Id])=[situation].[topic_id])" +
" And (([situation].
[Situation_id])=[situation_x_question].[situation_id]) " +
" And
(([situation_x_question].[Question_id])=[question].[question_id]) " +
"And ([question].
[Question_id])=[question_x_options].[question_id]) " +
"And
(([question_x_options].[Option_id])=[options].[option_id]) " +
" And (([question].
[Question_id])=" + qidsOk[ht] + ")";
res_opt[ht] = stmt.executeQuery(sqlQid[ht]);
// filling of resultset ok till here
System.out.print(qidsOk[ht]);
}
now any res_opt[2] or now any res_opt[12] give output of last resultset produced
(Review ID: 98228)
======================================================================
Name: skT88420 Date: 01/05/2000
java version "1.2.1"
Classic VM (build JDK-1.2.1-A, native threads)
The bug occured only once for me; I know that a nuber crunching program was
running in parallel, and I got some message "JIT out of memory" before; I then
stopped the number crunching program, compiled my test program again. When I
started it, I got the error message.
D:\Strategie\ddame\classes>java FigurBat>>TestFigur.txt
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred
in :
'FigurBat.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cg
i
D:\Strategie\ddame\classes>
I am almost sure the bug will disappear if I load Win95 again; therefore, the
bug is not a real problem for me
(Review ID: 99591)
======================================================================
Name: krT82822 Date: 02/06/2000
$java -version
java version "1.2"
Classic VM (build JDK-1.2-V, native threads)
$cat Test.java
/*
* Copyright 2000 by Dixite,
* 179 Av. Louise, Brussels, Belgium.
* All rights reserved.
*
* Revision history at end of file
*/
import java.io.*;
class Test {
/**
** Default constructor
**/
public Test() {
}
public static void main(String[] args) {
try {
byte[] inBuffer = new byte[0x100];
for (int byteIdx = 0x00; byteIdx<0x100; byteIdx++) inBuffer[byteIdx] =
(byte)byteIdx;
ByteArrayInputStream inStream = new ByteArrayInputStream(inBuffer);
InputStreamReader reader = new InputStreamReader(inStream, "Cp1252");
ByteArrayOutputStream outStream = new ByteArrayOutputStream(0x100);
OutputStreamWriter writer = new OutputStreamWriter(outStream, "Cp1252");
char[] unicodeBuffer = new char[0x100];
int idx=0;
while (reader.ready()) {
if (idx>=0x100) break;
writer.write(unicodeBuffer[idx++]=(char)reader.read());
}
writer.close();
reader.close();
byte[] outBuffer = outStream.toByteArray();
int errorsCount = 0;
for (int byteIdx = 0x00; byteIdx<0x100; byteIdx++) {
System.out.print(
"0x"+Integer.toHexString((0X100|inBuffer[byteIdx])&0xFF)
+"\t-> "+
"\\u"+Integer.toHexString((0X10000|unicodeBuffer[byteIdx])&0xFFFF)
+"\t-> "+
"0x"+Integer.toHexString((0X100|outBuffer[byteIdx])&0xFF)
);
if (inBuffer[byteIdx]!=outBuffer[byteIdx]) {
errorsCount++;
System.out.print(" ** NO MATCH **");
}
System.out.println();
}
System.out.println(errorsCount+" errors found");
} catch (Exception e) { e.printStackTrace(System.out); }
}
}
/*
* $Log: Test.java,v $
* Revision 1.1 2000-01-31 18:31:47+01 avm
* Tasks 4.7 & 4.8 : Temporary ci
*
*/
$javac Test.java
$java Test
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred
in :
'Test.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-
bin/bugreport.cgi
(...)
(Review ID: 100879)
======================================================================
Name: vi73552 Date: 03/31/99
I was trying some demo programs using threads, and
I got the following error message, when I try to run the
program, but the program ran eventually, and gave me correct
results.
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred in :
'BankOperation.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
(Review ID: 56336)
======================================================================
Name: skT88420 Date: 05/26/99
1. I am currently running sample programs on a Windows NT via MS-DOS.
When I first executed the attached program, the error did not occur. I then copied the program with a different name, recompiled and ran the second program. The result was also fine.
Then I ran the first program again. The program gave out the error.
2. First program:
public class Example5{
public static void main(String arg[]){
int goukei, i, rieki=10;
int shina[][]={{100,2,0}, {200,1,0}, {150,1,0}};
String namae[]={"pencil", "note", "eraser"};
// int shina[][] = new int[10][3];
// shina[0][0]= 100; shina[0][1]= 2;
// shina[1][0]= 200; shina[1][1]= 1;
// shina[2][0]= 150; shina[2][1]= 1;
// String namae[]=new String[10];
// namae[0]="pencil"; namae[1]="note"; namae[2]="eraser";
System.out.println("namae.l="+namae.length);
//
for(i=0; i<namae.length; i=i+1){
shina[i][2]=shina[i][0]+rieki;
System.out.print(namae[i]+"\t"+shina[i][0]+"\t"+shina[i][2]);
if((double)rieki < (double)(shina[i][0])*0.1)
{System.out.println("\t ---- less than 10%.");
shina[i][2] =(int)((double)shina[i][0] *1.1);
System.out.println("\t\t"+shina[i][2]);}
else System.out.println("\t ok.");
}
}
}
Second program
public class Test5{
public static void main(String arg[]){
int goukei, i, rieki=10;
// int shina[][]={{100,2,0}, {200,1,0}, {150,1,0}};
// String namae[]={"pencil", "note", "eraser"};
int shina[][] = new int[3][3];
shina[0][0]= 100; shina[0][1]= 2;
shina[1][0]= 200; shina[1][1]= 1;
shina[2][0]= 150; shina[2][1]= 1;
String namae[]=new String[3];
namae[0]="pencil"; namae[1]="note"; namae[2]="eraser";
System.out.println("namae.l="+namae.length);
//
for(i=0; i<namae.length; i=i+1){
shina[i][2]=shina[i][0]+rieki;
System.out.print(namae[i]+"\t"+shina[i][0]+"\t"+shina[i][2]);
if((double)rieki < (double)(shina[i][0])*0.1)
{System.out.println("\t ---- less than 10%.");
shina[i][2] =(int)((double)shina[i][0] *1.1);
System.out.println("\t\t"+shina[i][2]);}
else System.out.println("\t ok.");
}
}
}
3. When I executed the program, the following error was displayed but otherwise, the program printed out the output correctly.
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred in:
'Example5.main ([Ljava/lang/String;)V: Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
4. None
5. java -version
java version "1.2.1"
Classic VM (build JDK-1.2.1-A, native threads)
java -fullversion
java full version "JDK-1.2.1-A"
6. I tried everything after the error, recompile the program, exit and reenter MS-DOS, restart the Windows Nt; but Example5 gives the error now 100%.
I do not think that I have a special environment, but am not sure as to what to check with this Java error.
(Review ID: 83474)
======================================================================
Name: skT88420 Date: 06/08/99
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred
in :
'dtlamla1.txtMakeLoads ()Ljava/lang/String;': Interpreting method.
java version "1.1.8"
java full version "JDK1.1.8M"
The Java application executed with JDK 1.1.6
(Review ID: 84082)
======================================================================
Name: skT88420 Date: 06/29/99
1. I really don't know how to reproduce it...
2.(I messed with the indent to keep everything on the same line)
public class Dates
{
public static void main(String[] args)
{
String[] string = new String[10];
string[0] = "5/8/64";
string[1] = "1/5/38";
string[2] = "3/6/67";
string[3] = "12/30/93";
string[4] = "10/28/86";
string[5] = "5/29/51";
string[6] = "11/15/39";
string[7] = "2/5/37";
string[8] = "4/18/95";
string[9] = "6/3/45";
int[] day = new int[10];
for(int i = 0; i < 10; i++)
day[i] = (int)Math.round((Math.random() * 6.0)) + 1;
String[] wordDay = new String[10];
for(int i = 0; i < 10; i++)
{
switch(Integer.parseInt(wordDay[i]))
{
case 1:
wordDay[i] = "Sunday";
break;
case 2:
wordDay[i] = "Monday";
break;
case 3:
wordDay[i] = "Tuesday";
break;
case 4:
wordDay[i] = "Wednesday";
break;
case 5:
wordDay[i] = "Thursday";
break;
case 6:
wordDay[i] = "Friday";
break;
case 7:
wordDay[i] = "Saturday";
break;
}
}
int index = 0;
int endIndex = 0;
String[] month = new String[10];
String[] dayDate = new String[10];
String[] year = new String[10];
for(int i = 0; i < 10; i++)
{
index = string[i].indexOf('/');
month[i] = string[i].substring(1, index);
endIndex = string[i].indexOf('/', index+1);
dayDate[i] = string[i].substring(index,endIndex);
year[i] = string[i].substring(endIndex);
}
String[] wordMonth = new String[10];
for(int i = 0; i < 10; i++)
{
switch(Integer.parseInt(month[i]))
{
case 1:
wordMonth[i] = "January";
break;
case 2:
wordMonth[i]= "February";
break;
case 3:
wordMonth[i] = "March";
break;
case 4:
wordMonth[i] = "April";
break;
case 5:
wordMonth[i] = "May";
break;
case 6:
wordMonth[i] = "June";
break;
case 7:
wordMonth[i] = "July";
break;
case 8:
wordMonth[i] = "August";
break;
case 9:
wordMonth[i]="September";
break;
case 10:
wordMonth[i] = "October";
break;
case 11:
wordMonth[i] ="November";
break;
case 12:
wordMonth[i] ="December";
break;
}
}
for(int i = 0; i < 12; i++)
{
System.out.print(wordDay[i] + " ");
if(Integer.parseInt(dayDate[i]) == 1)
System.out.print(dayDate[i]+"st");
else if(Integer.parseInt(dayDate[i])==2)
System.out.print(dayDate[i] + "nd");
else if(Integer.parseInt(dayDate[i])==3)
System.out.print(dayDate[i] + "rd");
else
System.out.print(dayDate + "th");
System.out.print(" " + wordMonth[i]);
System.out.print(" 19" + year[i] + "\n");
}
}
}
3.
c:\jdk1.2\bin\java.exe Dates
Working Directory - C:\Java Examples\DatesClass Path - .\;.;C:\Program Files\kawa\kawaclasses.zip;c:\jdk1.2\lib\tools.jar;c:\jdk1.2\jre\lib\rt.jar
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred in :
'Dates.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Compiled Code)
at java.lang.Integer.parseInt(Integer.java:458)
at Dates.main(Dates.java:26)
Exception in thread "main" Process Exit...
5.
java version "1.2"
Classic VM(build JDK-1.2-V, native threads
JAVA.EXE full version "JDK-1.2-V"
(Review ID: 84995)
======================================================================
Name: skT88420 Date: 09/07/99
This is not a new bug error. The work around section contains
additional information from the previously reported error.
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred in :
'BankOperation1.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
This error occurred when reproducing the code in BankOperations in
the well known Ivor Horton book "Beginning Java 2"
The version was on page 505, however, I did not synchronize the method in the Bank.java class as
an experiment
The output to java-version is
java version "1.2.1"
classic VM(Build JDK-1.2.1-A, native threads)
output for java full version
java.exe full version "JDK-1.2.1-A"
Here is the code in the application that produced this problem
BankOperation1.java
*
// header - edit "Data/yourJavaHeader" to customize
// contents - edit "EventHandlers/Java file/onCreate" to customize
//
*/
import java.util.Random;
import java.io.*;
public class BankOperation1
{
public static void main(String[] args)
{
int[] initialBalance={500,800}; //The initial account balance
int[] totalCredits=new int[initialBalance.length]; //Total credits on the account
int[] totalDebits=new int[initialBalance.length]; //Total debits on the account
int transactionCount=20; //Number of debits and credits
//Create the the bank and the clerks
Bank theBank=new Bank();
Clerk clerk1=new Clerk(theBank);
Clerk clerk2=new Clerk(theBank);
//Create the accounts and initialize the total credits and debits
Account[] accounts=new Account[initialBalance.length];//Create an account
for(int i=0;i<initialBalance.length;i++)
{
accounts[i]=new Account(i+1,initialBalance[i]); //Create accounts
totalCredits[i]=totalDebits[i]=0;
}
//Create the threads for the clerks as daemon and start them off
Thread clerk1Thread=new Thread(clerk1);
Thread clerk2Thread=new Thread(clerk2);
clerk1Thread.setDaemon(true);
clerk2Thread.setDaemon(true);
clerk1Thread.start();
clerk2Thread.start();
//Generate the transactions for each type and pass to the clerks
Random rand=new Random(); //Random number generator
Transaction transaction; //Stores a transaction
int amount; //Stores an amount of money
int select; //Selects an account
for(int i=1; i<=transactionCount;i++)
{
//Generates a random account index for credit operation
select=rand.nextInt(accounts.length);
amount=50+rand.nextInt(26);
transaction=new Transaction(accounts[select], //Account
Transaction.CREDIT, //It's a credit transaction
amount); //of this amount
totalCredits[select]+=amount; //Keep total credit tally
//Wait until the first clerk is free
while(clerk1.isBusy())
try
{
Thread.sleep(27); //Busy so try later
}
catch(InterruptedException e)
{
System.out.println(e);
}
clerk1.doTransaction(transaction); //Now do the credit
//Generate a random account index for debit operations
select=rand.nextInt(accounts.length);
amount=30+rand.nextInt(31); //Generate amount of $30 to $60
transaction = new Transaction(accounts[select], //The account
Transaction.DEBIT, //Debit transaction of amount
amount);
totalDebits[select]+=amount; //Keep total debit tally
//Wait until the second clerk is free
while(clerk2.isBusy())
try
{
Thread.sleep(25);
}
catch(InterruptedException e)
{
System.out.println(e);
}
clerk2.doTransaction(transaction); //Now do the debit
}
//Wait until both clerks are done
while(clerk1.isBusy()||clerk2.isBusy())
try
{
Thread.sleep(25);
}
catch(InterruptedException e)
{
System.out.println(e);
}
//Now output the results
for(int i=0;i<accounts.length;i++)
System.out.println(
"Original balance :$"+initialBalance[i]+"\n"+
"Total credits :$"+totalCredits[i]+"\n"+
"Total debits :$"+totalDebits[i]+"\n"+
"Final balance :$"+accounts[i].getBalance()+"\n"+
"Should be :$"+(initialBalance[i]+totalCredits[i]-totalDebits[i]));
}
}
Bank.java
*
// header - edit "Data/yourJavaHeader" to customize
// contents - edit "EventHandlers/Java file/onCreate" to customize
//
*/
import java.util.Random;
import java.io.*;
public class BankOperation1
{
public static void main(String[] args)
{
int[] initialBalance={500,800}; //The initial account balance
int[] totalCredits=new int[initialBalance.length]; //Total credits on the account
int[] totalDebits=new int[initialBalance.length]; //Total debits on the account
int transactionCount=20; //Number of debits and credits
//Create the the bank and the clerks
Bank theBank=new Bank();
Clerk clerk1=new Clerk(theBank);
Clerk clerk2=new Clerk(theBank);
//Create the accounts and initialize the total credits and debits
Account[] accounts=new Account[initialBalance.length];//Create an account
for(int i=0;i<initialBalance.length;i++)
{
accounts[i]=new Account(i+1,initialBalance[i]); //Create accounts
totalCredits[i]=totalDebits[i]=0;
}
//Create the threads for the clerks as daemon and start them off
Thread clerk1Thread=new Thread(clerk1);
Thread clerk2Thread=new Thread(clerk2);
clerk1Thread.setDaemon(true);
clerk2Thread.setDaemon(true);
clerk1Thread.start();
clerk2Thread.start();
//Generate the transactions for each type and pass to the clerks
Random rand=new Random(); //Random number generator
Transaction transaction; //Stores a transaction
int amount; //Stores an amount of money
int select; //Selects an account
for(int i=1; i<=transactionCount;i++)
{
//Generates a random account index for credit operation
select=rand.nextInt(accounts.length);
amount=50+rand.nextInt(26);
transaction=new Transaction(accounts[select], //Account
Transaction.CREDIT, //It's a credit transaction
amount); //of this amount
totalCredits[select]+=amount; //Keep total credit tally
//Wait until the first clerk is free
while(clerk1.isBusy())
try
{
Thread.sleep(27); //Busy so try later
}
catch(InterruptedException e)
{
System.out.println(e);
}
clerk1.doTransaction(transaction); //Now do the credit
//Generate a random account index for debit operations
select=rand.nextInt(accounts.length);
amount=30+rand.nextInt(31); //Generate amount of $30 to $60
transaction = new Transaction(accounts[select], //The account
Transaction.DEBIT, //Debit transactio
amount);
totalDebits[select]+=amount; //Keep total debit tally
//Wait until the second clerk is free
while(clerk2.isBusy())
try
{
Thread.sleep(25);
}
catch(InterruptedException e)
{
System.out.println(e);
}
clerk2.doTransaction(transaction); //Now do the debit
}
//Wait until both clerks are done
while(clerk1.isBusy()||clerk2.isBusy())
try
{
Thread.sleep(25);
}
catch(InterruptedException e)
{
System.out.println(e);
}
//Now output the results
for(int i=0;i<accounts.length;i++)
System.out.println(
"Original balance :$"+initialBalance[i]+"\n"+
"Total credits :$"+totalCredits[i]+"\n"+
"Total debits :$"+totalDebits[i]+"\n"+
"Final balance :$"+accounts[i].getBalance()+"\n"+
"Should be :$"+(initialBalance[i]+totalCredits[i]-totalDebits[i]));
}
}
Account.java
/*
// header - edit "Data/yourJavaHeader" to customize
// contents - edit "EventHandlers/Java file/onCreate" to customize
//
*/
//Defines a customer account
public class Account
{
//Constructor
public Account(int accountNumber, int balance)
{
this.accountNumber=accountNumber; //set the account number
this.balance=balance; //Set the initial balance
}
//return the current balance
public int getBalance()
{
return balance;
}
//Set the current balance
public void setBalance(int balance)
{
this.balance=balance;
}
public int getAccountNumber()
{
return accountNumber;
}
public String toString()
{
return "A//C No. "+accountNumber+" : $"+balance;
}
private int balance; // The current account balance
private int accountNumber; //Identifies this account
}
clerk.java
/*
// header - edit "Data/yourJavaHeader" to customize
// contents - edit "EventHandlers/Java file/onCreate" to customize
//
*/
public class Clerk implements Runnable
{
private Bank theBank; //The employer - an electronic marvel
private Transaction inTray; //The in-Tray holding a transaction
//Constructor
public Clerk(Bank theBank)
{
this.theBank=theBank; //Who the clerk works for
inTray=null;
}
//Receive a transaction
public void doTransaction(Transaction transaction)
{
inTray=transaction;
}
//the working clerk
public void run()
{
while(true)
{
while(inTray==null)//No transaction waiting?
{
try
{
Thread.sleep(150); //Then take a break
}
catch(InterruptedException e)
{
System.out.println(e);
}
}
theBank.doTransaction(inTray);
inTray=null;//In-Tray is empty
}
}
//busy Check
public boolean isBusy()
{
return inTray !=null;
}
}
FYI I was using JPADPro3.7 build 315 as my IDE
(Review ID: 94961)
======================================================================
Name: skT88420 Date: 10/14/99
Here is a relevant piece of source code:
-----------------------------------------------------
public class BugReport
{
public static void main(String args[])
{
String sOne[] = { "string1" };
String sTwo[] = { "string2" };
for(int i=0; i<1; i++)
{
System.out.println("ONE"+sOne[i]+"THREE");
System.out.println(sTwo[i]);
System.out.println(sOne[i]);
}
}
}
-----------------------------------------------------
Whenever the above code is executed, the following displays
on the console:
-----------------------------------------------------
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive'
has occurred in :
'BugReport.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
-----------------------------------------------------
For your convenience, here is the o/p of 'java -version'/'java -fullversion':
-----------------------------------------------------
O/p of 'java -version':
java version "1.2"
Classic VM (build JDK-1.2-V, native threads)
O/p of 'java -fullversion':
java full version "JDK-1.2-V"
-----------------------------------------------------
(Review ID: 96580)
======================================================================
Name: krT82822 Date: 11/24/99
a non fatal internal JIT (3.00.078(x)) error 'binaryNonCommunitive has occured
in : 's11.main([l java/lang/String;)V' interpreting method . please report this
at java.sun.com/cgi-bin/bugreport.cgi
for(int ht = 0 ; ht < nq ; ht++)
{
sqlQid[ht] = "SELECT [question].
[Question_text], [question].[Complexity_id]," +
" [options].
[Option_text], [options].[Option_type] FROM topic," +
" situation,
situation_x_question, question, complexity," +
" question_x_options,
options WHERE " +
"((([question].
[Complexity_id])=[complexity].[complexity_id])" +
" And (([topic].
[Topic_Id])=[situation].[topic_id])" +
" And (([situation].
[Situation_id])=[situation_x_question].[situation_id]) " +
" And
(([situation_x_question].[Question_id])=[question].[question_id]) " +
"And ([question].
[Question_id])=[question_x_options].[question_id]) " +
"And
(([question_x_options].[Option_id])=[options].[option_id]) " +
" And (([question].
[Question_id])=" + qidsOk[ht] + ")";
res_opt[ht] = stmt.executeQuery(sqlQid[ht]);
// filling of resultset ok till here
System.out.print(qidsOk[ht]);
}
now any res_opt[2] or now any res_opt[12] give output of last resultset produced
(Review ID: 98228)
======================================================================
Name: skT88420 Date: 01/05/2000
java version "1.2.1"
Classic VM (build JDK-1.2.1-A, native threads)
The bug occured only once for me; I know that a nuber crunching program was
running in parallel, and I got some message "JIT out of memory" before; I then
stopped the number crunching program, compiled my test program again. When I
started it, I got the error message.
D:\Strategie\ddame\classes>java FigurBat>>TestFigur.txt
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred
in :
'FigurBat.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cg
i
D:\Strategie\ddame\classes>
I am almost sure the bug will disappear if I load Win95 again; therefore, the
bug is not a real problem for me
(Review ID: 99591)
======================================================================
Name: krT82822 Date: 02/06/2000
$java -version
java version "1.2"
Classic VM (build JDK-1.2-V, native threads)
$cat Test.java
/*
* Copyright 2000 by Dixite,
* 179 Av. Louise, Brussels, Belgium.
* All rights reserved.
*
* Revision history at end of file
*/
import java.io.*;
class Test {
/**
** Default constructor
**/
public Test() {
}
public static void main(String[] args) {
try {
byte[] inBuffer = new byte[0x100];
for (int byteIdx = 0x00; byteIdx<0x100; byteIdx++) inBuffer[byteIdx] =
(byte)byteIdx;
ByteArrayInputStream inStream = new ByteArrayInputStream(inBuffer);
InputStreamReader reader = new InputStreamReader(inStream, "Cp1252");
ByteArrayOutputStream outStream = new ByteArrayOutputStream(0x100);
OutputStreamWriter writer = new OutputStreamWriter(outStream, "Cp1252");
char[] unicodeBuffer = new char[0x100];
int idx=0;
while (reader.ready()) {
if (idx>=0x100) break;
writer.write(unicodeBuffer[idx++]=(char)reader.read());
}
writer.close();
reader.close();
byte[] outBuffer = outStream.toByteArray();
int errorsCount = 0;
for (int byteIdx = 0x00; byteIdx<0x100; byteIdx++) {
System.out.print(
"0x"+Integer.toHexString((0X100|inBuffer[byteIdx])&0xFF)
+"\t-> "+
"\\u"+Integer.toHexString((0X10000|unicodeBuffer[byteIdx])&0xFFFF)
+"\t-> "+
"0x"+Integer.toHexString((0X100|outBuffer[byteIdx])&0xFF)
);
if (inBuffer[byteIdx]!=outBuffer[byteIdx]) {
errorsCount++;
System.out.print(" ** NO MATCH **");
}
System.out.println();
}
System.out.println(errorsCount+" errors found");
} catch (Exception e) { e.printStackTrace(System.out); }
}
}
/*
* $Log: Test.java,v $
* Revision 1.1 2000-01-31 18:31:47+01 avm
* Tasks 4.7 & 4.8 : Temporary ci
*
*/
$javac Test.java
$java Test
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred
in :
'Test.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-
bin/bugreport.cgi
(...)
(Review ID: 100879)
======================================================================
Name: vi73552 Date: 03/31/99
I was trying some demo programs using threads, and
I got the following error message, when I try to run the
program, but the program ran eventually, and gave me correct
results.
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred in :
'BankOperation.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
(Review ID: 56336)
======================================================================
Name: skT88420 Date: 05/26/99
1. I am currently running sample programs on a Windows NT via MS-DOS.
When I first executed the attached program, the error did not occur. I then copied the program with a different name, recompiled and ran the second program. The result was also fine.
Then I ran the first program again. The program gave out the error.
2. First program:
public class Example5{
public static void main(String arg[]){
int goukei, i, rieki=10;
int shina[][]={{100,2,0}, {200,1,0}, {150,1,0}};
String namae[]={"pencil", "note", "eraser"};
// int shina[][] = new int[10][3];
// shina[0][0]= 100; shina[0][1]= 2;
// shina[1][0]= 200; shina[1][1]= 1;
// shina[2][0]= 150; shina[2][1]= 1;
// String namae[]=new String[10];
// namae[0]="pencil"; namae[1]="note"; namae[2]="eraser";
System.out.println("namae.l="+namae.length);
//
for(i=0; i<namae.length; i=i+1){
shina[i][2]=shina[i][0]+rieki;
System.out.print(namae[i]+"\t"+shina[i][0]+"\t"+shina[i][2]);
if((double)rieki < (double)(shina[i][0])*0.1)
{System.out.println("\t ---- less than 10%.");
shina[i][2] =(int)((double)shina[i][0] *1.1);
System.out.println("\t\t"+shina[i][2]);}
else System.out.println("\t ok.");
}
}
}
Second program
public class Test5{
public static void main(String arg[]){
int goukei, i, rieki=10;
// int shina[][]={{100,2,0}, {200,1,0}, {150,1,0}};
// String namae[]={"pencil", "note", "eraser"};
int shina[][] = new int[3][3];
shina[0][0]= 100; shina[0][1]= 2;
shina[1][0]= 200; shina[1][1]= 1;
shina[2][0]= 150; shina[2][1]= 1;
String namae[]=new String[3];
namae[0]="pencil"; namae[1]="note"; namae[2]="eraser";
System.out.println("namae.l="+namae.length);
//
for(i=0; i<namae.length; i=i+1){
shina[i][2]=shina[i][0]+rieki;
System.out.print(namae[i]+"\t"+shina[i][0]+"\t"+shina[i][2]);
if((double)rieki < (double)(shina[i][0])*0.1)
{System.out.println("\t ---- less than 10%.");
shina[i][2] =(int)((double)shina[i][0] *1.1);
System.out.println("\t\t"+shina[i][2]);}
else System.out.println("\t ok.");
}
}
}
3. When I executed the program, the following error was displayed but otherwise, the program printed out the output correctly.
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred in:
'Example5.main ([Ljava/lang/String;)V: Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
4. None
5. java -version
java version "1.2.1"
Classic VM (build JDK-1.2.1-A, native threads)
java -fullversion
java full version "JDK-1.2.1-A"
6. I tried everything after the error, recompile the program, exit and reenter MS-DOS, restart the Windows Nt; but Example5 gives the error now 100%.
I do not think that I have a special environment, but am not sure as to what to check with this Java error.
(Review ID: 83474)
======================================================================
Name: skT88420 Date: 06/08/99
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred
in :
'dtlamla1.txtMakeLoads ()Ljava/lang/String;': Interpreting method.
java version "1.1.8"
java full version "JDK1.1.8M"
The Java application executed with JDK 1.1.6
(Review ID: 84082)
======================================================================
Name: skT88420 Date: 06/29/99
1. I really don't know how to reproduce it...
2.(I messed with the indent to keep everything on the same line)
public class Dates
{
public static void main(String[] args)
{
String[] string = new String[10];
string[0] = "5/8/64";
string[1] = "1/5/38";
string[2] = "3/6/67";
string[3] = "12/30/93";
string[4] = "10/28/86";
string[5] = "5/29/51";
string[6] = "11/15/39";
string[7] = "2/5/37";
string[8] = "4/18/95";
string[9] = "6/3/45";
int[] day = new int[10];
for(int i = 0; i < 10; i++)
day[i] = (int)Math.round((Math.random() * 6.0)) + 1;
String[] wordDay = new String[10];
for(int i = 0; i < 10; i++)
{
switch(Integer.parseInt(wordDay[i]))
{
case 1:
wordDay[i] = "Sunday";
break;
case 2:
wordDay[i] = "Monday";
break;
case 3:
wordDay[i] = "Tuesday";
break;
case 4:
wordDay[i] = "Wednesday";
break;
case 5:
wordDay[i] = "Thursday";
break;
case 6:
wordDay[i] = "Friday";
break;
case 7:
wordDay[i] = "Saturday";
break;
}
}
int index = 0;
int endIndex = 0;
String[] month = new String[10];
String[] dayDate = new String[10];
String[] year = new String[10];
for(int i = 0; i < 10; i++)
{
index = string[i].indexOf('/');
month[i] = string[i].substring(1, index);
endIndex = string[i].indexOf('/', index+1);
dayDate[i] = string[i].substring(index,endIndex);
year[i] = string[i].substring(endIndex);
}
String[] wordMonth = new String[10];
for(int i = 0; i < 10; i++)
{
switch(Integer.parseInt(month[i]))
{
case 1:
wordMonth[i] = "January";
break;
case 2:
wordMonth[i]= "February";
break;
case 3:
wordMonth[i] = "March";
break;
case 4:
wordMonth[i] = "April";
break;
case 5:
wordMonth[i] = "May";
break;
case 6:
wordMonth[i] = "June";
break;
case 7:
wordMonth[i] = "July";
break;
case 8:
wordMonth[i] = "August";
break;
case 9:
wordMonth[i]="September";
break;
case 10:
wordMonth[i] = "October";
break;
case 11:
wordMonth[i] ="November";
break;
case 12:
wordMonth[i] ="December";
break;
}
}
for(int i = 0; i < 12; i++)
{
System.out.print(wordDay[i] + " ");
if(Integer.parseInt(dayDate[i]) == 1)
System.out.print(dayDate[i]+"st");
else if(Integer.parseInt(dayDate[i])==2)
System.out.print(dayDate[i] + "nd");
else if(Integer.parseInt(dayDate[i])==3)
System.out.print(dayDate[i] + "rd");
else
System.out.print(dayDate + "th");
System.out.print(" " + wordMonth[i]);
System.out.print(" 19" + year[i] + "\n");
}
}
}
3.
c:\jdk1.2\bin\java.exe Dates
Working Directory - C:\Java Examples\DatesClass Path - .\;.;C:\Program Files\kawa\kawaclasses.zip;c:\jdk1.2\lib\tools.jar;c:\jdk1.2\jre\lib\rt.jar
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred in :
'Dates.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Compiled Code)
at java.lang.Integer.parseInt(Integer.java:458)
at Dates.main(Dates.java:26)
Exception in thread "main" Process Exit...
5.
java version "1.2"
Classic VM(build JDK-1.2-V, native threads
JAVA.EXE full version "JDK-1.2-V"
(Review ID: 84995)
======================================================================
Name: skT88420 Date: 09/07/99
This is not a new bug error. The work around section contains
additional information from the previously reported error.
A nonfatal internal JIT (3.00.078(x)) error 'BinaryNonCommunitive' has occurred in :
'BankOperation1.main ([Ljava/lang/String;)V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
This error occurred when reproducing the code in BankOperations in
the well known Ivor Horton book "Beginning Java 2"
The version was on page 505, however, I did not synchronize the method in the Bank.java class as
an experiment
The output to java-version is
java version "1.2.1"
classic VM(Build JDK-1.2.1-A, native threads)
output for java full version
java.exe full version "JDK-1.2.1-A"
Here is the code in the application that produced this problem
BankOperation1.java
*
// header - edit "Data/yourJavaHeader" to customize
// contents - edit "EventHandlers/Java file/onCreate" to customize
//
*/
import java.util.Random;
import java.io.*;
public class BankOperation1
{
public static void main(String[] args)
{
int[] initialBalance={500,800}; //The initial account balance
int[] totalCredits=new int[initialBalance.length]; //Total credits on the account
int[] totalDebits=new int[initialBalance.length]; //Total debits on the account
int transactionCount=20; //Number of debits and credits
//Create the the bank and the clerks
Bank theBank=new Bank();
Clerk clerk1=new Clerk(theBank);
Clerk clerk2=new Clerk(theBank);
//Create the accounts and initialize the total credits and debits
Account[] accounts=new Account[initialBalance.length];//Create an account
for(int i=0;i<initialBalance.length;i++)
{
accounts[i]=new Account(i+1,initialBalance[i]); //Create accounts
totalCredits[i]=totalDebits[i]=0;
}
//Create the threads for the clerks as daemon and start them off
Thread clerk1Thread=new Thread(clerk1);
Thread clerk2Thread=new Thread(clerk2);
clerk1Thread.setDaemon(true);
clerk2Thread.setDaemon(true);
clerk1Thread.start();
clerk2Thread.start();
//Generate the transactions for each type and pass to the clerks
Random rand=new Random(); //Random number generator
Transaction transaction; //Stores a transaction
int amount; //Stores an amount of money
int select; //Selects an account
for(int i=1; i<=transactionCount;i++)
{
//Generates a random account index for credit operation
select=rand.nextInt(accounts.length);
amount=50+rand.nextInt(26);
transaction=new Transaction(accounts[select], //Account
Transaction.CREDIT, //It's a credit transaction
amount); //of this amount
totalCredits[select]+=amount; //Keep total credit tally
//Wait until the first clerk is free
while(clerk1.isBusy())
try
{
Thread.sleep(27); //Busy so try later
}
catch(InterruptedException e)
{
System.out.println(e);
}
clerk1.doTransaction(transaction); //Now do the credit
//Generate a random account index for debit operations
select=rand.nextInt(accounts.length);
amount=30+rand.nextInt(31); //Generate amount of $30 to $60
transaction = new Transaction(accounts[select], //The account
Transaction.DEBIT, //Debit transaction of amount
amount);
totalDebits[select]+=amount; //Keep total debit tally
//Wait until the second clerk is free
while(clerk2.isBusy())
try
{
Thread.sleep(25);
}
catch(InterruptedException e)
{
System.out.println(e);
}
clerk2.doTransaction(transaction); //Now do the debit
}
//Wait until both clerks are done
while(clerk1.isBusy()||clerk2.isBusy())
try
{
Thread.sleep(25);
}
catch(InterruptedException e)
{
System.out.println(e);
}
//Now output the results
for(int i=0;i<accounts.length;i++)
System.out.println(
"Original balance :$"+initialBalance[i]+"\n"+
"Total credits :$"+totalCredits[i]+"\n"+
"Total debits :$"+totalDebits[i]+"\n"+
"Final balance :$"+accounts[i].getBalance()+"\n"+
"Should be :$"+(initialBalance[i]+totalCredits[i]-totalDebits[i]));
}
}
Bank.java
*
// header - edit "Data/yourJavaHeader" to customize
// contents - edit "EventHandlers/Java file/onCreate" to customize
//
*/
import java.util.Random;
import java.io.*;
public class BankOperation1
{
public static void main(String[] args)
{
int[] initialBalance={500,800}; //The initial account balance
int[] totalCredits=new int[initialBalance.length]; //Total credits on the account
int[] totalDebits=new int[initialBalance.length]; //Total debits on the account
int transactionCount=20; //Number of debits and credits
//Create the the bank and the clerks
Bank theBank=new Bank();
Clerk clerk1=new Clerk(theBank);
Clerk clerk2=new Clerk(theBank);
//Create the accounts and initialize the total credits and debits
Account[] accounts=new Account[initialBalance.length];//Create an account
for(int i=0;i<initialBalance.length;i++)
{
accounts[i]=new Account(i+1,initialBalance[i]); //Create accounts
totalCredits[i]=totalDebits[i]=0;
}
//Create the threads for the clerks as daemon and start them off
Thread clerk1Thread=new Thread(clerk1);
Thread clerk2Thread=new Thread(clerk2);
clerk1Thread.setDaemon(true);
clerk2Thread.setDaemon(true);
clerk1Thread.start();
clerk2Thread.start();
//Generate the transactions for each type and pass to the clerks
Random rand=new Random(); //Random number generator
Transaction transaction; //Stores a transaction
int amount; //Stores an amount of money
int select; //Selects an account
for(int i=1; i<=transactionCount;i++)
{
//Generates a random account index for credit operation
select=rand.nextInt(accounts.length);
amount=50+rand.nextInt(26);
transaction=new Transaction(accounts[select], //Account
Transaction.CREDIT, //It's a credit transaction
amount); //of this amount
totalCredits[select]+=amount; //Keep total credit tally
//Wait until the first clerk is free
while(clerk1.isBusy())
try
{
Thread.sleep(27); //Busy so try later
}
catch(InterruptedException e)
{
System.out.println(e);
}
clerk1.doTransaction(transaction); //Now do the credit
//Generate a random account index for debit operations
select=rand.nextInt(accounts.length);
amount=30+rand.nextInt(31); //Generate amount of $30 to $60
transaction = new Transaction(accounts[select], //The account
Transaction.DEBIT, //Debit transactio