Skip to content

CoderMalfunctionError while searching #7839

@wumpz

Description

@wumpz

Apache NetBeans version

Apache NetBeans 23

What happened

I have a multimodule project. Using Netbeans Find method on specific module with e.g. text "TEST" i find results. Using the find globally or with scope Open Projects I got less results. First I thought, I do not understand what scope "Open Projects" means but looking into the IDE Log I found:

SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.search.SearchTask
java.lang.IllegalArgumentException: newPosition > limit: (1 > 0)
	at java.base/java.nio.Buffer.createPositionException(Buffer.java:352)
	at java.base/java.nio.Buffer.position(Buffer.java:327)
	at java.base/java.nio.ByteBuffer.position(ByteBuffer.java:1551)
	at java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:623)
	at org.netbeans.api.queries.FileEncodingQuery$ProxyCharset$ProxyDecoder.decodeLoop(FileEncodingQuery.java:191)
	at java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:586)
Caused: java.nio.charset.CoderMalfunctionError
	at java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:588)
	at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:385)
	at java.base/sun.nio.cs.StreamDecoder.lockedRead(StreamDecoder.java:217)
	at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:171)
	at java.base/java.io.InputStreamReader.read(InputStreamReader.java:188)
	at java.base/java.io.BufferedReader.fill(BufferedReader.java:160)
	at java.base/java.io.BufferedReader.implRead(BufferedReader.java:196)
	at java.base/java.io.BufferedReader.read(BufferedReader.java:181)
	at org.netbeans.modules.search.matcher.LineReader.readNext(LineReader.java:70)
	at org.netbeans.modules.search.matcher.SingleLineStreamMatcher.getTextDetailsSL(SingleLineStreamMatcher.java:102)
	at org.netbeans.modules.search.matcher.SingleLineStreamMatcher.checkMeasuredInternal(SingleLineStreamMatcher.java:68)
	at org.netbeans.modules.search.matcher.AbstractMatcher.check(AbstractMatcher.java:53)
	at org.netbeans.modules.search.matcher.DefaultMatcher.checkMeasuredInternal(DefaultMatcher.java:93)
	at org.netbeans.modules.search.matcher.AbstractMatcher.check(AbstractMatcher.java:53)
	at org.netbeans.modules.search.BasicComposition.start(BasicComposition.java:78)
	at org.netbeans.modules.search.SearchTask.run(SearchTask.java:87)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)

So I assume there is somewere a for Netbeans problematic file. However, this should not stop the search.

Language / Project Type / NetBeans Component

Multimodule Java Maven Project (no java modules)

How to reproduce

That is a good question. Since I cannot make a project copy of mine, I still search for the problematic file.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

21

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions