Menu

#269 BYE not handled, leads to ClassCastExceptions

Beta06
review
None
2015-11-23
2015-10-15
No

If a device properly sends a Bye-message on shutdown, remaining data is not cleaned up properly in the client. The leads to ClassCastExceptions in the DefaultReportProvider (trying to cast from the different ContextState-types (DefaultBICEPSLocationContext a.s.o.) to an MDIBObjectLifeCycleListener).

If the Exception is thrown, the entire BICPESClient seems to block or fail, requiring a restart of the java application..

Related

11073-10207 Revision: #270

Discussion

  • Stefan Schlichting

    Could you add a stack trace to the ticket?

     
  • Stefan Schlichting

    • status: open --> investigating
    • assigned_to: Stefan Schlichting
     
  • Volker Kaatz

    Volker Kaatz - 2015-10-16

    This is just one device (hmi) that also uses the client api started and closed. Search for devices may be triggered periodically (20sec interval).

    stack trace:

    [INFO |09:40:14.057] Search timeout.
    [INFO |09:40:14.054] Search timeout.
    [INFO |09:40:15.905] Client: Overwrite subscriptionEndReceived() to receive and handle end of subscriptions
    [INFO |09:40:15.908] Client: Overwrite subscriptionEndReceived() to receive and handle end of subscriptions
    [INFO |09:40:15.908] Client: Overwrite subscriptionEndReceived() to receive and handle end of subscriptions
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: com.draeger.medical.biceps.client.proxy.impl.context.DefaultBICEPSLocationContext cannot be cast to com.draeger.medical.biceps.client.callbacks.MDIBObjectLifeCycleListener
        at com.draeger.medical.biceps.client.communication.impl.DefaultReportProvider.subscriptionEndReceived(DefaultReportProvider.java:1351)
        at com.draeger.medical.biceps.client.impl.DefaultMDPWSClientAdapter.subscriptionEndReceived(DefaultMDPWSClientAdapter.java:908)
        at org.ws4d.java.service.DefaultSubscriptionManager.sendSubscriptionEnd(DefaultSubscriptionManager.java:639)
        at org.ws4d.java.service.DefaultService.stop(DefaultService.java:329)
        at com.draeger.medical.mdpws.domainmodel.impl.device.MDPWSService.stop(MDPWSService.java:893)
        at org.ws4d.java.service.DefaultDevice.stop(DefaultDevice.java:766)
        at com.draeger.medical.biceps.device.impl.DefaultBICEPSDeviceInterface.stop(DefaultBICEPSDeviceInterface.java:580)
        at com.draeger.medical.biceps.device.BICEPSDeviceApplication.stop(BICEPSDeviceApplication.java:110)
        at de.mednovo.hmi.mdif.HMIDeviceApplication.stop(HMIDeviceApplication.java:68)
        at de.mednovo.hmi.HMIStarter.stopApplication(HMIStarter.java:205)
        at de.mednovo.hmi.gui.HMIMainWindow$1$1.windowClosing(HMIMainWindow.java:315)
        at java.awt.Window.processWindowEvent(Window.java:2058)
        at javax.swing.JFrame.processWindowEvent(JFrame.java:297)
        at java.awt.Window.processEvent(Window.java:2017)
        at java.awt.Component.dispatchEventImpl(Component.java:4881)
        at java.awt.Container.dispatchEventImpl(Container.java:2292)
        at java.awt.Window.dispatchEventImpl(Window.java:2739)
        at java.awt.Component.dispatchEvent(Component.java:4703)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
        at java.awt.EventQueue.access$400(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:697)
        at java.awt.EventQueue$3.run(EventQueue.java:691)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.awt.EventQueue$4.run(EventQueue.java:719)
        at java.awt.EventQueue$4.run(EventQueue.java:717)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        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)
    [INFO |09:40:34.064] Search timeout.
    
     
  • Stefan Schlichting

    • status: investigating --> review
     

Log in to post a comment.