swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Swarm-Support] Re: Problem of using SWARM under Eclipse, NetBeans


From: Angela Johana Muñoz Idrobo
Subject: RE: [Swarm-Support] Re: Problem of using SWARM under Eclipse, NetBeans
Date: Mon, 18 Oct 2004 21:23:23 -0500

Hi

We are from Colombia, We speak Spanish so sorry about possible mistakes in our English wrinting.

We are programming with Swarm 2.1.1 using NetBeans IDE , we think Swarm 2.1.1 does not need cygwin so we compile and run our application from within NetBeans. We are not using the Control Panel to manage the simulation instead we use a interface that extends of JFrame. When we start the simulation clilcking in a JButton we create a object of HiloSimulacion class, this class extends of Thread class of java, and also we start this thread. In the run() method of the thread we call to Globals.env.initSwarm, we build the objects that needs the model, we build the actions, we active the model and finally we start the model`s activity with next() method. The first time we run our application, using NetBeans, everything is ok but when we run it again we got the following exception:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x6104C688
Function=sem_post+0x90
Library=C:\Swarm-2.1.1\bin\cygwin1.dll
Current Java thread:
       at swarm.SwarmEnvironment.initSwarm(Native Method)
       at simulacion.HiloSimulacion.run(HiloSimulacion.java:53)

we attach to this email the error report file “hs_err_pid312.log”

What do you think about this problem? do you think it is necessary to move on to Swarm-2.2 to solve this exception? Please write us something, thanks a lot

Angela address@hidden, address@hidden
Andres address@hidden, address@hidden


From: Rob McDermott <address@hidden>
Reply-To: Swarm Support <address@hidden>
To: address@hidden
Subject: [Swarm-Support] Re: Support Digest, Vol 4, Issue 14
Date: Mon, 18 Oct 2004 11:49:43 +1300

Hi
I program SWARM using Eclipse.
Basically, Eclipse is simply the tool with which I write SWARM Java classes to implement my agents and stuff.

1. Create a project in Eclipse
2. Add the library swarm.jar to your build path. On my system, this is c:\Swarm-2.2\share\swarm\swarm.jar

You're not going to be able to RUN the model from within Eclipse, because it runs under cygwin... so here's what I do: - For unit testing, I had to write a couple of Java classes to implement the SWARM classes that were'nt available to me under Eclipse (such as a Grid2D) but that I really needed to test my agents. I wrote a simple test class that instantiates the model and puts it through various test cases. - Once I've got my model programmed in Java, I compile it to native code using gcj. I do this from cygwin, using a simple script, because the command line is kinda long. I do this to get around the problem with Java SWARM's not initialising properly. - Then, I run the model... You can run it either from in cygwin, or from windows - as long as you have cygwin installed correctly it will run.

Probably the build path is your problem, but if you have any other questions let me know.
regards
Rob McDermott

_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support

_________________________________________________________________
MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/

Attachment: hs_err_pid312.log
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]