This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When building our application with version 10 of the netbeans platform, calls to the setDelegates() method of MultiFileSystem cause RequestProcessor threads to be created by org.netbeans.modules.options.CategoryModel. With each call to setDelegates(), the number of threads created increases. The threads are named "openide-request-processor-xxx" for some number xxx. These threads can number in the hundreds, and eventually, this leads to an OutOfMemoryError : cannot create new native thread. At a first glance, it looks as if CategoryModel adds a listener to a particular lookup which never gets removed. As the number of listeners increases, the number of calls to the RequestProcessor, which is implemented as CategoryModel$1, increases also.
Fixed. core-main #d11177552bb4
So will this be available in a development build? If so, when will that build be ready? Thanks!
You will be notified when dev build with this fix is ready. It should be within one or two days.
Created attachment 93085 [details] Memory Profile Two memory profiles, two minutes apart, showing hundreds of megabytes allocated to the CategoryModel objects.
It seems the threads are being cleaned up properly, but many objects are still being created (see "Memory Profile" screenshot). The side effect of this is that it takes a minimum of 30 seconds (up to several minutes) to open the options panel. We are using Netbeans Development Harness 091111.
It seems the old listener is still not being removed in CategoryModel.
Any news? We are eagerly awaiting this fix. A status update would be greatly appreciated. Thanks, Pouyan
Changed priority to highest in the hopes that somebody will respond.
Please see line 296 here: http://hg.netbeans.org/core-main/file/d11177552bb4/options.api/src/org/netbeans/modules/options/CategoryModel.java#l296 The this reference is added as a new listener but never removed from the old lookup. Is this the culprit? When do you estimate this bug will be resolved?
rev/32486572ed7f
Integrated into 'main-golden', will be available in build *201002040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/32486572ed7f User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #176297: Many RequestProcessor threads created when the master filesystem changes.