skadistats / clarity-examples

Example code for clarity
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

dtinspector is not working #31

Closed lpeter218065 closed 8 years ago

lpeter218065 commented 8 years ago

Hi,

I cloned the example repo, and run "mvn -P dtinspector package" then "java -jar target/dtinspector.one-jar.jar 2367566543.dem", afterwards error pops up.

Here is the detail call stack. Can you please help me?

java.lang.ClassCastException: skadistats.clarity.decoder.s2.S2DTClass cannot be cast to skadistats.clarity.decoder.s1.S1DTClass at skadistats.clarity.examples.dtinspector.TreeConstructor.(TreeConstructor.java:42) at skadistats.clarity.examples.dtinspector.Main$1.run(Main.java:28) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

lpeter218065 commented 8 years ago

@spheenik

spheenik commented 8 years ago

This is an old example that obviously needs some love... Will try to fix soon-ish.

spheenik commented 8 years ago

Some background: In Source 1 replays, one could deduce the class hierarchy from the replay file, this is not possible in Source 2 anymore. Furthermore, subtables were always fixed size in S1, and could be flattened. Because of these changes, I never ported the example from S1.

I made it run now, but since it does only show a flat hierarchy of classes, and because sub-serializers are not inlined, I recommend using clarity analyzer to see what data is available.