App freeze during abbot swt drag and drop

Help
2008-12-05
2013-05-20
  • Luchesar Cekov
    Luchesar Cekov
    2008-12-05

    Hi

    I recently found abbot and  abbot.swt and I find them extremely useful for writing unit tests for visual applications. I am using abbot.swt to test my eclipse RCP application.

    When Drag and drop is performed the application will eventual stuck on method:
    tester.dragDrop(centerButton.x, centerButton.y, centerCanvas.x, centerCanvas.y,
                        SWT.BUTTON1);
    The entire application screen freezes just before the drag operation is started. If drag operation start it may block entire screen and force me to restart the XServer session. Sometimes the drag and drop operation is performed properly but these are rare occasions.

    I also tried
    tester.actionDragDrop(centerButton.x, centerButton.y, centerCanvas.x, centerCanvas.y,
                        SWT.BUTTON1);
    But there is no difference. The application still freezes most of the times on the drag and drop operation.

    Is there anything I am doing wrong or this is bug in abbot or eclipse?
    Below is part of the java thread dump related to the problem method where JVM is freeze:

    "abbot.swt.user" daemon prio=10 tid=0x00002aaaf8863c00 nid=0x6a45 in Object.wait() [0x0000000043042000..0x0000000043043d80]
       java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaab49238d8> (a org.eclipse.swt.internal.Lock)
        at java.lang.Object.wait(Object.java:485)
        at org.eclipse.swt.internal.Lock.lock(Lock.java:34)
        - locked <0x00002aaab49238d8> (a org.eclipse.swt.internal.Lock)
        at org.eclipse.swt.internal.gtk.OS.GDK_DISPLAY(OS.java:1089)
        at org.eclipse.swt.widgets.Display.post(Display.java:2904)
        - locked <0x00002aaaaf694498> (a java.lang.Class for org.eclipse.swt.graphics.Device)
        at abbot.swt.Robot.post(Robot.java:847)
        at abbot.swt.Robot.postMouseMove(Robot.java:783)
        at abbot.swt.Robot.mouseMovePrim(Robot.java:415)
        at abbot.swt.Robot.mouseDragDrop(Robot.java:393)
        - locked <0x00002aaaee65c808> (a abbot.swt.Robot)
        at abbot.swt.tester.AbstractTester.dragDrop(AbstractTester.java:872)
        at com.ontologypartners.modeller.test.EditorWidgetTest.testDNDFromThePallet(EditorWidgetTest.java:234)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at abbot.swt.junit.extensions.SWTTestCase.runBareWrapper(SWTTestCase.java:278)
        at abbot.swt.junit.extensions.SWTTestCase.access$2(SWTTestCase.java:275)
        at abbot.swt.junit.extensions.SWTTestCase$4.execute(SWTTestCase.java:252)
        at abbot.swt.junit.extensions.UserThread.run(UserThread.java:75)

    I can send you the entire stack trace if it is needed.

    Thanks in advance,
    Best regards,
    Luchesar