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.
S&R won't replace multiple occurences of searched text on same LOC. Steps to reproduce: ------------------- 1) Consider following properties file: TXT_DisplayName=My Server MSG_InstallerName=My Server Installer MSG_CreateFailed=Cannot create {0} server instance. MSG_MyServerPlatform=My Server Platform 2) Now invoke S&R over whole project and try to replace 'My' with something else, ie. 'Ge'. => Nothing will be replaced, inside Search Results tab, a message appears complaining that the file has been changed since the search starts (it has been indeed, but S&R should handle such situations). --- NetBeans IDE Dev (Build 070212) 1.6.0; Java HotSpot(TM) Server VM 1.6.0-b105 Linux version 2.6.12-1.1390_FC4smp running on i386 en_US (nb); UTF-8
I cannot reproduce it on my machine. What do you exactly mean by "multiple entries on some LOC"?
Still reproducible. Please check the Geronimo project from roman-ws, as we have agreed. Also note my dual CPU (SMP) mashine.
Accepted.
*** Issue 102340 has been marked as a duplicate of this issue. ***
Adding myself to the list, seeing the same issue trying to replace version numbers in pom.xml across a set of maven2 projects. Product Version: NetBeans IDE Dev (Build 200806180005) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 System: Linux version 2.6.24-19-generic running on i386; UTF-8; de_DE (nb) Userdir: /home/kr/.netbeans/dev-6.1
I was able to reproduce this if the file being changed contained CR+LF line endings. I am going to fix this case at first.
Fixed. The files being searched are now read using a custom reader that not only recognizes all common types of line endings (CR, LF, CR+LF). This was enough to fix the cause of the bug. The reader also keeps information about used line ending per each line and uses the same line endings when writing the modified file to the disk. Modified and new files: utilities/src/org/netbeans/modules/search/LineReader.java utilities/src/org/netbeans/modules/search/MatchingObject.java utilities/test/unit/src/org/netbeans/modules/search/LineReaderTest.java utilities/test/unit/src/org/netbeans/modules/search/MatchingObjectTest.java Changeset Id: 0c54dd6caf5f (http://hg.netbeans.org/main/rev/0c54dd6caf5f)
kawazu428, it would be perfect if you could verify the fix.
Integrated into 'main-golden', available in build *200807301401* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/0c54dd6caf5f User: Marian Petras <mpetras@netbeans.org> Log: fixed bug #95203 - "File has changed since the start of the search"
verified against current nightly build - thanks very much! :) Product Version: NetBeans IDE Dev (Build 200807310201) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15 System: Linux version 2.6.24-20-generic running on i386; UTF-8; de_DE (nb) Userdir: /home/kr/.netbeans/dev-6.5
Encountered the same problem on Windows XP. Step to reproduce: - Create a project - Add several 'htm' files into the project, under src - Use Ctrl+H to Find & Replace the same word on the project - Make sure that a found list is produced. - Press 'Replace'. There are some files which has been replaced, but some don't, with the same error messages. Perform 'Modify Criteria' then do a Find again, and you'll find untouched intstances. Tested on Product Version: NetBeans IDE 6.8 (Build 200912041610) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
A further note on the bug: It seems to appear when there are multiple instances of found text on the file.
The notice regarding to the multiple instances in the file is invalid. The problem is also located on Linux and with files contain only single instance of found text. Product Version: NetBeans IDE 6.8 (Build 200912041610) Java: 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02 System: Linux version 2.6.27.42-0.1-pae running on i386; UTF-8; en_US (nb)
In a desparate attempt, reused previous version 6.7.1 and the problem doesn't exist there. Tested on both Linux and Windows XP, and they are working fine. Product Version: NetBeans IDE 6.7.1 (Build 200907230233) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
Reused previous version 6.7.1 and the problem doesn't exist there. Tested on both Linux and Windows XP, and they are working fine. Some changes since then reintroduced the problem. Product Version: NetBeans IDE 6.7.1 (Build 200907230233) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
Further observation shown that in fact, the 6.7.1 did not solve the problem. It just keeps quiet and did not report anything. Closer look at the result shown that some files had been ignored. The problem seems to be reduced when the number of input files into the global search and replace, but the problem still recur. Posted a duplicated log and was told that the problem has been fixed by 6.8. Turned ton use 6.8 and found another problem. After the message "File <filename> has changed since the start of the search" came up, I went into the claimed file, performed find and replaced on the file alone, but on subsequent set of files, the same message kept coming up, although the file mentioned is NOT within the group of selected files. Tested on: Product Version: NetBeans IDE 6.8 (Build 200912041610) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
williamuk, Many thanks for detailed bug report and your investigations, but I can't reproduce this with 6.9 dev build. My steps to reproduce: * Create a Java project * Add three new 'html' files into the project, under the "Source Packages/javaapplication1": newhtml.html, newhtml1.html, newhtml2.html with content provided by the default template. * Select "Source Packages/javaapplication1" * Ctrl+Shift+H to Find & Replace with - Containing Text "To" - Replace With "TO" => a found list is produced * Press 'Replace'. => All occurrences of "To" are successfully replaced with "TO" without any messages.
using Netbeans 7.0, I am seeing this issue again. I'm using Windows 7, and the files appear to have come from a unix system. if I do a project level find and replace, it balks at doing the changes, claiming that the file has changed since the start of the search.
I get this issue too. Netbeans 7 is unable to find and replace. I'm going back to 6.9.1 since this feature is critical for me when I'm refactoring.
Confirmed! Specs: Netbeans 7 OS Windows 7 X64 Professional
(In reply to comment #19) > williamuk, > > Many thanks for detailed bug report and your investigations, but I can't > reproduce this with 6.9 dev build. > > My steps to reproduce: > * Create a Java project > * Add three new 'html' files into the project, under the > "Source Packages/javaapplication1": > newhtml.html, newhtml1.html, newhtml2.html > with content provided by the default template. > * Select "Source Packages/javaapplication1" > * Ctrl+Shift+H to Find & Replace with > - Containing Text "To" > - Replace With "TO" > => a found list is produced > * Press 'Replace'. > => All occurrences of "To" are successfully replaced with "TO" without any > messages. This is because you only do one replace. The error ocures when you try to perform a second replace on the same set of documents. So next try to replace "TO" with "2" and you will get the message that the serach results have changed and you need to refresh them (endless loop)
reproducible: - Windows Vista Business 32bit - Netbeans 7.0 (with Java 1.6.24), fresh install with factory settings - Antivir disabled (does not matter) project: - fresh SVN checkout, fresh "PHP project with existing sources" created afterwards - PHP+HTML files only (in our case: Selenium test case files) steps: - select the folder containing the HTML files in the project view - ctrl+shift+h - enter the search and replace terms - press "find" -> search results view opens up correctly - click the "replace" button -> messages appear saying that "The following issues were encountered while replacing:" and mutilple times: "File xyz has changed since the start of the search"; no replacements were being made With third-party tools like JEdit or Notepad++ the search+replace for the whole folder works fine, and Netbeans correctly marks them blue afterwards (meaning: files changed since last SVN update). Seems this bug is Windows-only, since it works fine on MacOS and Ubuntu.
Not reproducible on Ubuntu, will try on Windows 7.
Still finding a reproducible use-case, works for me on Windows Vista. Haven't I missed anything important? I have svn server on my machine, php project there. S&R twice. By chance, could someone attach a link to test project on which I can reproduce it? Thanks
2 June 2011 here, search and replace is still broken in 7.0. When I click the replace button it just says "File Y:/site/library/page.php has changed since the start of the search. Very strange seeing I didn't even have the file open. Re-did the search and replace with no files open. Still comes up with the error. Tried it in version 6.9.1 and it works perfectly. Can this be increased to critical priority? I'm going to have to go back to 6.9.1 until this is fixed. I'm using XP 32bit if that makes any difference.
I have the same problem whilst trying a replace in files, with a regex. But in my case the replace does not work in 6.9.1 either, except that it does not display the error message. The replace has no effect in either version.
I can confirm the Bug on: Product Version: NetBeans IDE 7.0 (Build 201104080000) Java: 1.6.0_24; Java HotSpot(TM) 64-Bit Server VM 19.1-b02-334 System: Mac OS X version 10.6.7 running on x86_64; MacRoman; de_DE (nb) Please fix this asap! I heavily rely on search+replace
Well, I can reproduce it too with NB7.0 FCS on Windows Vista. Now I can start investigating possible fix of this problem. I'll let you know the status soon. Product Version = NetBeans IDE 7.0 (Build 201104080000) (#a693229ccdbb) Operating System = Windows Vista version 6.0 running on x86 Java; VM; Vendor = 1.6.0_21; Java HotSpot(TM) Client VM 17.0-b17; Sun Microsystems Inc. Runtime = Java(TM) SE Runtime Environment 1.6.0_21-b07
core-main/rev/ae8ecacc3d9e
The fix was backported to NB701 (this regression was caused by changeset http://hg.netbeans.org/main/rev/3a331f02b4f1, Fix #194326 - NullPointerException at org.netbeans.modules.search.MatchingObject.getName)
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/ae8ecacc3d9e User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #95203: File has changed since the start of the search
Created attachment 109567 [details] the file have no changes! svn highlight show the truth. Product Version: NetBeans IDE 7.0 (Build 201104080000) Java: 1.6.0_24; Java HotSpot(TM) 64-Bit Server VM 19.1-b02-334 System: Mac OS X version 10.6.7 running on x86_64; MacRoman; it_IT (nb) Userdir: /Users/aleciri/.netbeans/7.0 I still have this bug, look at the screenshot: the file "aggiungiLabel.php" have no changes, svn color highlight can confirm it, is black!
*** Bug 198743 has been marked as a duplicate of this bug. ***
is this issues fixed? can't find the solution.
is this issue fixed? can't find the solution.