[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Java execution problem
From: |
david ROBIN |
Subject: |
Java execution problem |
Date: |
Fri, 3 Dec 1999 08:06:37 -0800 (PST) |
Hi ,I am a french student user of swarm in Java under
NT, and i got a strange execution problem:
my program runs sometimes perfectly when i start it by
doing "javaswarm myProgramName --varyseed"
and sometimes it crashes and i got the following
error:
"internal error
Please check your CLASSPATH and your installation.
Exception throw was of type
'java/lang/NullPointerException'
NULL message"
and i am sure that my installation is correct, because
jheatbugs and jmousetrap and my other programs works
perfectly.
I found it came from a list problem
sketch of code:
ListeAgent= new ListImpl (getZone ());
ListeClient= new ListImpl (getZone ());
ListeRapporteur= new ListImpl (getZone ());
//i fill the lists
for (i=0;i<nbPersonne ;i++)
{
Agent unAgent;
unAgent=new Agent();
unAgent.ResetTabnote();
ListeAgent.addLast(unAgent);
}
for (i=0;i<nbPersonne;i++)
{
int j;
j=Globals.env.uniformIntRand.getIntegerWithMin$withMax(0,nbmaxProfil-1);
Client unClient;
unClient=new Client();
unClient.setProb (PProb,DProb,RProb,AProb);
unClient.setProfil(j);
ListeClient.addLast(unClient);
}
for (i=0;i<nbPersonne;i++)
{
Rapporteur unRapporteur;
unRapporteur=new Rapporteur();
ListeRapporteur.addLast(unRapporteur);
}
for (i=0;i<nbPersonne;i++)//i associate an
agent to a client and a rapporteur to a
couple(client,agent)
{
Agent unAgent;
Client unClient;
Rapporteur unRapporteur;
unAgent=(Agent)ListeAgent.removeFirst();
unClient=(Client)ListeClient.removeFirst();
unRapporteur=(Rapporteur)
ListeRapporteur.removeFirst();
unClient.setAgent(unAgent);
unRapporteur.setAgent(unAgent);
unRapporteur.setClient(unClient);
ListeAgent.addLast(unAgent);
ListeClient.addLast(unClient);
ListeRapporteur.addLast(unRapporteur);
}
And when i set the number of clients(=number of
agents=number of rapporteurs) to 1, it always runs
properly but the greater the number is the more it
crashes...
Thanks for helping me to resolva this problem
David
__________________________________________________
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one place.
Yahoo! Shopping: http://shopping.yahoo.com
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- Java execution problem,
david ROBIN <=
- Re: Java execution problem, david ROBIN, 1999/12/06
- Re: Java execution problem, Marcus G. Daniels, 1999/12/06
- objective c?, Juan A. Rodriguez, 1999/12/06
- Re: objective c?, Paul Johnson, 1999/12/06
- objective c?, jalex, 1999/12/06
- Message not available
- Re: objective c?, Marcus G. Daniels, 1999/12/06
- Message not available
- Re: objective c?, Marcus G. Daniels, 1999/12/07
- Re: objective c?, Benedikt Stefansson, 1999/12/06
- Re: objective c?, Matt Aylward, 1999/12/06