Project

General

Profile

Bug #2737

Bug #2677: fix drawing and functional differences between P2J GUI and 4GL GUI

Editor abends on double click

Added by Hynek Cihlar over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

Editor abends.png (6.68 KB) Hynek Cihlar, 09/29/2015 10:43 AM

History

#1 Updated by Hynek Cihlar over 8 years ago

To reproduce, position the cursor so that a double click doesn't result in a word selection, for example in between the first row and the top editor edge and double click. Below is the exception stack trace.

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.charAt(String.java:646)
        at com.goldencode.p2j.ui.client.gui.EditorGuiImpl.mouseClicked(EditorGuiImpl.java:1036)
        at com.goldencode.p2j.ui.client.gui.EditorGuiImpl.mousePressed(EditorGuiImpl.java:794)
        at com.goldencode.p2j.ui.client.gui.driver.MouseHandler.applyMouseEvent(MouseHandler.java:314)
        at com.goldencode.p2j.ui.client.gui.driver.MouseHandler.handleMouseEvent(MouseHandler.java:237)
        at com.goldencode.p2j.ui.client.gui.driver.AbstractGuiDriver.handleMouseEvent(AbstractGuiDriver.java:2046)
        at com.goldencode.p2j.ui.client.TopLevelWindow.processEvent(TopLevelWindow.java:358)
        at com.goldencode.p2j.ui.client.gui.WindowGuiImpl.processEvent(WindowGuiImpl.java:1249)
        at com.goldencode.p2j.ui.chui.ThinClient.processProgressEvent(ThinClient.java:14928)
        at com.goldencode.p2j.ui.chui.ThinClient.processEventsWorker(ThinClient.java:14540)
        at com.goldencode.p2j.ui.chui.ThinClient.pop(ThinClient.java:13624)
        at com.goldencode.p2j.ui.chui.ThinClient.eventBracket(ThinClient.java:13607)
        at com.goldencode.p2j.ui.chui.ThinClient.eventDrawingBracket(ThinClient.java:13533)
        at com.goldencode.p2j.ui.chui.ThinClient.applyWorker(ThinClient.java:13315)
        at com.goldencode.p2j.ui.chui.ThinClient.waitForWorker(ThinClient.java:10736)
        at com.goldencode.p2j.ui.chui.ThinClient.waitFor(ThinClient.java:10245)
        at com.goldencode.p2j.ui.chui.ThinClient.waitFor(ThinClient.java:10199)

#2 Updated by Constantin Asofiei over 8 years ago

Hynek, do you have a 4GL testcases and a branch/revision where you see this? I'm having trouble recreating it.

#3 Updated by Hynek Cihlar over 8 years ago

Constantin Asofiei wrote:

Hynek, do you have a 4GL testcases and a branch/revision where you see this? I'm having trouble recreating it.

I can reproduce it with trunk rev 10940 on uast/demo/demo_widgets.p. See the attached screen shot, the cursor point to the location where to double click.

The call stack when the exception is raised:

Thread [main] (Suspended (exception StringIndexOutOfBoundsException))    
    String.charAt(int) line: 646    
    EditorGuiImpl.mouseClicked(MouseEvent) line: 1036    
    EditorGuiImpl.mousePressed(MouseEvent) line: 794    
    MouseHandler.applyMouseEvent(Widget<GuiOutputManager>, MouseEvent) line: 313    
    MouseHandler.handleMouseEvent(int, MouseEvent) line: 236    
    SwingGuiDriver(AbstractGuiDriver<F>).handleMouseEvent(int, MouseEvent) line: 2051    
    WindowGuiImpl(TopLevelWindow<O>).processEvent(Event) line: 353    
    WindowGuiImpl.processEvent(Event) line: 1229    
    ThinClient.processProgressEvent(Event) line: 14862    
    ThinClient.processEventsWorker() line: 14479    
    ThinClient.pop() line: 13563    
    ThinClient.eventBracket(boolean, Runnable) line: 13546    
    ThinClient.eventDrawingBracket(Widget<?>, boolean, boolean, Runnable) line: 13472    
    ThinClient.applyWorker(Event) line: 13254    
    ThinClient.waitForWorker(EventList, int, int, ScreenBuffer, boolean, boolean, boolean, BlockingOperation) line: 10712    
    ThinClient.waitFor(EventList, int, int, ScreenBuffer, BlockingOperation, boolean) line: 10221    
    ThinClient.waitFor(EventList, int, int, ScreenBuffer) line: 10175    
    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: 497    
    MethodInvoker.invoke(Object[]) line: 76    
    Dispatcher.processInbound(InboundRequest, boolean, NetResource) line: 703    
    Conversation.block() line: 319    
    Conversation.waitMessage(int) line: 257    
    Queue.transactImpl(Message, int) line: 1128    
    Queue.transact(Message, int) line: 585    
    DirectSession(BaseSession).transact(Message, int) line: 223    
    HighLevelObject.transact(RoutingKey, Object[]) line: 163    
    RemoteObject$RemoteAccess.invokeCore(Object, Method, Object[]) line: 1425    
    RemoteObject$RemoteAccess(InvocationStub).invoke(Object, Method, Object[]) line: 97    
    $Proxy4.standardEntry(ClientParameters) line: not available    
    ClientCore.start(BootstrapConfig, boolean, boolean) line: 277    
    ClientCore.start(BootstrapConfig, boolean) line: 100    
    ClientDriver.start(BootstrapConfig) line: 201    
    ClientDriver(CommonDriver).process(String[]) line: 398    
    ClientDriver.process(String[]) line: 1    
    ClientDriver.main(String[]) line: 267    

#4 Updated by Constantin Asofiei over 8 years ago

OK, I've managed to duplicate it in rev 1811r, too.

#5 Updated by Greg Shah over 8 years ago

  • Parent task set to #2677
  • Start date deleted (09/27/2015)

#6 Updated by Greg Shah over 8 years ago

  • Assignee set to Constantin Asofiei

#7 Updated by Constantin Asofiei over 8 years ago

Fixed in #1811 (1811r rev 10967)

#8 Updated by Greg Shah over 8 years ago

  • Target version set to Milestone 12
  • Status changed from New to Closed

#9 Updated by Greg Shah over 8 years ago

  • % Done changed from 0 to 100

#10 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 12 to GUI Support for a Complex ADM2 App

Also available in: Atom PDF