Closed JojOatXGME closed 1 year ago
After some more debugging, I found that the -107
is actually coming from the bullet (•
) in the following line. Looks like the XML file is encoded in the windows-1252
encoding. So, it might be an issue of the download task (:downloadIdeaProductReleasesXml
) re-encoding the file with Charset.defaultCharset()
.
<li>• Built-in SSH client is now compatible with new <em>GitHub</em> cryptographic standards: <a href="https://youtrack.jetbrains.com/issue/IDEA-140196">IDEA-140196</a></li>
For some reason, the UTF8Reader is not reporting the error immediately, but corrupts the buffer and continues for one more iteration. This is why I initially thought the error would be at the w
of "Download"
.
Thank you for the investigation, @JojOatXGME! I've investigated that a bit more, and it seems like an issue on the Gradle side. Reported as: https://github.com/gradle/gradle/issues/25213
@hsz Thanks for the info. In my experience, Gradle unfortunately relies a lot on the default encoding when it isn't really appropriate. It looks like specifying the default encoding in the gradle.properties
as UTF-8
works as a workaround.
org.gradle.jvmargs=-Xms256m -Xmx512m -XX:MaxMetaspaceSize=384m -Dfile.encoding=UTF-8
I guess it is probably a good idea to specify the default encoding anyway to archive consistent builds. See gradle/gradle#12538 for example. In the past, the build.gradle
was also read with the default encoding (not sure about the current situation).
I do not think this issue is Gradle-related. XML files should specify encoding in <?xml version="..." encoding="..."?>
processing instruction.
The one who creates xml file should ensure to add <?xml ... encoding
.
It looks like https://www.jetbrains.com/updates/updates.xml serves a file without <?xml...
@vlsi, the encoding defaults to UTF-8
if no encoding is specified. At least, this is how I understand the specification: https://www.w3.org/TR/xml/#charencoding. The XML file served by the server has UTF-8
encoding and is therefore valid. The problem is that Gradle re-encodes the file using the default encoding (like windows-1252
on Windows).
Anyway, I agree that Gradle probably works as specified in this case. The expression project.resources.text.fromUri(…)
creates a TextResource
, which is a representation of the decoded content of the XML file. This means TextResource
represents text, not binary data, which means the encoding of the XML file is lost at this place. If you save this text, Gradle will encode the text using the default charset.
I still don't like the API design of Gradle which uses the default charset and therefore causes the inconsistent behavior between Linux and Windows. I mean, using a platform dependent charset on files within a project repository is a bug of the build configuration in practically all cases I can think of, which makes it a questionable default. Anyway, that is probably nothing which will be changed as part of this ticket, especially since Gradle uses the default charset consistently at a lot of places.
The expression project.resources.text.fromUri(…) creates a TextResource
That's right.
Probably adding something like project.resources.binary.fromUri(...)
would make sense as well.
In fact, the.TextResource
produced by the fromUri
method can still be adjusted. I have just tested the following snippet on Windows 11 (via Parallels):
tasks {
register<Sync>("testEncoding") {
from(
project
.resources
.text
.fromUri("https://gist.githubusercontent.com/hsz/5bf5c84a6a2e36f2a6716f28f287783c/raw/b0ba02f53f5937643701b848cb3728b0f3dfb144/updates.xml")
.asFile("UTF-8")
)
into(temporaryDir)
}
}
As the initial scenario failed to provide the proper bullet point character, the .asFile("UTF-8")
variant stores content in the correct way.
.asFile("UTF-8")
It is nice, however, imagine the xml updates.xml
comes in a different encoding.
Imagine something like <?xml version="1.0" encoding="Shift_JIS" ?>...
Then it would be unfair to reencode the file as UTF-8
since XML mentions Shift_JIS
.
I believe xml files must be treated as binary, and it is just wrong trying to "download XML as text, and save it to a file using regular APIs".
It is fine, if you save XML with XML APIs though. The XML writer would use a proper encoding (and/or it would add a proper <?xml encoding=...
).
However, it is just wrong to use project.resources.text
for XML contents.
I've filed https://github.com/gradle/gradle/issues/25237 so project.resources.binary
appear in the newer Gradle versions.
Thank you — for now, I'll use the above solution as a workaround.
I added a TODO to migrate to the binary
approach as soon as it becomes available.
@JojOatXGME fix is already available in the nightly snapshot.
I tested the snapshot, and it works on my case as well (after removing my workaround above).
FYI, I just noticed that due to adding asFile("UTF-8")
the XML file is no-longer downloaded during the task execution, but during the configuration phase. Note that asFile
returns an instance of File
, and is therefore not lazy.
I was running version 1.14.2. I noticed it because I got an exception after clicking Reload Gradle Project while the XML file was not reachable. It might not be that easy to reproduce because I got the impression that the file is cached by Gradle. Definitely not ideal, but not sure how relevant it is in praxis. I think the Reload still succeeded (not sure). I at least wanted to mention it here.
Describe the bug
The task
:listProductsReleases
creates an empty file as the result on my system. A silentUnmarshalException
orMalformedByteSequenceException
is thrown during the task execution. Only a warning is printed. The exception is only visible in debug mode.Log and Stacktrace
``` 2023-05-16T01:22:47.838+0200 [DEBUG] [org.gradle.internal.execution.steps.SkipUpToDateStep] Determining if task ':listProductsReleases' is up-to-date 2023-05-16T01:22:47.838+0200 [INFO] [org.gradle.internal.execution.steps.SkipUpToDateStep] Task ':listProductsReleases' is not up-to-date because: Output property 'outputFile' file C:\Users\jojo\GitHub\nix-idea\build\listProductsReleases.txt has been removed. 2023-05-16T01:22:47.838+0200 [DEBUG] [org.gradle.internal.vfs.impl.AbstractVirtualFileSystem] Invalidating VFS paths: [C:\Users\jojo\GitHub\nix-idea\build\listProductsReleases.txt] 2023-05-16T01:22:47.838+0200 [DEBUG] [org.gradle.internal.execution.steps.CreateOutputsStep] Ensuring parent directory exists for property outputFile at C:\Users\jojo\GitHub\nix-idea\build\listProductsReleases.txt 2023-05-16T01:22:47.839+0200 [DEBUG] [org.gradle.api.internal.tasks.execution.TaskExecution] Executing actions for task ':listProductsReleases'. 2023-05-16T01:22:47.840+0200 [DEBUG] [javax.xml.bind] Resolved classes from context path: [class org.jetbrains.intellij.model.ObjectFactory] 2023-05-16T01:22:47.841+0200 [DEBUG] [javax.xml.bind] Checking system property javax.xml.bind.JAXBContextFactory 2023-05-16T01:22:47.841+0200 [DEBUG] [javax.xml.bind] not found 2023-05-16T01:22:47.841+0200 [DEBUG] [javax.xml.bind] Checking system property javax.xml.bind.context.factory 2023-05-16T01:22:47.841+0200 [DEBUG] [javax.xml.bind] not found 2023-05-16T01:22:47.841+0200 [DEBUG] [javax.xml.bind] Checking system property javax.xml.bind.JAXBContext 2023-05-16T01:22:47.841+0200 [DEBUG] [javax.xml.bind] not found 2023-05-16T01:22:47.841+0200 [DEBUG] [javax.xml.bind] Searching META-INF/services 2023-05-16T01:22:47.842+0200 [DEBUG] [javax.xml.bind] Configured factorty class:com.sun.xml.bind.v2.ContextFactory 2023-05-16T01:22:47.842+0200 [DEBUG] [com.sun.xml.bind.v2.ContextFactory] Property com.sun.xml.bind.XmlAccessorFactoryis not active. Using JAXB's implementation 2023-05-16T01:22:47.854+0200 [DEBUG] [com.sun.xml.bind.v2.util.XmlFactory] SAXParserFactory instance: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl@5053cadc 2023-05-16T01:22:47.902+0200 [WARN] [org.jetbrains.intellij.IntelliJPlugin] [gradle-intellij-plugin :listProductsReleases] Failed to get products releases list: null javax.xml.bind.UnmarshalException - with linked exception: [com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Ung�ltiges Byte 1 von 1-Byte-UTF-8-Sequenz.] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:338) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:578) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:264) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:229) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:170) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:209) at org.jetbrains.intellij.model.XmlExtractor.unmarshal(XmlExtractor.kt:26) at org.jetbrains.intellij.model.XmlExtractor.unmarshal(XmlExtractor.kt:22) at org.jetbrains.intellij.model.XmlExtractor.fetch(XmlExtractor.kt:39) at org.jetbrains.intellij.tasks.ListProductsReleasesTask.listProductsReleases(ListProductsReleasesTask.kt:136) at java.base@17.0.2/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base@17.0.2/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base@17.0.2/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base@17.0.2/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29) at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:236) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68) at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:221) at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:204) at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:187) at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:165) at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:89) at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:40) at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:53) at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:50) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:40) at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68) at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38) at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41) at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74) at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29) at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:124) at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:80) at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:58) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36) at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:181) at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:71) at org.gradle.internal.Either$Right.fold(Either.java:175) at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59) at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:69) at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:47) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22) at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:110) at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:56) at java.base@17.0.2/java.util.Optional.orElseGet(Optional.java:364) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:56) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:73) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:44) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:89) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:50) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:114) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:57) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:76) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:50) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNoEmptySources(SkipEmptyWorkStep.java:254) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:91) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:56) at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32) at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38) at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:43) at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:31) at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40) at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:281) at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40) at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30) at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37) at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27) at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:44) at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:33) at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:139) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:128) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77) at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:69) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:327) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:314) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:307) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:293) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:420) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:342) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.base@17.0.2/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base@17.0.2/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base@17.0.2/java.lang.Thread.run(Thread.java:833) Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Ung�ltiges Byte 1 von 1-Byte-UTF-8-Sequenz. at java.xml/com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:702) at java.xml/com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:568) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1699) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(XMLEntityScanner.java:1256) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanCDATASection(XMLDocumentFragmentScannerImpl.java:1628) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2948) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224) at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258) ... 128 more 2023-05-16T01:22:47.914+0200 [DEBUG] [javax.xml.bind] Resolved classes from context path: [class org.jetbrains.intellij.model.ObjectFactory] 2023-05-16T01:22:47.914+0200 [DEBUG] [javax.xml.bind] Checking system property javax.xml.bind.JAXBContextFactory 2023-05-16T01:22:47.915+0200 [DEBUG] [javax.xml.bind] not found 2023-05-16T01:22:47.915+0200 [DEBUG] [javax.xml.bind] Checking system property javax.xml.bind.context.factory 2023-05-16T01:22:47.915+0200 [DEBUG] [javax.xml.bind] not found 2023-05-16T01:22:47.915+0200 [DEBUG] [javax.xml.bind] Checking system property javax.xml.bind.JAXBContext 2023-05-16T01:22:47.915+0200 [DEBUG] [javax.xml.bind] not found 2023-05-16T01:22:47.916+0200 [DEBUG] [javax.xml.bind] Searching META-INF/services 2023-05-16T01:22:47.916+0200 [DEBUG] [javax.xml.bind] Configured factorty class:com.sun.xml.bind.v2.ContextFactory 2023-05-16T01:22:47.917+0200 [DEBUG] [com.sun.xml.bind.v2.ContextFactory] Property com.sun.xml.bind.XmlAccessorFactoryis not active. Using JAXB's implementation 2023-05-16T01:22:47.931+0200 [DEBUG] [com.sun.xml.bind.v2.util.XmlFactory] SAXParserFactory instance: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl@1525c340 2023-05-16T01:22:48.856+0200 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Execute listProductsReleases for :listProductsReleases' completed 2023-05-16T01:22:48.856+0200 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Executing task ':listProductsReleases'' completed 2023-05-16T01:22:48.856+0200 [DEBUG] [org.gradle.internal.vfs.impl.AbstractVirtualFileSystem] Invalidating VFS paths: [C:\Users\jojo\GitHub\nix-idea\build\listProductsReleases.txt] 2023-05-16T01:22:48.858+0200 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Snapshot outputs after executing task ':listProductsReleases'' completed 2023-05-16T01:22:48.858+0200 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter] Removed task artifact state for task ':listProductsReleases' from context. 2023-05-16T01:22:48.859+0200 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Task :listProductsReleases' 2023-05-16T01:22:48.859+0200 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 30: dispatching BuildEvent[event=org.gradle.internal.build.event.types.DefaultTaskFinishedProgressEvent@17824b7] 2023-05-16T01:22:48.859+0200 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Task :listProductsReleases' completed 2023-05-16T01:22:48.859+0200 [DEBUG] [org.gradle.execution.plan.DefaultExecutionPlan] Node :listProductsReleases completed, executed: true 2023-05-16T01:22:48.860+0200 [DEBUG] [org.gradle.execution.plan.DefaultExecutionPlan] Node :listProductsReleases finished executing 2023-05-16T01:22:48.860+0200 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 6: released lock on state of build : 2023-05-16T01:22:48.860+0200 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker Thread 6: released lock on task execution for build : 2023-05-16T01:22:48.860+0200 [INFO] [org.gradle.execution.plan.DefaultPlanExecutor] :listProductsReleases (Thread[Execution worker Thread 6,5,main]) completed. Took 1.051 secs. ```To Reproduce
I try to build commit be20be95f16 of nix-idea (branch psicache) on my system. Unfortunatly, I don't know how to reproduce the issue on other systems. While the build fails on my system, it does work on the build server.
Expected behavior
I expected a build failure in
:runPluginVerifier
due to MP-5498, as I have observed it on the build server (https://github.com/NixOS/nix-idea/actions/runs/4975049272/jobs/8901858413?pr=63). However, the issue prevents the Plugin Verifier from beeing started.Also note that the Gradle task
:listProductsReleases
does not fail. I would also expect that an exception would fail the task since the result is not valid.Environment
Additional context
During debugging I found out that the plugin tries to parse
idea_product_releases.xml
when the exception occures. The plugin is parsingand fails when reading the
w
in"Download"
. For some reasonfBuffer
incom.sun.org.apache.xerces.internal.impl.io.UTF8Reader#read(char[], int, int)
contains the char value-107
(i.e. 149) instead of 119, which would be the right ASCII value forw
.