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 243743 - IllegalArgumentException while opening incorrectly encoded file
Summary: IllegalArgumentException while opening incorrectly encoded file
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-10 19:14 UTC by Exceptions Reporter
Modified: 2018-03-20 11:32 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 209058


Attachments
stacktrace (1.48 KB, text/plain)
2014-04-10 19:14 UTC, Exceptions Reporter
Details
stacktrace (1.48 KB, text/plain)
2014-12-16 11:43 UTC, stefan79
Details
stacktrace (1.63 KB, text/plain)
2015-03-24 21:01 UTC, Maksim Khramov
Details
stacktrace (1.63 KB, text/plain)
2015-09-02 20:36 UTC, everflux
Details
stacktrace (1.63 KB, text/plain)
2015-12-21 07:44 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2014-04-10 19:14:27 UTC
This bug was originally marked as duplicate of bug 221324, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132
OS: Windows 8

User Comments:
GUEST: Opening some wsdl

GUEST: Trying to open pom.xml file, but occurs error message with UTF-8 encoding problev

GUEST: I was opening a .xml file that had been modified via the Windows Notepad program.

nysander: ?

nysander: opening unproperly encoded xml file

dobs: Open file on FTP server

rickqin: When I try to open a XML individually by the menu item "open file...". the execption comes.

GUEST: just open xml file from local harddrive




Stacktrace: 
java.lang.IllegalArgumentException
   at java.nio.Buffer.position(Buffer.java:244)
   at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:618)
   at org.netbeans.api.queries.FileEncodingQuery$ProxyCharset$ProxyDecoder.decodeHead(FileEncodingQuery.java:258)
   at org.netbeans.api.queries.FileEncodingQuery$ProxyCharset$ProxyDecoder.decodeLoop(FileEncodingQuery.java:220)
   at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:579)
   at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:318)
Comment 1 Exceptions Reporter 2014-04-10 19:14:30 UTC
Created attachment 146679 [details]
stacktrace
Comment 2 Jaroslav Havlin 2014-05-16 12:58:21 UTC
It seems that the problem occurs only if the file is incorrectly encoded (according to some of the comments).

The exception might be handled by DocumentOpenClose (and opening of the file cancelled, or some options to recover offered).
Reassigning to platform/Text. Please evaluate it.
Comment 3 stefan79 2014-12-16 11:43:55 UTC
Created attachment 151130 [details]
stacktrace

Opened a XML-File, where UTF-8 - Encoding was wrong.
Comment 4 Maksim Khramov 2015-03-24 21:01:46 UTC
Created attachment 152833 [details]
stacktrace

Open UTF-8 encoded web descriptor (web.xml) file
Comment 5 civime 2015-08-05 02:49:56 UTC
Through our investigation, we found that the following changes may induced this bug: 

rank 	 revision	 suspicious value
1	e9f484b32b25(http://hg.netbeans.org/main/rev/e9f484b32b25)	0.9797803303033976
2	a6b6e3cf36a4(http://hg.netbeans.org/main/rev/a6b6e3cf36a4)	0.9691635885026604
3	128de1eb603d(http://hg.netbeans.org/main/rev/128de1eb603d)	0.9472398551473254
4	89bb91a205f8(http://hg.netbeans.org/main/rev/89bb91a205f8)	0.9032302851799705
5	65e2ecb7ed51(http://hg.netbeans.org/main/rev/65e2ecb7ed51)	0.8251928907970609
6	da95a1b91da7(http://hg.netbeans.org/main/rev/da95a1b91da7)	0.8222220513217343
7	ba8e48119dd6(http://hg.netbeans.org/main/rev/ba8e48119dd6)	0.7214087283151353
8	eb3284d7cede(http://hg.netbeans.org/main/rev/eb3284d7cede)	0.680010724632216
9	5dba9a849542(http://hg.netbeans.org/main/rev/5dba9a849542)	0.6635099594617441
10	8870deb3cd89(http://hg.netbeans.org/main/rev/8870deb3cd89)	0.6179812417806869
11	4fad7eb90bc3(http://hg.netbeans.org/main/rev/4fad7eb90bc3)	0.5865800194890575
12	e596998fec11(http://hg.netbeans.org/main/rev/e596998fec11)	0.5512508083111634
13	5088def6b889(http://hg.netbeans.org/main/rev/5088def6b889)	0.5130157227999564
14	ad886f765459(http://hg.netbeans.org/main/rev/ad886f765459)	0.5028822720179316
15	b3fb8e05da46(http://hg.netbeans.org/main/rev/b3fb8e05da46)	0.48900998258474443
16	9e2bfafd4e92(http://hg.netbeans.org/main/rev/9e2bfafd4e92)	0.4721669606638476
17	f1ada0839f06(http://hg.netbeans.org/main/rev/f1ada0839f06)	0.4675901750550443
18	2afb2c7c14ae(http://hg.netbeans.org/main/rev/2afb2c7c14ae)	0.46282887231727193
19	3a8956d1bfd7(http://hg.netbeans.org/main/rev/3a8956d1bfd7)	0.43343541629458604
20	49a91224e3b4(http://hg.netbeans.org/main/rev/49a91224e3b4)	0.4115919224945939


Hope it is useful for fixing this bug. If so, please help us conduct this short survey  https://docs.google.com/forms/d/1roQYX1dHezcB97KQ_iTKEtadaVbzK6FpU-6aGxeUo6M :) Thanks very much!
Comment 6 everflux 2015-09-02 20:36:25 UTC
Created attachment 155841 [details]
stacktrace

opened a JSF xhtml file
Comment 7 stefan79 2015-12-21 07:44:03 UTC
Created attachment 157871 [details]
stacktrace

UTF-8 XML-File with Encoding-Error.
Comment 8 Exceptions Reporter 2018-03-20 11:29:45 UTC
This bug already has 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=209058