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 75596 - Deadlock when using editor as as MultiView element
Summary: Deadlock when using editor as as MultiView element
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 80028 82619 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-27 06:45 UTC by _ leonchiver
Modified: 2008-12-22 11:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (2 days old CVS Head) (13.84 KB, text/plain)
2006-04-27 06:48 UTC, _ leonchiver
Details
change diff (616 bytes, patch)
2006-08-14 15:04 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ leonchiver 2006-04-27 06:45:17 UTC
I'm using a CloneableEditor inside a MultiView. The MultiView contains two
views, each of them has an editor as visual representation, each editor edits a
different FileObject. The first MultiView always displays fine, but when
switching to the second a deadlock occurs.

Thread dump will come...
Comment 1 _ leonchiver 2006-04-27 06:48:19 UTC
Created attachment 30078 [details]
Thread dump (2 days old CVS Head)
Comment 2 Miloslav Metelka 2006-05-05 16:11:40 UTC
IMHO the multiview should not block the firing of settings changes:
...
org.netbeans.core.multiview.MultiViewPeer.getEditorPane(MultiViewPeer.java:435)
org.netbeans.core.multiview.MultiViewPeer.isToolbarVisible(MultiViewPeer.java:562)
org.netbeans.core.multiview.MultiViewPeer$3.invoke(MultiViewPeer.java:547)
$Proxy8.settingsChange(Unknown Source)
org.netbeans.editor.Settings.fireSettingsChange(Settings.java:495)
org.netbeans.editor.Settings.update(Settings.java:417)
...

If possible the action should be performed asynchronously. Reassigning to core
for further evaluation.
Comment 3 David Simonek 2006-06-16 17:26:10 UTC
Passing to multiview author, I tend to agree with mmetelka, although blee to je
hnus.

What about that runtime class resolution and listener ugliness in multiview code
to listen to editor settings...isn't friend API or so much better?
Comment 4 Milos Kleint 2006-06-22 06:38:03 UTC
leonchiver, just a word of warning. The multiview won't work with multiple files
in my opinion. to make them work we would have to rewrite the
cloneableeditorsupport classes and change the the APIs in a non-compatible way.

Firing an editor setting change asynchronously could help in this case.
Comment 5 Milos Kleint 2006-07-27 09:46:46 UTC
done. the listener now invokeLaters the reaction to settings change.

however please note that 
1. I still believe 2 editors in multiview won't work. (that's calling for a
complete rewrite of the editor support codebase/apis)
2. i'm not clear on how the changing of view could result in change in toolbar
visibility settings..

Comment 6 Miloslav Metelka 2006-08-11 13:21:31 UTC
*** Issue 80028 has been marked as a duplicate of this issue. ***
Comment 7 Milos Kleint 2006-08-14 07:16:10 UTC
candidate for a fix in 5.5
Comment 8 Milos Kleint 2006-08-14 15:04:22 UTC
Created attachment 32885 [details]
change diff
Comment 9 Joelle Lam 2006-08-26 00:06:11 UTC
Has this diff already been added to the trunk?  I saw the same problem as of
08/24 NB daily build.
Comment 10 Milos Kleint 2006-08-26 09:33:42 UTC
yes, it's been in trunk. (6.0, not 5.5)
Comment 11 Milos Kleint 2006-08-28 13:27:25 UTC
joellelam: can you verify that your daily build was a 6.0, not a 5.5 one? I
would like to merge the change to 5.5 branch but if it's not working, it'd
rather not..
Comment 12 Miloslav Metelka 2006-08-28 13:55:32 UTC
*** Issue 82619 has been marked as a duplicate of this issue. ***
Comment 13 Joelle Lam 2006-08-28 23:07:40 UTC
mkleint: I was under ther impression that you were going to place it in the 5.5
build.  Unfortunately this is a show stopper for us and will need it to be
fixed.  Are no longer planning to do this.  By the way, I used the patch and it
seems to work for me.  I haven't ran into any problem yet.
- Joelle
Comment 14 Petr Blaha 2006-08-29 13:24:14 UTC
I reopen the bug since the fix should be merged in release55 branch.
Comment 15 Milos Kleint 2006-08-29 17:39:03 UTC
blaha: have the rules for 5.5 integration changed? AFAIK the bug is fixed when
in fixed in trunk and the 5.5_candidate tag is added. mail is sent to reviewers
and when there's no objection, the fix is merged to 5.5 branch. Then  the TM is
set to 5.5 instead of dev..
Comment 16 Marian Mirilovic 2006-08-29 20:51:34 UTC
Petr, 
Milos is right, this issue has already been fixed in trunk, just let the
SW=5.5_candidate, we are tracking these issues ...
Comment 17 Milos Kleint 2006-08-30 09:25:20 UTC
ok, since the patch is simple and was tested on 5.5, I merged it to 5.5
Comment 18 Petr Chytil 2008-09-30 10:35:35 UTC
closed