swarm-support
[Top][All Lists]
Advanced

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

[Swarm-Support] Unexpected Exception while calling a method - WinXP, Ja


From: Physician
Subject: [Swarm-Support] Unexpected Exception while calling a method - WinXP, Java
Date: Mon, 30 May 2005 15:23:24 +0100

Hello Swarmusers,

i got a problem i do not understand.

I used JUnit to test my code an there is a method that causes an unexpected 
exception sometimes. After testing the method in the class test it ran so far.
For testing an other class i need to use this method to again. There it is 
causing this exception.

In the console i get this output:

## START##

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at 
PC=0x2F48305
Function=[Unknown.]
Library=C:\Swarm-2.2-java\bin\javaswarm.dll

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.


Current Java thread:
        at swarm.random.UniformDoubleDistImpl.getDoubleWithMin$withMax(Native 
Method)
        at Agent.choosePoint(Agent.java:144)
        at Agent.agentStep(Agent.java:120)
        at WorldTest.testWorldStep(WorldTest.java:36)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:436)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:311)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Dynamic libraries:
0x00400000 - 0x0040B000         C:\Programme\Java\j2re1.4.2_08\bin\javaw.exe
0x77F40000 - 0x77FEE000         C:\WINDOWS\System32\ntdll.dll
0x77E40000 - 0x77F38000         C:\WINDOWS\system32\kernel32.dll
0x77DA0000 - 0x77E3C000         C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78087000         C:\WINDOWS\system32\RPCRT4.dll
0x77D10000 - 0x77D9D000         C:\WINDOWS\system32\USER32.dll
0x7F000000 - 0x7F041000         C:\WINDOWS\system32\GDI32.dll
0x77BE0000 - 0x77C33000         C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08138000         
C:\Programme\Java\j2re1.4.2_08\bin\client\jvm.dll
0x76AF0000 - 0x76B1D000         C:\WINDOWS\System32\WINMM.dll
0x10000000 - 0x10007000         C:\Programme\Java\j2re1.4.2_08\bin\hpi.dll
0x00820000 - 0x0082E000         C:\Programme\Java\j2re1.4.2_08\bin\verify.dll
0x00830000 - 0x00849000         C:\Programme\Java\j2re1.4.2_08\bin\java.dll
0x00850000 - 0x0085E000         C:\Programme\Java\j2re1.4.2_08\bin\zip.dll
0x02E40000 - 0x02E4F000         C:\Programme\Java\j2re1.4.2_08\bin\net.dll
0x71A10000 - 0x71A24000         C:\WINDOWS\System32\WS2_32.dll
0x71A00000 - 0x71A08000         C:\WINDOWS\System32\WS2HELP.dll
0x719B0000 - 0x719EC000         C:\WINDOWS\system32\mswsock.dll
0x719F0000 - 0x719F8000         C:\WINDOWS\System32\wshtcpip.dll
0x02E90000 - 0x03728000         C:\Swarm-2.2-java\bin\javaswarm.dll
0x03730000 - 0x0381A000         c:\Swarm-2.2-java\bin\BLT24.dll
0x03820000 - 0x038C3000         c:\Swarm-2.2-java\bin\tcl84.dll
0x038D0000 - 0x039AE000         c:\Swarm-2.2-java\bin\tk84.dll
0x77310000 - 0x7739B000         C:\WINDOWS\system32\COMCTL32.DLL
0x76350000 - 0x76396000         C:\WINDOWS\system32\COMDLG32.DLL
0x70A70000 - 0x70AD6000         C:\WINDOWS\system32\SHLWAPI.dll
0x039B0000 - 0x041B4000         C:\WINDOWS\system32\SHELL32.dll
0x76330000 - 0x7634C000         C:\WINDOWS\System32\IMM32.DLL
0x72F70000 - 0x72F93000         C:\WINDOWS\System32\WINSPOOL.DRV
0x041C0000 - 0x042BB000         c:\Swarm-2.2-java\bin\libhdf5-0.dll
0x042C0000 - 0x042D5000         c:\Swarm-2.2-java\bin\mgwz.dll
0x042E0000 - 0x04313000         c:\Swarm-2.2-java\bin\png12.dll
0x78090000 - 0x78175000         
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1643_x-ww_7c3a9bc6\comctl32.dll
0x76C50000 - 0x76C72000         C:\WINDOWS\system32\imagehlp.dll
0x6DA00000 - 0x6DA7D000         C:\WINDOWS\system32\DBGHELP.dll
0x77BD0000 - 0x77BD7000         C:\WINDOWS\system32\VERSION.dll
0x76BB0000 - 0x76BBB000         C:\WINDOWS\System32\PSAPI.DLL

Heap at VM Abort:
Heap
 def new generation   total 576K, used 467K [0x10010000, 0x100b0000, 0x104f0000)
  eden space 512K,  83 used [0x10010000, 0x1007a868, 0x10090000)
  from space 64K,  64 used [0x10090000, 0x1009a4b8, 0x100a0000)
  to   space 64K,   0 used [0x100a0000, 0x100a0000, 0x100b0000)
 tenured generation   total 1408K, used 160K [0x104f0000, 0x10650000, 
0x14010000)
   the space 1408K,  11 used [0x104f0000, 0x10518068, 0x10518200, 0x10650000)
 compacting perm gen  total 4096K, used 1608K [0x14010000, 0x14410000, 
0x18010000)
   the space 4096K,  39 used [0x14010000, 0x141a22b0, 0x141a2400, 0x14410000)

Local Time = Mon May 30 15:15:42 2005
Elapsed Time = 4
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_08-b03 mixed mode)
#
# An error report file has been saved as hs_err_pid2296.log.
# Please refer to the file for further information.
#

## END ##

The named log file shows the same text as above.

Here it is running:

## START ##

public void testGetVisitedPoints() {
                Globals.env.initSwarm ("tsp_agents", "0.0", "address@hidden", 
new String [2]);
                Zone z = new ZoneImpl();
                World w = new World (z, 1);
                List l = new LinkedList();
                int [] p = new int [16];  
                l.add (new Agent(w, 1));
                w.setPheromonesUpDown (0.8, 0.15);
                w.setQ0(0.5);
                w.setBeta(2);
                w.setAgentList(l);
                for (int i = 0; i < 15; i++) {
                        ((Agent)l.get(0)).agentStep(); 
                }
                p = ((Agent)l.get(0)).getVisitedPoints();
                System.out.print("visitedPoints:");
                for (int i = 0; i < 16; i++) {
                        System.out.print(" ["  + p [i] + "]");
                }
                System.out.println();
                assertEquals (1, 1);
        }

## END ##

Here it doesn't:

## START ##

public void testWorldStep() {
                Zone z = new ZoneImpl();
                World w = new World (z, 1);
                List l = new LinkedList();
                l.add (new Agent(w, 1));
                l.add (new Agent(w, 2));
                double p [] [];
                w.setPheromonesUpDown (0.8, 0.15);
                w.setAgentList(l);
                p = w.getPValues ();
                for (int i = 0; i < 2; i++)
                        for (int j = 0; j < 2; j++)
                        System.out.println ("pValues: " + p [i] [j]);
                ((Agent) l.get(0)).agentStep();
                ((Agent) l.get(1)).agentStep();
                w.worldStep ();
                p = w.getPValues ();
                for (int i = 0; i < 2; i++)
                        for (int j = 0; j < 2; j++)
                        System.out.println ("pValues nach worldStep: " + p [i] 
[j]);
                assertEquals (1, 1);
        }

## END ##

Does anybody have a suggestion what the fault could be?


Best regards. 

Seb
address@hidden
2005-05-30





reply via email to

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