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.

Bug 136931 - FolderLookup used from DataLoaderPool$1MimeEnum.delegate
Summary: FolderLookup used from DataLoaderPool$1MimeEnum.delegate
Status: RESOLVED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: Build System (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Petr Suchomel
URL: http://konik-z2.czech.sun.com:8080/hu...
Keywords:
: 137944 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-10 16:01 UTC by Jesse Glick
Modified: 2008-11-20 11:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack traces (8.23 KB, text/plain)
2008-06-10 16:02 UTC, Jesse Glick
Details
Requested log file (62.43 KB, text/plain)
2008-08-04 19:11 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-06-10 16:01:36 UTC
See stack traces.
Comment 1 Jesse Glick 2008-06-10 16:02:48 UTC
Created attachment 62629 [details]
Stack traces
Comment 2 Jaroslav Tulach 2008-07-22 13:33:58 UTC
*** Issue 137944 has been marked as a duplicate of this issue. ***
Comment 3 Jesse Glick 2008-07-22 20:47:38 UTC
Duplicate was P2.
Comment 4 Lukas Hasik 2008-07-25 13:26:14 UTC
Product Version: NetBeans IDE Dev (Build 20080725075415)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

cannot create new mobility project -> needs to be fixed for 6.5.
Leaving as P2 because after restart of IDE it works but this workaround isn't something acceptable for release...
Comment 5 Jaroslav Tulach 2008-07-25 15:31:24 UTC
I do not know how the problem can happen:
http://hg.netbeans.org/core-main/rev/bdcabe2c7cf2
Comment 6 Jesse Glick 2008-07-25 17:53:13 UTC
Perhaps some extra assertions in openide.datasystems and/or vmd.io.javame would be in order? I still do not grasp how
the assertion about MimeEnum relates to the originally reported problem in issue #137944, which is that
MEDesignDataLoader.createMultiObject is incorrectly being called on a *.java for which no *.vmd exists (and for which
presumably findPrimaryFile would have returned null).
Comment 7 Jaroslav Tulach 2008-08-04 15:55:24 UTC
Please reopen with new logfiles.

changeset:   94382:3343923c80ec
tag:         tip
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Mon Aug 04 16:54:05 2008 +0200
summary:     #136931: Unsuccessfully trying to emulate the starvation in FolderLookup. Thus at least extending the 
diagnosting messages.
Comment 8 Jaroslav Tulach 2008-08-04 19:11:54 UTC
Created attachment 66519 [details]
Requested log file
Comment 9 Jaroslav Tulach 2008-08-04 19:12:46 UTC
I think I have what I asked for.
Comment 10 Jaroslav Tulach 2008-08-04 19:51:03 UTC
The mobility case, the one that motivated this issue to be P2, seems to be caused by some thread trying to access 
dataobjects before they are fully constructed. In the last log, the 
http://www.netbeans.org/nonav/issues/showattachment.cgi/66519/messages.log
the following situation happened:
1. AWT thread cannot finish createFromTemplate, because it needs to recognize files on SFS
2. recognition is send to Folder Recognizer thread and waiting to be processed
3. TEXT_SWITCH_SUPPORT waits for Folder Recognizer to recognize DataFolder.getChildren()
4. but Folder Recognizer is blocked, as the getChildren() are not yet created (due to #1 not finished)

So #1 is waiting for #2 and #3 is waiting for #4 which waits for #1. Deadlock. This kind of deadlock is unfixable in 
openide.loaders and that is why there is a detection to recover from it after 10s being blocked.

The fix shall be made in mobility, I think. Disable TEXT_SWITCH_SUPPORT and things start to work...
Comment 11 Quality Engineering 2008-08-05 16:35:52 UTC
Integrated into 'main-golden', available in build *200808051401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/3343923c80ec
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #136931: Unsuccessfully trying to emulate the starvation in FolderLookup. Thus at least extending the diagnosting messages.
Comment 12 Petr Suchomel 2008-08-06 17:26:29 UTC
I moved initialization of code which starts handling of TEXT_SWITCH from constructor to ProjectOpenedHook projectOpened
and projectClosed. Should be right place, there is no need to start any operation based on whatever changes during
project creation or some other early project state.
Comment 13 Petr Suchomel 2008-08-06 17:33:52 UTC
Fixed in CS bd839ce74ac2
Comment 14 Quality Engineering 2008-08-07 16:34:00 UTC
Integrated into 'main-golden', available in build *200808071401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/bd839ce74ac2
User: psuchomel@netbeans.org
Log: Fix for #136931, FolderLookup used from DataLoaderPool$1MimeEnum.delegate
Comment 15 Lukas Hasik 2008-08-13 09:54:58 UTC
pity that this one is in Beta :( When you get it then even restart doesn't help. You are not able to create Java ME
project anymore. 
Comment 16 Petr Suchomel 2008-08-13 09:58:14 UTC
Should not be - it was integrated before main was cloned.
Comment 17 Lukas Hasik 2008-08-13 10:04:36 UTC
unfortunately not. Beta clone was created on 8/4 but your fix was integrated on 8/7. That's the only reason why I'm not
reopening it.