google-code-export / gwt-platform

Automatically exported from code.google.com/p/gwt-platform
1 stars 0 forks source link

When PresenterWidget is bound as a singleton and a Provider is used to add it more than once to a slot #428

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When a PresenterWidget is bound as a singleton and a provider is used to get it 
and it is added a slot more than once the IDE debugger will crash on both 
IntelliJ and Eclipse.

It crashes here with no warning or logging. 
http://code.google.com/p/gwt-platform/source/browse/gwtp-core/gwtp-mvp-client/sr
c/main/java/com/gwtplatform/mvp/client/PresenterWidget.java#480

What steps will reproduce the problem?
1. Bind a presenter widget as a singleton
2. add the single presenter widget to another presenter's slot more than once

Both IntelliJ and eclipse got hung up and crashed at the assertion isVisible. I 
might suggest an exception when not visible. 

Original issue reported on code.google.com by branflak...@gmail.com on 20 Jul 2012 at 10:03

GoogleCodeExporter commented 9 years ago
It's a singleton, it should never be used like this without calling unbind 
first.

I'm also suspecting an infinite loop if both IDE crashes

Original comment by goudreau...@gmail.com on 27 Nov 2012 at 3:07