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 130674 - Lockup when inserting comment using macro
Summary: Lockup when inserting comment using macro
Status: RESOLVED DUPLICATE of bug 213026
Alias: None
Product: editor
Classification: Unclassified
Component: Macros (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords: API, RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2008-03-20 16:44 UTC by saltysnow
Modified: 2012-09-25 12:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (15.37 KB, text/plain)
2008-03-25 15:52 UTC, saltysnow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description saltysnow 2008-03-20 16:44:40 UTC
I defined a macro ALT-C which does the following / * * ENTER ...this is the same as auto-commenting a method, field or
class. About one in every 20 times, I can get netbeans to completely freeze up by typing ALT-C. It seems to happen more
after I make a change to the file structure (such that the editor has to reconfigure itself to add the folding markers
etc), then type the key sequence immediately after.
Comment 1 Lukas Hasik 2008-03-21 09:33:14 UTC
please, provide a thread dump - http://wiki.netbeans.org/GenerateThreadDump when the IDE freeze
Comment 2 saltysnow 2008-03-25 15:52:38 UTC
Created attachment 59036 [details]
Thread dump
Comment 3 saltysnow 2008-03-25 15:54:28 UTC
The thread dump attached is not complete. It was too much info for the DOS history window. I hope it helps though. In
the mean time I'm continuing to run in debug mode (nb.exe) so I'll be ready if it happens again. Thanks.
Comment 4 Vitezslav Stejskal 2008-06-19 09:27:34 UTC
> It was too much info for the DOS history window

You can increase the size of the screen buffer in the console window's properties.

Anyway, the problem is most likely caused by the fact the RunMacro action locks the document before preforming the
actions recorded in the macro. If these actions try to acquire java source infrastructure lock the IDE is likely to
deadlock. This locking should always happen in the opposite order.

Would anybody have any idea how situations like this could be prevented in general?
Comment 5 Tomas Zezula 2008-06-19 09:40:41 UTC
In general there is no nice solution.
The simplest solution is to keep the lock ordering which may become non easy task, you have to know which lock you need to acquire (java, projects, ,gsf, 
editor,...). Introducing some kind of LockManager which cares about locking and ordering for tasks may be helpful.

Comment 6 Max Sauer 2008-11-18 12:02:11 UTC
There should be a clean solution, lets focus for NEXT.
Comment 7 Svata Dedic 2012-09-25 12:54:54 UTC
this is most probably the same deadlock as reported in #213026; although the attached stacktrace is not complete.

*** This bug has been marked as a duplicate of bug 213026 ***