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: | Removing white spaces on save doesn't work | ||
---|---|---|---|
Product: | editor | Reporter: | mwitzmann |
Component: | -- Other -- | Assignee: | Milutin Kristofic <mkristofic> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | anebuzelsky, webzb |
Priority: | P2 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
netbeans problem white spaces
Dummy project with 2 broken files |
Description
mwitzmann
2013-10-29 15:32:44 UTC
Please provide exact steps to reproduce and reopen. I don't get any extra white space in a Java file in Product Version: NetBeans IDE 7.4 (Build 201310111528) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Mac OS X version 10.9 running on x86_64; UTF-8; en_US (nb) 1. Start netbeans and create a new project with external source (FTP Server) 2. Open a file (e.g. .php-file), make changes and save it. 3. Reopen it and you can see white space at the end of the line. 4. When you remove it and save it again, it will be added again at the end of the file. This problem doesn't occur every time, sometimes you can work several hours, but when it occurs, it won't disappear until I restart the system. I also tried to uninstall java and netbeans and re-installed it. Without success. I installed earlier version of netbeans to, but without success. It occurs since I updated the system to maverick. Before that, netbeans ran without problems. What I just try is to run netbeans on a new created user account. Java: Java Standard Edition Version 7 Update 45 (Build 1.7.0_45-b18) java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) System: Mac OS X version 10.9 Created attachment 141740 [details]
netbeans problem white spaces
So it's not just a problem of 7.4, right? Can you test it with some other file types? E.g. javascript, simple html, etc? Because I think that there is no special handling of for php files. It also occurs in js-, html-, css-files e.g. Well, I thought that ;) Thanks. So reassigning to CSL for evaluation. Are there any news about the problem? We have the same problem here. 2 iMac and 1 Macbook, started right after the Mavericks upgrade. Netbeans currently corrupts every kind of file that we use (CSS, HTML, YML, PHP) which makes working with it impossible for the time being. We noticed that it only happens with network shares (tried to mount them as SMB, AFP and CIFS, no luck). You are right! I also work with it in a network and have this problem. At home I work local and it works fine. Any Suggestions so far? Unfortunately we still cannot reproduce it. Can someone provide exact steps to reproduce it from scratch? (project configuration, file encoding, etc..) sample project is welcomed (In reply to mwitzmann from comment #5) > It also occurs in js-, html-, css-files e.g. Could you please attach the problematic file so that we can analyze what the binary codes of the problematic characters are? Thanks. *** Bug 237748 has been marked as a duplicate of this bug. *** Here's a JING video I made that shows how I setup a new project on the network share, saved the NB metadata to my local, and then created a few files and you can see the null characters appear in TextWrangler after saving the file in NB. http://screencast.com/t/hOe0AZ4Vm Created attachment 142096 [details]
Dummy project with 2 broken files
I just attached a dummy project with two broken files.
There are a bunch of 0x00's thrown in randomly. The CSS-File has it appended at the end and the PHP-File has it in the middle (which was new to me too..).
Using the default theme in Netbeans 7.4, you can actually see a small red dot next to the semicolon in line 5 of test.php.
Steps to reproduce it with this project:
1. New -> PHP-File -> foo.php
2. Append $foo = 'bar'; at the end of the file
3. CMD+S to save the current file
4. CMD+W to close the current active tab
5. CMD+SHIFT+T to re-open the last closed tab
6. Select the line with $foo = 'bar'; and remove it (CMD+SHIFT+LEFT/RIGHT)
7. Save, CMD+W, CMD+SHIFT+T
8. Type $foo = 'bar'; again and by now the file will be broken.
I think that is not a Netbeans problem, Aptana Studio has the same problem. Maybe a java problem? This appears to be a bug with the SMB2 implementation in Mavericks. Files on older network shares have a null character appended to the files. Changing the protocol on the mount URL from smb:// to cifs:// seems to fix the issue according to this blog: http://cammodude.blogspot.com/2013/10/os-x-109-mavericks-workaround-for-smb.html Didn't change anything for me. I changed my connection to cifs:// Restarted Opened NB Created a new PHP file Made an edit to the file And still got the null characters I can replicate the null characters in Komodo Edit and Aptana Studio, so this doesn't appear to be a Netbeans specific issue, and is probably related to the NAS/SMB issue. I forced the smb1 connection but it made no difference. Even if I eject the shares, and reconnect with cifs:// and create, modify and save a file, it's still corrupted. It looks like Apple is going to have to resolve this, unless someone can come up with a viable workaround. Testing AFP and seems all ok... Am I sorry, there is not much that netbeans can help with this scenario. I hope apple will fix it. |