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.
Summary: | After refactoring refactoring window keeps floating around | ||
---|---|---|---|
Product: | php | Reporter: | schkovich <schkovich> |
Component: | Refactoring | Assignee: | Tomas Mysik <tmysik> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | BullfrogBlues, Elusive, meonkeys, vriha, waldermort, zuernbernhard |
Priority: | P3 | Keywords: | RANDOM |
Version: | 8.0.2 | ||
Hardware: | Other | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Remains of refactoring window floating around
new/old PHP Class one more screenshot Sample code logs |
Description
schkovich
2011-07-29 10:40:44 UTC
Created attachment 109692 [details]
Remains of refactoring window floating around
I see this bug every day at work. It doesn't happen every time I refactor, but it does happen often. Guys, do you have any reproducible case? It can be problem in refactoring infrastructure, but before I reassign this issue them, it would be better to have reproducible test case. I have played with it today a little bit, but I wasn't successful. Currently I'm at a station that is running 6.9. The station I frequently encounter the situation on is running Ubuntu, I'm not sure if that helps. I'll try to isolate a case, but it happens so often on my setup that I'm not sure what is the problem. Steps to reproduce: * Create newPHPClass * Define constant HIP_HOP = 'poh_pih' * Define public static method get returning newPHPClass::HIP_HOP * Save * Right click on the class name and select Refactor > Rename * Rename class to oldPHPClass * Review changes * Click Refactor Expected: All instances of newPHPClass are renamed to oldPHPClass, review window is closed. Actual: All instances of newPHPClass are renamed to oldPHPClass, review window is closed but small Refactoring window remains floating around. See attached images. Created attachment 111250 [details]
new/old PHP Class
Created attachment 111251 [details]
one more screenshot
The problem is actual for NetBeans 7.0.1 as well. OS Ubuntu 11.04 java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode). This is still present in 7.1 beta. Same Problem here with netbeans 7 on ubuntu oneiric 64bit this issu always appears when i attempt to use refactoring at least 2 times. when i do one refactoring (e.g. renaming a class) close netbeans then start netbeans and do the next refactoring, everything seems to be ok .. +1 This is still an issue in 7.1. This is such an awful bug that sometimes, if I know for sure that the refactoring is isolated to one file (though I've been bitten by this), I will manually do the refactoring rather than use netbeans refactoring feature i.e. I will do a search and replace, because if I use the refactoring feature (except inline refactoring, which works fine) I know that there is a 1 in 2 chance I will be left with floating window and will eventually need to restart netbeans. Netbeans will eventually crash, hang and do all kinds of potentially disastrous things when enough of those floating windows are left hanging about. *** Bug 204324 has been marked as a duplicate of this bug. *** I was not able to reproduce the problem in the last development build: Product Version: NetBeans IDE Dev (Build 201202080400) Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17 System: Linux version 3.0.0-15-generic running on amd64; UTF-8; en_US (nb) If anyone else can confirm that the problem is not present anymore in the development builds we can close the ticket. :) This bug still exists however cannot reliably reproduce. I will attempt to find a reliable reproduction method. Waiting for reproducible cases, or for more info. I'm not able to reproduce that. Confirm that bug on Ubuntu 11.04 with NetBeans 7.2. Sometime (70% of cases) refactor just freezes - shows blank windows (which is impossible to close) and actualy do just partial rename of variables. Created attachment 133206 [details]
Sample code
There is an occurrence of this bug when I try to refactor property 'group' to 'ownerId' in this sample code. It's going well sometimes, so it must to be tried for several times.
Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02
Runtime: Java(TM) SE Runtime Environment 1.6.0_26-b03
System: Linux version 2.6.38-15-generic running on amd64; UTF-8; cs_CZ (nb)
Reproduced in dev build. I try the test case from schkovich: * Create newPHPClass * Define constant HIP_HOP = 'poh_pih' * Define public static method get returning newPHPClass::HIP_HOP * Save * Right click on the class name and select Refactor > Rename * Rename class to oldPHPClass * Review changes * Click Refactor Product Version: NetBeans IDE Dev (Build 201303282300) Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02 System: Linux version 3.5.0-26-generic running on i386; UTF-8; en_US (nb) I just tried it many many times for both cases, but can't reproduce that :( It is annoyingly random :) I tried it in 7.3 with sample TodoList app. I refactored renamed Flash (from usage) and then TodoSearchCriteria (from declaration) and after a lot of attempts (~15-20), it happened. Hi guys, I'm reproducing this fairly consistently with steps very similar to schkovich's and Kanak's. I'm trying to to narrow it down to something specific. 1. Ensure that the project name has Uppercase, Lowercase and a Digit. e.g. Tiger7, Monkey7 ( this seems top make a huge difference in how often I caan reproduce) 2. There is one additional step after schkovich's and Kanak's steps: Refactor > Rename to "oldPHPClass" -> "old2PHPClass". TEST CASE --------- * Create newPHPClass - Right click "Source Files" in Pprojects window - New > PHP Class > (leave defaults, file name should be "newPHPClass") - Finish * Define constant HIP_HOP = 'poh_pih' * Define public static method get returning newPHPClass::HIP_HOP You should have: -- SNIP -- <?php /** * Maybe some comment here */ define('HIP_HOP', 'poh_pih'); class newPHPClass { public static function HIP_HOP() { } } -- SNIP --- * Save * Right click on the class name and select Refactor > Rename (Ctrl+R) * Rename class to oldPHPClass (fig.a) * Click "Preview" (Alt+P) * Click "Do Refactoring" (Alt+R) --- ADDITIONAL STEP --- * Refactor > Rename class to old2PHPClass NOTES ----- - For the refactoring part, try *not* using the mouse at all, instead use shortcuts: Use these instead: - Ctrl+R to Refactor Rename - Alt+P to Preview - Alt+R to Do Refactoring +1 Product Version: NetBeans IDE 7.3 (Build 201302132200) Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11 System: Linux version 3.2.0-40-generic running on amd64; UTF-8; en_US (nb) Distro: Ubuntu 12.04.2 Maybe this is related to this bug? https://netbeans.org/bugzilla/show_bug.cgi?id=213202 Still can't reproduce that...will test it again later :( I can reproduced it very often too. But I have a funny workaround. I changed the refactoring preview window to float and after "do refactoring" command, there is an exception and the annoying refactoring empty window doesn't appear ;-) What exception, can you attach it here? And your IDE log? Thanks a lot! (In reply to comment #25) > What exception, can you attach it here? And your IDE log? Thanks a lot! No problem. I'm a little confused with netbeans bugzila but it is: Issue #232779 and Issue #214312. My netbeans's exception reporter has this information: Submit Issue 680804 214312 StackOverflowError at java.util.Arrays.copyOf 681298 232779 StackOverflowError at java.util.Arrays.copyOf Thanks. Ok, so if it's connected to this issue, then it's not a php bug...but it's a side effect of swing bug. We will see... Probably related to and fixed in issue #243067 Closing as fixed in the dev build. Unfortunately, this still happens in 8.0, now tested on Ubuntu 14.04. I don't get the Exception noted in https://netbeans.org/bugzilla/show_bug.cgi?id=200510#c24 when explicitly making the window float. But refactoring actually *creates* an empty floating window about the same moment it closed the *docked* refactoring one. And the floated window stays put, uncloseable. Product Version: NetBeans IDE 8.0 (Build 201403101706) Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 2 Java: 1.7.0_65; Java HotSpot(TM) 64-Bit Server VM 24.65-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_65-b17 System: Linux version 3.13.0-32-generic running on amd64; UTF-8; en_US (nb) User directory: /home/lisandro/.netbeans/8.0 Cache directory: /home/lisandro/.cache/netbeans/8.0 Distro: Ubuntu 14.04.1 LTS Any way I can provide more information? As you can see in issue #243067, target milestone is 8.0.1. Not 8.0...wait for new version. (In reply to Ondrej Brejla from comment #31) > As you can see in issue #243067, target milestone is 8.0.1. Not 8.0...wait > for new version. Sorry about that. I'll wait till next version comes up. I figured this was about a race condition between fast refactoring completion in background thread and slow window opening in UI thread. Was that the case? hello everyone, this is still present in 8.0.2. it just happened. i was refactoring (renaming) the method. just two occurrences (method declaration and one usage, in the same file) Product Version: NetBeans IDE 8.0.2 (Build 201408251540) Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2 Java: 1.7.0_79; OpenJDK 64-Bit Server VM 24.79-b02 Runtime: OpenJDK Runtime Environment 1.7.0_79-b14 System: Linux version 3.16.0-4-amd64 running on amd64; UTF-8; en_US (nb) same on 8.1 I have this bug as well on CentOS 5. Didn't happen before on Windows but happens on Linux(At least our old CentOS 5). Don't know if this is related to old cairo/pixmap/X libs on the distribution but see that ppl with fresh dists having the same so it's probably Java UI/Linux related bug. It happens for about 60% chance rate. Product Version = NetBeans IDE Dev (Build 20160131-9fcb8679cb47) (#9fcb8679cb47) Operating System = Linux version 2.6.18-406.el5 running on amd64 Java; VM; Vendor = 1.8.0_72; Java HotSpot(TM) 64-Bit Server VM 25.72-b15; Oracle Corporation Runtime = Java(TM) SE Runtime Environment 1.8.0_72-b15 Java Home = /usr/java/jdk1.8.0_72/jre System Locale; Encoding = en_US (nb); UTF-8 I cannot reproduce it in the current dev build. However, if anyone of you can, please provide _exact_ steps to reproduce (ideally provide a code sample and exact steps what needs to be done). Also, once this problem happens, please attach the IDE log file [1], it can contain some related exception. Thanks. [1] http://wiki.netbeans.org/FaqLogMessagesFile Product Version: NetBeans IDE Dev (Build 20160610-49331e2a0591) Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b14 System: Linux version 4.2.0-38-generic running on amd64; UTF-8; cs_CZ (nb) *** Bug 250183 has been marked as a duplicate of this bug. *** Also please attach a thread dump [1] taken after this problem happens to you again. Thanks. [1] http://wiki.netbeans.org/GenerateThreadDump Created attachment 165208 [details] logs > provide _exact_ steps to reproduce Seems it absolutely random. I've just did about 15-20 refactoring before it happens (without any other actions). Sometimes it happens more frequently... But this bug is quite reproducible. I didn't see any new messages in log after this bug... Thread dump included. I've recorded a video with reproducing the bug: https://youtu.be/SNa1Bx4gVwM |