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 199500 - New File wizard generates "org.openide.text.DataEditorSupport$1: The file cannot be safely opened with encoding UTF-8. Do you want to continue opening it?" exception
Summary: New File wizard generates "org.openide.text.DataEditorSupport$1: The file can...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2011-06-17 13:52 UTC by soldatov
Modified: 2011-07-07 11:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
tested project (20.00 KB, application/octet-stream)
2011-06-17 13:55 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2011-06-17 13:52:26 UTC
Scenario:
- on Windows Create new Makefile based project in other folder than source folder (Sources: c:/tmp/sources, NB project: c:/tmp/sources1)
- Create new file via "C Main File" or "C++ Main File" wizard
==> 
org.openide.text.DataEditorSupport$1: The file cannot be safely opened with encoding UTF-8. Do you want to continue opening it?
	at org.openide.text.DataEditorSupport.createAndThrowIncorrectCharsetUQE(DataEditorSupport.java:455)
	at org.openide.text.DataEditorSupport.loadFromStreamToKit(DataEditorSupport.java:446)
	at org.openide.text.CloneableEditorSupport.loadDocument(CloneableEditorSupport.java:2156)
	at org.openide.text.CloneableEditorSupport.access$2800(CloneableEditorSupport.java:133)
	at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:2986)
	at org.openide.text.CloneableEditorSupport$3.doRun(CloneableEditorSupport.java:710)
	at org.openide.text.CloneableEditorSupport$3.run(CloneableEditorSupport.java:677)
	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:314)
	at org.openide.text.NbDocument.runAtomic(NbDocument.java:422)
	at org.openide.text.CloneableEditorSupport$3.doRun(CloneableEditorSupport.java:687)
[catch] at org.openide.text.CloneableEditorSupport$3.run(CloneableEditorSupport.java:677)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 1 soldatov 2011-06-17 13:55:03 UTC
Created attachment 108957 [details]
tested project
Comment 2 Leonid Lenyashin 2011-06-20 12:56:21 UTC
Please evaluate for showstopper status
Comment 3 Vladimir Voskresensky 2011-06-21 07:36:00 UTC
will evaluate
Comment 4 Vladimir Voskresensky 2011-06-21 08:02:25 UTC
issues confirmed. Looks serious enough
Comment 5 Vladimir Voskresensky 2011-06-21 19:19:58 UTC
http://hg.netbeans.org/releases?cmd=changeset;node=f26f58f87018
Comment 6 Vladimir Voskresensky 2011-06-21 19:21:12 UTC
Sasha S: please, review the fix
Valera: please verify fix in 701_dev
Comment 7 Alexander Simon 2011-06-22 10:49:27 UTC
Fix ok and safe.
One note:
- if several projects can be resolved as owners it would be better select one that is not dependent project.
Comment 8 soldatov 2011-06-22 12:04:06 UTC
verified in release701_dev build
Comment 9 Vladimir Voskresensky 2011-06-22 13:47:03 UTC
integrated into 7.0.1
http://hg.netbeans.org/releases?cmd=changeset;node=2d62eedf1fae
Comment 10 Quality Engineering 2011-06-23 04:41:59 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/2d62eedf1fae
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #199500 - New File wizard generates "org.openide.text.DataEditorSupport$1: The file cannot be safely opened with encoding UTF-8. Do you want to continue opening it?" exception
- use correct paths (unix-like and normalized)
- init fallback project for not-yet-existing item if it's folder is known by make project
(transplanted from f26f58f8701825473b824406939e7bea72b7f6dd)
Comment 11 soldatov 2011-07-07 11:30:57 UTC
verified in NetBeans IDE 7.0.1 (Build 201107051618)