cleanConnectorMap unregistered connector error with custom layout

Hello, Im having a bit of a problem with these messages, with a component I created using a customlayout, everytime I move out of the containing view I get a lots of warnings for each component on my customcomponent:

cleanConnectorMap unregistered connector com.vaadin.ui.Label,
cleanConnectorMap unregistered connector com.vaadin.ui.Image,
cleanConnectorMap unregistered connector com.vaadin.ui.HorizontalLayout,
cleanConnectorMap unregistered connector com.vaadin.ui.Button(477)
etc etc…

The problem is that the application begin to slowdown when more of this components are created, and Im assuming that these elements are not beeing removed from the aplication correctly.

There is something I need to do to safe unregister the elements components of my custom component?
I have tried to clean the container layout before I move out from the view :

public void navigateTo(String viewname){
       if(this.currentView.equalsIgnoreCase(InboxView.VIEW_NAME)) {
             View v =viewRep.get(this.currentView);
                 if(v!=null && v instanceof InboxView){
                    InboxView in = (InboxView)v;
                    in.clearInbox();
}
..
..
}
public void clearInbox(){
 zvlyInbox.removeAllComponents();
 taskList.clear();
 markAsDirtyRecursive();
}

thanks in advance…

Hi - Your post is a bit old … but …

I currently experience the same behavior. Did You find any reason and/or solution?

Greetings, Volker

2016-08-25 14:37:53.710 MESZ [p-nio-80-exec-8]
 WARN  [ConnectorTracker]
 [xyz]
 - Unregistered Label (9113) that was already unregistered.
2016-08-25 14:37:53.711 MESZ [p-nio-80-exec-8]
 WARN  [ConnectorTracker]
 [xyz]
 - Unregistered TextField (9115) that was already unregistered.
[...]

2016-08-25 14:37:53.724 MESZ [p-nio-80-exec-8]
 WARN  [ConnectorTracker]
 [xyz]
 - cleanConnectorMap unregistered connector com.vaadin.ui.Button(9300) (parent: com.vaadin.ui.VerticalLayout(9297)). This should have been done when the connector was detached.
2016-08-25 14:37:53.724 MESZ [p-nio-80-exec-8]
 WARN  [ConnectorTracker]
 [xyz]
 - cleanConnectorMap unregistered connector x.y.z.SomeClass(9256) (parent: com.vaadin.ui.VerticalLayout(678)). This should have been done when the connector was detached.
[...]

Nobody?

Hi! sorry I didn’t see your message. I think this messages mean that you are losing the reference of some instances of this objects.

The problem in my case was that I was removing an element from a layout, but that does not mean that it was destroyed, so the instances of the Label, Button or other component that I removed from a layout still exist some where in the memory, but the references were lost.

A little example:

Label a = new Label(“label a”);
Button b = new Button(“button b”);
HorizontalLayout hlayout = new HorizontalLayout( a, b);

If you call at some point:
hlayout.removeAllComponents();

The instances of Label a and Button b still exist and you can still use them. But if you have something like:

HorizontalLayout hlayout = new HorizontalLayout( new Label(“label a”), new Button(“button b”) );

and you call
hlayout.removeAllComponents();

you lost the reference of the label and button you just created, but the instances of those elements still exist somewhere in the app.

In my case I was creating my inbox components exactly like that :

public void loadInbox(){
clearInblox();
ArrayList messages = getMesssages();
for(Message m: messages){
zvlyInbox.addComponent( new CardMessage(m) );
}
}

And when I called zvlyInbox.removeAllComponents() all the references to the CardMessage instances were lost and were piling up in my memory.

I hope this help you.
Greetings.

Thank you for your answer. Yes - this seems to be a possible reason for the log-entries since I do similar things to the ones you describe.

I’ll see if I can modify the code somehow. Knowing the background I’m somehow settled :wink:

Greetings, Volker

Hi. I have simular issues with the Filteringtable containing Icons after a view change. I am not removing elements, just chaning the view, any idea how to avoid those warnings?