Wednesday, March 13, 2019

Re: Unexpected behavior

Paul:

I appreciate your prompt response and suggestions.

Yes, I'm aware of the toString() on a null object. My attempt is to identify how it landed on statement that doesn't make any sense to me.

That's the main issue. As you suggested I attempted to get more meaningful exception stack. Tried the following set of parameters, still I only get a cryptic message.

-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" 
-startupUrl Peruse.html 
-logLevel ALL 
-style PRETTY 
-XmethodNameDisplayMode FULL 
-gen DEBUGGING 
-codeServerPort 9997 
-port 8888 
-war /.../.../.../Repository/peruse/war com.peruselab.peruse.Peruse

Does that combination make sense? I do see a ton of activity in the Eclipse console but no use in the stack trace.

On Tuesday, March 12, 2019 at 6:13:46 PM UTC-4, Paul Robinson wrote:
I don't think you're showing us enough code. The exception indicates something is calling toString() on a null object, but there's nothing in what you've shown us that calls a toString() method.

Try compiling in pretty mode with full stack traces. You'll see better error information.

Paul

On Tue, 12 Mar 2019, 21:53 Velusamy Velu, <kool...@gmail.com> wrote:

Adding a larger screen clip.


Screen Shot 2019-03-12 at 5.40.52 PM.png



On Tuesday, March 12, 2019 at 5:48:59 PM UTC-4, Velusamy Velu wrote:
Friends:

I'm developing a Chemical drawing tool and have been progressing steadily with a lot of difficulties. My technology stack is Java 8, GWT 2.8.2, GMD 2.x, Eclipse Photon, running on a MacBook Pro, and Chrome | Firefox | Opera for testing. A limited functioning pilot is running at http://peruselab.com.

I just ran into a trouble that I couldn't figure out on my own. Below are the relevant snippets of code that's causing trouble. The call (1) ActionHandlerMap.getHandler(action) is expected to return an instance of PeruseEventHandler. I expect the sequence of execution to be 1, 2, & 3. However, upon returning from 2 (verified with the debugger) I see the control going to 4 (screen clip 1) followed by throwing an exception (screen clip 2). Any idea what could be wrong? Your help will be greatly appreciated.

...

  PeruseEventHandler eventHandler = ActionHandlerMap.getHandler(action); // 1

  Globals.currentShape = eventHandler.handle(null, null); // 3
...

public class ActionHandlerMap {

  public static final Map<Action, PeruseEventHandler> ACTION_HANDLER_MAP = new HashMap<>();


  static {

    ACTION_HANDLER_MAP.put(Action.DRAW_SINGLE_BOND, new SingleBondDrawingHandler());

  }


  public static PeruseEventHandler getHandler(Action anAction) {

    return ACTION_HANDLER_MAP.get(anAction); // 2

  }

}


public
class Globals {

  public static Action action;

  public static Shape currentShape; // 4

}

Enter code here...


Screen Shot 2019-03-12 at 5.36.35 PM.png

Screen clip 1



Screen Shot 2019-03-12 at 5.40.52 PM.png



--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment