Giter Club home page Giter Club logo

lewisomniscientdebugger's Introduction

LewisOmniscientDebugger

Thank you for downloading the Omniscient Debugger (the ODB), the Java debugger that lets you go "backwards in time" so you can examine your program's execution. Also please visit the project website

System Requirements

ODB 1.4 works on code complied for JDK 1.3 and 1.4. ODB 1.5 works on code compiled for JDK 1.5. I have tested it on 1.6 and it works. Code compiled for Java 7 and up use invokedetatch, which seems to cause problems at the moment. See Issue: The Jar's compiled for 1.6 and older do work on the 1.8 JVM.

Maven/Gradle

Maven

<dependency>
  <groupId>com.neuronrobotics</groupId>
  <artifactId>LewisOmniscientDebugger</artifactId>
  <version>1.6</version>
</dependency>

Gradle

compile group: 'com.neuronrobotics', name: 'LewisOmniscientDebugger', version: '1.6'

Usage

If you normally run your program on UNIX like this:

% java com.lambda.tests.TestMyArrayList

You can run the debugger like this:

% java -cp LewisOmniscientDebugger-1.5.jar:$CLASSPATH com.lambda.Debugger.Debugger com.lambda.tests.TestMyArrayList

There are alias files and .BAT files that allow you to type this:

% debug bomberman.Bomberman

I often run it from Elipse by making com.lambda.Debugger.Debugger the program to run and making bomberman.Bomberman the argument to it.

Tutorial

Please try the demo programs that ship with the ODB. Just run the ODB with no command line arguments.

Please also watch the ODB video "Debugging Backwards in Time"

The research paper can be found here

I am looking for a good short Flash tutorial, with voice annotation, of how to use the ODB. I would like to put it on my website. If you create one, please email me.

Manual

See manual here Enjoy!

Development

Here is how to build and run the debug the debugger step

git clone https://github.com/OmniscientDebugger/LewisOmniscientDebugger.git

gradle jar

java -DDEBUG_DEBUGIFY -Xms400100100 -Xmx400100100 -DMEMORY=400100100  -cp build/libs/LewisOmniscientDebugger.jar:$CLASSPATH  com.lambda.Debugger.Debugify build/classes/main/com/lambda/Debugger/Demo.class

Contact Info / Website

There are no ODB mailing lists. For support, patches / other contributions, bugs, and feature requests, please email me -- I enjoy hearing your feedback.

--Bil Lewis [email protected] 18 Feb 2007

lewisomniscientdebugger's People

Contributors

madhephaestus avatar meweraptima avatar zhangysh1995 avatar

Stargazers

Zubair Quraishi avatar  avatar Magnus Ihse Bursie avatar Tan Jun Wen (Jordan) avatar  avatar NickAc avatar remotemachine1 avatar 3000IQPlay avatar Potato Sus avatar Matt avatar Taylor Hodge avatar LA avatar Alessandro Iob avatar Nitin Raj Yadav avatar  avatar 企鹅2035 avatar  avatar  avatar Johann Kowalski avatar  avatar Delon R. Newman avatar  avatar  avatar  avatar Jonathan Gurr avatar Huang avatar Csaba Gabor avatar Paul deGrandis avatar Christian Schirin avatar 布丁 avatar Bastian Böhm avatar XhstormR avatar  avatar  avatar  avatar  avatar  avatar Quan Nguyen avatar  avatar Jirka Daněk avatar Roger Barraud avatar  avatar Alexander Ivanov avatar Nanang arsyad alfatich avatar Kenneth Bruskiewicz avatar  avatar Justin Garrick avatar  avatar  avatar  avatar  avatar Daniel Heinrich avatar Josef Galea avatar Denis Pyshev avatar Denis Kirpichenkov avatar

Watchers

James Cloos avatar Vyacheslav Rusakov avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lewisomniscientdebugger's Issues

Java 1.8 Gradle problem

gradle jar in directory throws:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/KellyZhang/Desktop/work/Software/LewisOmniscientDebugger-0.1.5/build.gradle' line: 73

* What went wrong:
Execution failed for task ':jar'.
> You cannot add child specs at execution time. Consider configuring this task during configuration time or using a separate task to do the configuration.

I'm not familiar with Gradle, but sovled this way

My java version:

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

And I use the release for building.

Exception stack trace below:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':jar'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) Caused by: org.gradle.api.GradleException: You cannot add child specs at execution time. Consider configuring this task during configuration time or using a separate task to do the configuration. at org.gradle.api.tasks.AbstractCopyTask$1.childSpecAdded(AbstractCopyTask.java:66) at org.gradle.api.internal.file.copy.DefaultCopySpec.fireChildSpecListeners(DefaultCopySpec.java:191) at org.gradle.api.internal.file.copy.DefaultCopySpec.access$000(DefaultCopySpec.java:55) at org.gradle.api.internal.file.copy.DefaultCopySpec$1.childSpecAdded(DefaultCopySpec.java:176) at org.gradle.api.internal.file.copy.DefaultCopySpec.fireChildSpecListeners(DefaultCopySpec.java:191) at org.gradle.api.internal.file.copy.DefaultCopySpec.access$000(DefaultCopySpec.java:55) at org.gradle.api.internal.file.copy.DefaultCopySpec$2.visit(DefaultCopySpec.java:184) at org.gradle.api.internal.file.copy.DefaultCopySpec.visit(DefaultCopySpec.java:197) at org.gradle.api.internal.file.copy.DefaultCopySpec.addChildSpec(DefaultCopySpec.java:181) at org.gradle.api.internal.file.copy.DefaultCopySpec.addChildSpec(DefaultCopySpec.java:161) at org.gradle.api.internal.file.copy.SingleParentCopySpec.addChild(SingleParentCopySpec.java:33) at org.gradle.api.internal.file.copy.DefaultCopySpec.from(DefaultCopySpec.java:131) at org.gradle.api.tasks.AbstractCopyTask.from(AbstractCopyTask.java:297) at org.gradle.api.tasks.AbstractCopyTask.from(AbstractCopyTask.java:55) at build_cbdh6zlwixgbfc59zr2uky5av$_run_closure6$_closure21.doCall(/Users/KellyZhang/Desktop/work/Software/LewisOmniscientDebugger-0.1.5/build.gradle:73) at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:700) at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:673) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) ... 28 more

class.getPackage() returns null

I'm not sure if this is particular to ODB, or just the way we call it, but I'm having some trouble because whenever I have a class object and call .getPackage() on it, it returns null. This is problematic in logging and a few other cases. For example, ServiceLocatorFactoryImpl.class.getPackage().getName() crashes, because .getPackage() returned null. (It does not return null when run on its own.)

I'm using Java 8. It seems to be working well, aside from this issue. (I do not know whether it's an issue in Java 6.) The command I'm using is basically:

java -noverify -Xms400100100 -Xmx400100100 -DMEMORY=400100100 -cp "LewisOmniscientDebugger.jar;##JAR##" com.lambda.Debugger.Debugger ##CLASS##

HashMap null key crashes program

From what I can infer, HashMaps are replaced at runtime by a custom implementation, probably for better logging. However, it fails to account for null keys (which are valid for HashMaps, and not for the Hashtables, though I'm not certain if a true Hashtable is used anywhere). The following is a (slightly anonymized) stack trace:

.Debugger com.myprogram.Main
ODB: 28.Mar.07
ODB: Reading .debuggerDefaults file...
In target program2:
class com.myprogram.Main.main threw java.lang.NullPointerException
java.lang.NullPointerException
        at com.lambda.Debugger.Shadow.hashtablePut(Shadow.java:1977)
        at com.lambda.Debugger.D.hashMapPut(D.java:683)
        at com.lambda.Debugger.MyHashMap.put(MyHashMap.java:30)
        at com.myprogram.Main.main(Main.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.lambda.Debugger.Debugger.runTarget(Debugger.java:1141)
        at com.lambda.Debugger.Debugger$1.run(Debugger.java:1199)
        at java.lang.Thread.run(Thread.java:748)
ODB: 28.Mar.07 run complete.

The relevant lines of code in Main.main() would be:

HashMap<Integer, Integer> blah = new HashMap<>();
blah.put(5, 6);
blah.put(null, 1);
blah.put(7, 8);

which would crash on the third line, the one with a null key.

I'm attempting to fix the bug, but depending on how deep the rabbit hole goes, I may not make it.

Java 1.8 compilation runtime error

When running test code that runs fine when compiled with java 1.6. When compiled with 1.8 the following exception is thrown:

Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame at branch target 54
Exception Details:
Location:
com/lambda/tests/TestMyArrayList.()V @16: ifnonnull
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: b201 ca03 6013 01cb 1301 b204 b801 0659
0x0000010: c700 2657 b201 ca03 60b2 01cf 59c7 000e
0x0000020: 5713 01ba b801 c059 b301 cf00 1301 cb13
0x0000030: 01b2 04b8 010a 4c2a b700 08b2 01ca 0360
0x0000040: 2bb8 00ea b1

at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethod(Class.java:2128)
at com.lambda.Debugger.Debugger.runTarget(Debugger.java:1131)
at com.lambda.Debugger.Debugger.runMain(Debugger.java:1036)
at com.lambda.Debugger.Debugger.main2(Debugger.java:1028)
at com.lambda.Debugger.Debugger.main(Debugger.java:967)

https://github.com/OmniscientDebugger/LewisOmniscientDebugger/blob/master/src/main/java/com/lambda/Debugger/Debugger.java#L1131

Doesn't trace static initialization

I'm currently dealing with a bug which happens to occur in a static initializer. The stack trace shows the stack extends past java.lang.Class.forName(), and crashes in the loaded class, but ODB does not step into the classloading, so I can't see the exact circumstances of the crash. (I'm using Java 8.)

Deadlock D vs DebugifyingClassLoader

Found a deadlock. Here's what happens, as near as I can make out:
D is invoked to change e.g. an instance variable V on owner O. It locks on itself, and starts to make a Shadow of O. It calls getFields() on O's class. This has not yet happened, so the fields are not cached, and the Class delegates to DebugifyingClassLoader, attempting to lock it.
In the meantime, though, another thread is loading classes. DebugifyingClassLoader is locked to load the classes, and tries to call Debugify.debugifyClass(). This attempts to lock D, which results in deadlock.

Here's a trace of the deadlock, slightly anonymized:

	Thread [main] (Suspended)	
		owns: Object  (id=93)	
		owns: DebugifyingClassLoader  (id=84)	
			waited by: Thread [qtp1199720022-30-acceptor-0@771ed183-ServerConnector@1f9bf19f{SSL,[ssl, http/1.1]}{0.0.0.0:4439}] (Suspended)	
		waiting for: Class<T> (com.lambda.Debugger.D) (id=85)	
			owned by: Thread [qtp1199720022-30-acceptor-0@771ed183-ServerConnector@1f9bf19f{SSL,[ssl, http/1.1]}{0.0.0.0:4439}] (Suspended)	
		Debugify.debugifyClass(JavaClass, String) line: 293	
		DebugifyingClassLoader.findClass(String, boolean) line: 183	
		DebugifyingClassLoader.loadClass(String, boolean) line: 112	
		DebugifyingClassLoader(ClassLoader).loadClass(String) line: 357	
		Class<T>.getDeclaredFields0(boolean) line: not available [native method]	
		Class<T>.privateGetDeclaredFields(boolean) line: 2583	
		Class<T>.getDeclaredFields() line: 1916	
		ClassReflectionHelperImpl$8.run() line: 166	
		ClassReflectionHelperImpl$8.run() line: 162	
		AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]	
		ClassReflectionHelperImpl.secureGetDeclaredFields(Class<?>) line: 162	
		ClassReflectionHelperImpl.getDeclaredFieldWrappers(Class<?>) line: 198	
		ClassReflectionHelperImpl.getAllFieldWrappers(Class<?>) line: 215	
		ClassReflectionHelperImpl$4.compute(Class<?>) line: 109	
		ClassReflectionHelperImpl$4.compute(Object) line: 105	
		LRUHybridCache$OriginThreadAwareFuture$1.call() line: 115	
		LRUHybridCache$OriginThreadAwareFuture$1.call() line: 111	
		FutureTask<V>.run() line: 266	
		LRUHybridCache$OriginThreadAwareFuture.run() line: 173	
		LRUHybridCache<K,V>.compute(K) line: 292	
		ClassReflectionHelperImpl.getAllFields(Class<?>) line: 333	
		Utilities.findInitializerFields(Class<?>, ServiceLocatorImpl, Collector) line: 1410	
		DefaultClassAnalyzer.getFields(Class<T>) line: 113	
		JerseyClassAnalyzer.getFields(Class<T>) line: 244	
		Utilities.getInitFields(Class<?>, ClassAnalyzer, Collector) line: 251	
		ClazzCreator<T>.initialize(ActiveDescriptor<?>, String, Collector) line: 157	
		ClazzCreator<T>.initialize(ActiveDescriptor<?>, Collector) line: 182	
		SystemDescriptor<T>.internalReify(Class<?>, Collector) line: 723	
		SystemDescriptor<T>.reify(Class<?>, Collector) line: 678	
		ServiceLocatorImpl.reifyDescriptor(Descriptor, Injectee) line: 416	
		Utilities.createService(ActiveDescriptor<T>, Injectee, ServiceLocatorImpl, ServiceHandle<T>, Class<?>) line: 2029	
		ServiceHandleImpl<T>.getService(ServiceHandle<T>) line: 105	
		ServiceHandleImpl<T>.getService() line: 87	
		FactoryCreator<T>.create(ServiceHandle<?>, SystemDescriptor<?>) line: 117	
		SystemDescriptor<T>.create(ServiceHandle<?>) line: 471	
		SingletonContext$1.compute(ContextualInput<Object>) line: 82	
		SingletonContext$1.compute(Object) line: 70	
		Cache$OriginThreadAwareFuture$1.call() line: 97	
		FutureTask<V>.run() line: 266	
		Cache$OriginThreadAwareFuture.run() line: 154	
		Cache<K,V>.compute(K) line: 199	
		SingletonContext.findOrCreate(ActiveDescriptor<T>, ServiceHandle<?>) line: 121	
		Utilities.createService(ActiveDescriptor<T>, Injectee, ServiceLocatorImpl, ServiceHandle<T>, Class<?>) line: 2064	
		ServiceLocatorImpl.internalGetService(Type, String, Unqualified, Annotation...) line: 711	
		ServiceLocatorImpl.getService(Class<T>, Annotation...) line: 653	
                ... main methods ...
		NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
		NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
		DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
		Method.invoke(Object, Object...) line: 498	
		Debugger.runTarget(Class, Object[]) line: 1141	
		Debugger$1.run() line: 1199	
		Thread.run() line: 748	
	Thread [qtp1199720022-30-acceptor-0@771ed183-ServerConnector@1f9bf19f{SSL,[ssl, http/1.1]}{0.0.0.0:4439}] (Suspended)	
		owns: Class<T> (com.lambda.Debugger.D) (id=85)	
		waiting for: DebugifyingClassLoader  (id=84)	
		Class<T>.getDeclaredFields0(boolean) line: not available [native method]	
		Class<T>.privateGetDeclaredFields(boolean) line: 2583	
		Class<T>.privateGetPublicFields(Set<Class<?>>) line: 2614	
		Class<T>.getFields() line: 1557	
		Shadow.createShadowInternal(Object, boolean) line: 1160	
		Shadow.createShadow(Object, boolean) line: 1025	
		Shadow.get(Object, boolean) line: 1907	
		Shadow.get(Object) line: 1901	
		D.changeIVA(Object, Object, int, String, TraceLine) line: 389	
		ManagedSelector$Accept.<init>(ManagedSelector, SelectableChannel, Object) line: 556	
		ServerConnector$ServerConnectorManager(SelectorManager).accept(SelectableChannel, Object) line: 200	
		ServerConnector$ServerConnectorManager(SelectorManager).accept(SelectableChannel) line: 184	
		ServerConnector.accepted(SocketChannel) line: 362	
		ServerConnector.accept(int) line: 353	
		AbstractConnector$Acceptor.run() line: 603	
		QueuedThreadPool.runJob(Runnable) line: 672	
		QueuedThreadPool$2.run() line: 590	
		Thread.run() line: 748	

I'm using EclipseLink and Jetty and a few other heavy-loading things.

Now, I think I've maybe fixed the problem - it locked consistently before, and no longer locks. However, it's pretty ugly, I'm not sure it's covering all cases, it could theoretically cause some other kind of problem, and I may have applied it in more places than is necessary. Basically, I've swapped out most of D's synchronization with first synchronizing on the DebugifyingClassLoader, and THEN on D. This ensures same-order locking (in the case I saw), preventing deadlock. Still, note the caveats.

I'm making a pull request with this and a few other fixes; please look it over and see if it's acceptable.

java.lang.VerifyError: Expecting a stackmap frame at branch target 54

Hello, I am just trying out the ODB for the first time with a simple program and got this error. Want to see if this is a known issue and maybe I need to use a different version of java.

$ java -DDEBUG_DEBUGIFY -Xms400100100 -Xmx400100100 -DMEMORY=400100100 -cp LewisOmniscientDebugger-1.5.jar:$CLASSPATH com.lambda.Debugger.Debugger Play > output.txt
Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame at branch target 54
Exception Details:
  Location:
    Play.<init>()V @16: ifnonnull
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0x0000000: b201 aa03 6013 01ab 1301 9304 b800 e759
    0x0000010: c700 2657 b201 aa03 60b2 01af 59c7 000e
    0x0000020: 5713 019a b801 a059 b301 af00 1301 ab13
    0x0000030: 0193 04b8 00eb 4c2a b700 01b2 01aa 0360
    0x0000040: 2bb8 00cb b1                           

	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.getDeclaredMethod(Class.java:2128)
	at com.lambda.Debugger.Debugger.runTarget(Debugger.java:1131)
	at com.lambda.Debugger.Debugger.runMain(Debugger.java:1036)
	at com.lambda.Debugger.Debugger.main2(Debugger.java:1028)
	at com.lambda.Debugger.Debugger.main(Debugger.java:967)

The test program looks like this:

public class Play {
    public static void main(String[] argv) {
        System.out.println("Hello world!");
    }
}

This is my java version:

$ java -version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

Java 1.6 runtime issues

When using javax/xml/parsers/DocumentBuilderFactory the following java.lang.VerifyError occurs:

This was an attempt to debug an application compiled for Java 1.6.

class junit.test.neuronrobotics.utilities.ParallelArmTest.main threw java.lang.VerifyError: Expecting a stackmap frame at branch target 38
Exception Details:
Location:
javax/xml/parsers/DocumentBuilderFactory.setValidating(Z)V @17: ifnonnull
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: b202 0f10 0c60 1302 3c13 023b 05b8 014d
0x0000010: 59c7 0015 57b2 020f 100c 602a 1302 3c13
0x0000020: 023b 05b8 0151 4d2a 1b36 0459 1504 b202
0x0000030: 0f10 0c60 1302 152c b801 d1b5 0002 b202
0x0000040: 0f10 0d60 2cb8 0131 b1

java.lang.VerifyError: Expecting a stackmap frame at branch target 38
Exception Details:
Location:
javax/xml/parsers/DocumentBuilderFactory.setValidating(Z)V @17: ifnonnull
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: b202 0f10 0c60 1302 3c13 023b 05b8 014d
0x0000010: 59c7 0015 57b2 020f 100c 602a 1302 3c13
0x0000020: 023b 05b8 0151 4d2a 1b36 0459 1504 b202
0x0000030: 0f10 0c60 1302 152c b801 d1b5 0002 b202
0x0000040: 0f10 0d60 2cb8 0131 b1
ODB: 28.Mar.07 run complete.

at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.neuronrobotics.sdk.addons.kinematics.xml.XmlFactory.getAllNodesDocument(XmlFactory.java:39)
at com.neuronrobotics.sdk.addons.kinematics.MobileBase.<init>(MobileBase.java:67)
at junit.test.neuronrobotics.utilities.ParallelArmTest.main(ParallelArmTest.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.lambda.Debugger.Debugger.runTarget(Debugger.java:1141)
at com.lambda.Debugger.Debugger.runMain(Debugger.java:1036)
at com.lambda.Debugger.Debugger.main2(Debugger.java:1028)
at com.lambda.Debugger.Debugger.main(Debugger.java:967)

IMPOSSIBLE TraceLine.getMethodLine() not found, and ClassCastException

I encountered a set of error messages. First, I received many of the following (slightly anonymized), for a variety of places in the code:

com.lambda.Debugger.DebuggerException: IMPOSSIBLE TraceLine.getMethodLine() not found: 5                             <Logger_344>.callTurboFilters(null, <Level_7>) -> <FilterReply_0>[0]                             callTurboFilters -> <FilterReply_0>[391865]
        at com.lambda.Debugger.TraceLine.getMethodLine(TraceLine.java:1095)
        at com.lambda.Debugger.TimeStamp.disposable(TimeStamp.java:1545)
        at com.lambda.Debugger.TimeStamp.collect0(TimeStamp.java:1463)
        at com.lambda.Debugger.TimeStamp.collect(TimeStamp.java:1437)
        at com.lambda.Debugger.TimeStamp.addStamp(TimeStamp.java:583)
        at com.lambda.Debugger.TimeStamp.addStamp(TimeStamp.java:557)
        at com.lambda.Debugger.TraceLine.addTrace(TraceLine.java:902)
        at com.lambda.Debugger.D.invoke(D.java:876)
        at org.apache.camel.util.IntrospectionSupport.doIntrospectClass(IntrospectionSupport.java:319)
        at org.apache.camel.util.IntrospectionSupport.cacheClass(IntrospectionSupport.java:276)
        at org.apache.camel.util.IntrospectionSupport.getProperties(IntrospectionSupport.java:241)
        at org.apache.camel.util.IntrospectionSupport.getProperties(IntrospectionSupport.java:219)
        at org.apache.camel.model.ProcessorDefinitionHelper.resolvePropertyPlaceholders(ProcessorDefinitionHelper.java:685)
        at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:520)
        at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:506)
        at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:222)
        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1068)
        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
        at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:984)
        at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3401)
        at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3132)
        at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:183)
        at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2961)
        at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957)
        at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2980)
        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2957)
        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2924)
        ... anonymous ...
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1129)
        at org.jvnet.hk2.internal.ClazzCreator.createMe(ClazzCreator.java:274)
        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:368)
        at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
        at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:82)
        at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:70)
        at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
        at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
        at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:121)
        at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2064)
        at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
        at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
        at org.jvnet.hk2.internal.FactoryCreator.create(FactoryCreator.java:117)
        at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
        at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:82)
        at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:70)
        at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
        at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
        at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:121)
        at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2064)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:711)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:653)
        ... anonymous ...
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.lambda.Debugger.Debugger.runTarget(Debugger.java:1141)
        at com.lambda.Debugger.Debugger$1.run(Debugger.java:1199)
        at java.lang.Thread.run(Thread.java:748)

After many of those, they appeared to stop happening, and instead I got many of the following (in at least a few places):

ODB: collect() failed
java.lang.ClassCastException: com.lambda.Debugger.ReturnLine cannot be cast to com.lambda.Debugger.TraceLine
        at com.lambda.Debugger.TimeStamp.disposable(TimeStamp.java:1547)
        at com.lambda.Debugger.TimeStamp.collect0(TimeStamp.java:1463)
        at com.lambda.Debugger.TimeStamp.collect(TimeStamp.java:1437)
        at com.lambda.Debugger.TimeStamp.addStamp(TimeStamp.java:583)
        at com.lambda.Debugger.TimeStamp.addStamp(TimeStamp.java:557)
        at com.lambda.Debugger.TraceLine.addTrace(TraceLine.java:902)
        at com.lambda.Debugger.D.invoke(D.java:876)
        at org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:619)
        at java.io.DataInputStream.readShort(DataInputStream.java:313)
        at org.apache.activemq.openwire.v12.BaseDataStreamMarshaller.tightUnmarsalCachedObject(BaseDataStreamMarshaller.java:147)
        at org.apache.activemq.openwire.v12.MessageMarshaller.tightUnmarshal(MessageMarshaller.java:62)
        at org.apache.activemq.openwire.v12.ActiveMQMessageMarshaller.tightUnmarshal(ActiveMQMessageMarshaller.java:66)
        at org.apache.activemq.openwire.v12.ActiveMQTextMessageMarshaller.tightUnmarshal(ActiveMQTextMessageMarshaller.java:66)
        at org.apache.activemq.openwire.OpenWireFormat.tightUnmarshalNestedObject(OpenWireFormat.java:456)
        at org.apache.activemq.openwire.v12.BaseDataStreamMarshaller.tightUnmarsalNestedObject(BaseDataStreamMarshaller.java:125)
        at org.apache.activemq.openwire.v12.MessageDispatchMarshaller.tightUnmarshal(MessageDispatchMarshaller.java:71)
        at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:365)
        at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:278)
        at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:240)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:232)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
        at java.lang.Thread.run(Thread.java:748)

At some point, I also started getting ODB: GC could not collect enough to continue. Recording turned off.. However, I don't know if that's related.

I tried for quite a while to figure it out, but I don't know ODB's internals well enough to make good headway. (Is there a source of such information?) However, I did notice something that seems suspicious: in TraceLine.getMethodLine(), the VectorD returned from unfilteredTraceSets contained TraceLines whose times were out of order. I don't KNOW if that's unexpected, but it seems odd. I've attached a screenshot. Note the times of 3, 0, and 403584, in that order.

timestamps_out_of_order

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.