Skip to content

IdElement Queries fail on remote hosts #2

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Create an Enactor in application A
2. Create a widget in application B
3. Subscribe Enactor in A to widget in B with RuleQueryItem.instance(new 
IdElement("full-widget-id"));

What is the expected output? What do you see instead?
The Enactor should react to changes in the widget. Instead, nothing happens.
The same query works in application B and binding on different properties (for 
example: class name && constant attribute "id" as a workaround) works in 
application A.

What version of the product are you using? On what operating system?
Linux, SVN version (revision 42).

Please provide any additional information below.

I get null pointer exception(s) in 
EnactorSubscriptionManager::handleNewComponent() when subscribing the Enactor 
from A. Curiously, they also appear during a "successful" link (when setting up 
to the class name, for example and catching the null pointer before it causes 
the exception) but only when connecting to a discoverer that was started in 
another application.

I added a bit of debug output:

protected synchronized void handleNewComponent(ComponentDescription cd) {
  LOGGER.info("handling new component " + cd.id);
  System.out.println("Handle new component: " + cd.id);
  System.out.println("   |- Enactor: " + enactor.id + " outcome: " + enactor.outcomeValue);

  // ...

  for (AbstractQueryItem<?,?> subscriptionQuery : enactor.getSubscriptionQueries()) {           
    System.out.println("   |- Subscription query: " + subscriptionQuery);
    if (subscriptionQuery == null) {
        System.out.println("DEBUG: Skipping null query");
        continue;
    }

    // [...]
  }
}

... which yields this output (on a "successful" (!) subscription):

Handle new component: ViewpointWidget_Station1
   |- Enactor: at.tugraz.ist.Context.LocationGenerator_eucleia_User outcome: null
   |- Subscription query: null
DEBUG: Skipping null query
   |- Subscription query: andQueryItem
    child[0] = QueryItem: constAtt: name=trackedObject,type=class java.lang.String,subAtts=null,value=User,by=null,time=0 ATTRIBUTE_EQUAL
    child[1] = QueryItem: classname: LocationWidget EQUAL
Handle new component: AmbientNoiseWidget_Station1
   |- Enactor: at.tugraz.ist.Context.LocationGenerator_eucleia_User outcome: null
   |- Subscription query: null
DEBUG: Skipping null query
   |- Subscription query: andQueryItem
    child[0] = QueryItem: constAtt: name=trackedObject,type=class java.lang.String,subAtts=null,value=User,by=null,time=0 ATTRIBUTE_EQUAL
    child[1] = QueryItem: classname: LocationWidget EQUAL
Handle new component: PlayerWidget_Station1
   |- Enactor: at.tugraz.ist.Context.LocationGenerator_eucleia_User outcome: null
   |- Subscription query: null
DEBUG: Skipping null query
   |- Subscription query: andQueryItem
    child[0] = QueryItem: constAtt: name=trackedObject,type=class java.lang.String,subAtts=null,value=User,by=null,time=0 ATTRIBUTE_EQUAL
    child[1] = QueryItem: classname: LocationWidget EQUAL

I'd be happy to provide any further information you might need to track down 
this problem.

Original issue reported on code.google.com by petergra...@gmail.com on 25 Jul 2012 at 5:40

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions