Client Compiling Issues

Forum for alternative clients, mods & discussions on the same.

Client Compiling Issues

Postby Ethan » Mon Nov 23, 2015 8:33 am

Hey guys,

I have managed to get the client to compile,

However when I try and run the complied version I get:

Code: Select all
     [java] Exception in thread "Haven main thread" java.lang.Error: java.lang.reflect.InvocationTargetException
     [java]    at haven.MainFrame.javabughack(MainFrame.java:363)
     [java]    at haven.MainFrame.main2(MainFrame.java:376)
     [java]    at haven.MainFrame.access$1(MainFrame.java:373)
     [java]    at haven.MainFrame$7.run(MainFrame.java:424)
     [java]    at java.lang.Thread.run(Thread.java:745)
     [java] Caused by: java.lang.reflect.InvocationTargetException
     [java]    at java.awt.EventQueue.invokeAndWait(EventQueue.java:1319)
     [java]    at java.awt.EventQueue.invokeAndWait(EventQueue.java:1294)
     [java]    at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1348)
     [java]    at haven.MainFrame.javabughack(MainFrame.java:354)
     [java]    ... 4 more
     [java] Caused by: java.lang.ExceptionInInitializerError
     [java]    at haven.MainFrame$5.run(MainFrame.java:357)
     [java]    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
     [java]    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
     [java]    at java.awt.EventQueue.access$500(EventQueue.java:97)
     [java]    at java.awt.EventQueue$3.run(EventQueue.java:709)
     [java]    at java.awt.EventQueue$3.run(EventQueue.java:703)
     [java]    at java.security.AccessController.doPrivileged(Native Method)
     [java]    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
     [java]    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
     [java]    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
     [java]    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
     [java]    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
     [java]    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
     [java]    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
     [java]    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
     [java] Caused by: java.lang.NullPointerException
     [java]    at haven.Resource.loadtex(Resource.java:1615)
     [java]    at haven.LoginScreen.<clinit>(LoginScreen.java:38)
     [java]    ... 15 more


Digging a little deeper it looks like the texture types are not being loaded into ltypes in resource.java

The most I can track it down is to this block of code:

Code: Select all
    static {
   for(Class<?> cl : dolda.jglob.Loader.get(LayerName.class).classes()) {
       String nm = cl.getAnnotation(LayerName.class).value();
       if(LayerFactory.class.isAssignableFrom(cl)) {
      try {
          addltype(nm, cl.asSubclass(LayerFactory.class).newInstance());
      } catch(InstantiationException e) {
          throw(new Error(e));
      } catch(IllegalAccessException e) {
          throw(new Error(e));
      }
       } else if(Layer.class.isAssignableFrom(cl)) {
      addltype(nm, cl.asSubclass(Layer.class));
       } else {
      throw(new Error("Illegal resource layer class: " + cl));
       }
   }
    }


The loop doesn't even run once?

built using jdk1.8.0_66 x64 on windows 10.

if anyone has any ideas or a way I can track down what is causing the issue?
Ethan
 
Posts: 162
Joined: Sat Apr 03, 2010 11:14 am

Re: Client Compiling Issues

Postby shubla » Mon Nov 23, 2015 12:11 pm

You dont have to compile client yourself. People have compiled it ready for you. For example Purus Pasta is only 1 away from you!

Also please post build.xml that you are trying to compile it with.
Image
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
User avatar
shubla
 
Posts: 13043
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: Client Compiling Issues

Postby APXEOLOG » Mon Nov 23, 2015 2:03 pm

Do you run jar, or just run Java Application from IDE? You should run jar file itself, because loftar scan it for RName and Layer interface implenetations.

shubla wrote:You dont have to compile client yourself. People have compiled it ready for you

That's strange answer
W10 Meme Plot | W9 Mantis Garden | W8 Core | W7 Ofir | W6 the City of Dis | W5 Vitterstad | W4 A.D. | W3 Mirniy
jorb wrote:All your characters will be deleted, and I will level every village any one of them were ever members of.
User avatar
APXEOLOG
 
Posts: 1267
Joined: Fri Apr 23, 2010 7:58 am
Location: Somewhere on Earth

Re: Client Compiling Issues

Postby Ethan » Mon Nov 23, 2015 7:40 pm

Thanks APXEOLOG,

Tried both ways with eclipse, didn't work.
Seems to work fine with the ANT version/configuration that comes with intelliJ...
Whats the best way to attach a debugger to it, when not running it from the IDE?

because loftar scan it for RName and Layer interface implenetations.


If you don't mind could you expand on this?
Ethan
 
Posts: 162
Joined: Sat Apr 03, 2010 11:14 am

Re: Client Compiling Issues

Postby borka » Mon Nov 23, 2015 7:48 pm

-snip-
shubla wrote:Also please post build.xml that you are trying to compile it with.

https://github.com/dolda2000/hafen-clie ... /build.xml
Last edited by borka on Tue Nov 24, 2015 9:20 am, edited 2 times in total.
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Client Compiling Issues

Postby APXEOLOG » Mon Nov 23, 2015 7:51 pm

Ethan wrote:Thanks APXEOLOG,

Tried both ways with eclipse, didn't work.
Seems to work fine with the ANT version/configuration that comes with intelliJ...
Whats the best way to attach a debugger to it, when not running it from the IDE?

Remote Debug is perfect. All you need is to modify run.bat a bit (args provided by IDEA Remote Debug)
More: https://www.jetbrains.com/idea/help/run ... emote.html

Ethan wrote:If you don't mind could you expand on this?

According to loftar's architecture server may constract any type of widget on the client. This widgets are conscructed by factories annotated with @RName annotation. At the startup loftar scans whole jar file to find all this annotated factories and to add them into map. Same with Resources, wich may contain any number of @Layer's.
W10 Meme Plot | W9 Mantis Garden | W8 Core | W7 Ofir | W6 the City of Dis | W5 Vitterstad | W4 A.D. | W3 Mirniy
jorb wrote:All your characters will be deleted, and I will level every village any one of them were ever members of.
User avatar
APXEOLOG
 
Posts: 1267
Joined: Fri Apr 23, 2010 7:58 am
Location: Somewhere on Earth

Re: Client Compiling Issues

Postby Ethan » Mon Nov 23, 2015 8:09 pm

APXEOLOG wrote:
Ethan wrote:Thanks APXEOLOG,

Tried both ways with eclipse, didn't work.
Seems to work fine with the ANT version/configuration that comes with intelliJ...
Whats the best way to attach a debugger to it, when not running it from the IDE?

Remote Debug is perfect. All you need is to modify run.bat a bit (args provided by IDEA Remote Debug)
More: https://www.jetbrains.com/idea/help/run ... emote.html

Ethan wrote:If you don't mind could you expand on this?

According to loftar's architecture server may constract any type of widget on the client. This widgets are conscructed by factories annotated with @RName annotation. At the startup loftar scans whole jar file to find all this annotated factories and to add them into map. Same with Resources, wich may contain any number of @Layer's.


Cheers man,

Yeah I just got it working sweetly with remote debug.
Default configuration using port 5005 in IDEA.
Then running the JAR with this:

Code: Select all
java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 hafen.jar -U http://game.havenandhearth.com/hres/ game.havenandhearth.com


Incase anyone is interested.
Ethan
 
Posts: 162
Joined: Sat Apr 03, 2010 11:14 am


Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 90 guests