Skip to main content
Kofax

Design Studio Device/Desktop Automation step workflow editor crashes

307263

Question / Problem: 

If the customer gets a stack trace in Design Studio when opening a device automation step workflow:
Stack trace:
java.lang.NullPointerException
    at com.kapowtech.connector.platform.studio.editor.robot2.worldview.WorldPresenter.lambda$updateApplicationIcon$466(WorldPresenter.java:615)
    at com.kapowtech.connector.platform.studio.ide.project.BackgroundWorker.done(BackgroundWorker.java:48)
    at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
    at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
    at javax.swing.Timer.fireActionPerformed(Timer.java:313)
    at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
    at java.awt.Dialog.show(Dialog.java:1084)
    at kapow.util.gui.JOkAndCancelButtonDialog.show(JOkAndCancelButtonDialog.java:257)
    at java.awt.Component.show(Component.java:1671)
    at java.awt.Component.setVisible(Component.java:1623)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1005)
    at kapow.util.gui.JOkAndCancelButtonDialog.setVisible(JOkAndCancelButtonDialog.java:276)
    at com.jidesoft.docking.DefaultDockingManager.showInitial(Unknown Source)
    at com.jidesoft.docking.DefaultDockingManager.t(Unknown Source)
    at com.jidesoft.docking.DefaultDockingManager.h(Unknown Source)
    at com.jidesoft.docking.DefaultDockingManager.resetToDefault(Unknown Source)
    at com.jidesoft.swing.AbstractLayoutPersistence.setLayoutRawData(Unknown Source)
    at kapow.framework.bean.propertyeditor.BeanEditorDialogCustomEditor.showDialog(BeanEditorDialogCustomEditor.java:147)
    at kapow.framework.bean.propertyeditor.BeanEditorDialogCustomEditor.lambda$new$1398(BeanEditorDialogCustomEditor.java:86)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6533)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2237)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2295)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
    at java.awt.Container.dispatchEventImpl(Container.java:2281)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

and the DAS log contains this:
2019-04-02 09:40:26,819 [0x1270] ERROR com.kapowhub.drivers.automationnative win32automation.cc:1389 Getting screenshot; retrieving bitmap failed with error 5
2019-04-02 09:40:26,820 [0x1270] ERROR com.kapowhub.drivers.automationnative application.cc:117 GetScreenShot(): GetClippedScreenShotOfWindow() returned null
2019-04-02 09:40:26,810 [12] DEBUG DAS - Execution error: Error: Screenshot is null 

Answer / Solution: 

It is a streaming error that can be fixed by modifying a javascript file for 10.4:
in C:\Program Files (x86)\Kofax RPA DesktopAutomation 10.4.0.0 183 x32\DesktopAutomationService\node_modules\server\Stream.js

for 10.3:
in C:\Program Files (x86)\Kofax RPA DeviceAutomation 10.4.0.0 183 x32\DesktopAutomationService\node_modules\server\Stream.js

replace line 63 with below:

let image;                 
try {                     
    image = application.getImage();                 
}                 
catch (err) {                     
    console.log('Error: Unable to extract image of ' + application.id + ': ' + err);                 
}                 
if (image !== undefined) {                     
    server.sendMessage(imageMessage(application.driver, application.id, image));                 
}

This is applicable for 10.3.2.0-2 and 10.4.0.0.

 

Applies to:  

Product Version Category
Kapow

10.3.2.0-2

10.4.0.0

Bug Fix

 

Author:  Dave Marti