I chose to use Expanders for a simple user interface - my first flying almost solo - and I've been seeing weird behavior.
My system: Intel(R) Core(TM) i7-3770K 8 GB Linux kernel: 3.4.6-1 Pivot 2.0.2 KDE 4.9.00 Java 7u7 64-bit (compiling to 1.6) Eclipse 4.2 Firefox 15.0.1-1 Chromium ver. 21.0.1180.89 (154005) I have run the attached within both Eclipse and at the console with essentially the same results. I mention the browsers, because I see the same behavior when I simply open the Pivot Expanders Tutorial page at: http://pivot.apache.org/tutorials/expanders.html Besides the tutorial page, I've attached two files that reproduce the behavior in my environment. Essentially the behavior is: Browsers (tutorial page) and console running ap: Increase in CPU load from <5% average on all 4 to 45%+; increase in memory usage from ~2.1 G to ~3.5 G in ~10 minutes and continuing to climb. Eclipse running the ap: A memory leak that eventually results in a JVM shutdown due to GC memory being exceeded but more quickly than seen at console or in browser. I believe the error occurs after 15 - 20 minutes. CPU usage is also higher in Eclipse with at least 2 CPUs cycling to 100% at all times. Keyboard function degrades to no <Delete> key and no cut and paste functionality (could be the clipboard rather than the keyboard). Navigating away from the Expanders tutorial page or closing the application restores the system's performance to as it was before. Memory usage drops from (3.6 G to 2.1 G) in less than a minute, usually ~30 sec. I'm not very experienced at using profilers. The above info was gathered from KDE's System Monitor. If there are more data points I should gather, please let me know what they are and I will learn how to gather them, if I have to. I double checked the other Navigation Containers, and I did the whole tutorial, and this was the only instance of weird behavior I've noted. Thanks for your support and continuous work to make Pivot a class product. Greg
import org.apache.pivot.beans.BXMLSerializer;
import org.apache.pivot.collections.Map;
import org.apache.pivot.wtk.Application;
import org.apache.pivot.wtk.DesktopApplicationContext;
import org.apache.pivot.wtk.Display;
import org.apache.pivot.wtk.Window;
public class SimpleExpandersBXML implements Application
{
private Window window;
@Override
public void resume() throws Exception
{
}
@Override
public boolean shutdown( boolean optional ) throws Exception
{
if ( window != null )
{
window.close();
}
return false;
}
@Override
public void startup( Display display, Map<String, String> properties )
throws Exception
{
BXMLSerializer bxmlSerializer = new BXMLSerializer();
window = (Window)bxmlSerializer.readObject(
SimpleExpandersBXML.class, "simpleExpanders.bxml" );
window.setPreferredSize( 50, 100 );
window.open( display );
} // end method startup()
@Override
public void suspend() throws Exception
{
// TODO Auto-generated method stub
}
public static void main( String[] args )
{
DesktopApplicationContext.main( SimpleExpandersBXML.class, args );
} // end method main()
} // end class HelloBXML
simpleExpanders.bxml
Description: XML document
