I don’t understand, i have this issue in C++
How can i resolve this ?
Thaks, Gaspard
1 Like
A little bit of context can help us out here. When did you get this error? Was it when you were trying to deploy your code? Was it when it was running?
Not sure if you tried this but google sesrching or throwing this into ChatGPT might net you some reaults as well.
1 Like
Can you post the stack trace? That will tell you where the error is coming from.
This doesn’t look like a normal compiler error to me. Instead this seems like a possible gradle issue. Open a terminal in vscode and run a ./gradlew clean
(there might be an option to that in vscode but I’m not sure) But other than that I’d need to see your code and possibility a stacktrace to provide meaningful help.
They figured out the root cause and opened a GradleRIO issue for it:
opened 06:26PM - 29 Mar 23 UTC
bug
I speak for my former team (5553) as an alumnus given that I actively helped res… olving this issue for my team.
When compiling, we got this strange error:
```
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':compileFrcUserProgramWindowsx86-64ReleaseExecutableFrcUserProgramCpp'.
java.nio.charset.MalformedInputException: Input length = 1
```
Looking at the stacktrace, we could identify that the problem is as follows:
-The compiler generates a warning for a given line of code
-This warning lands in the output.txt file of the running task in a Windows-1252 or similar encoding (but not UTF-8 or standard)
-The method printWarningsForBinTask (in the package edu.wpi.first.gradlerio.wpi.cpp, class WPINativeCompileRules) reads the output file to display it
-By reading the file, an encoding error (see above) appears at line 106 and makes the whole compilation crash
It seems that on our side, and on this computer specifically, there is also the use of a bad compiler.
However, it does not prevent the bad reading of the file from crashing the whole compilation. I think it would be beneficial to handle this exception better by possibly warning the user and/or avoiding crashing the whole compilation **without more details**.
The team being in the rush of a competition, I didn't have the time to get directly the output.txt file in question, time being short.
I remain at your complete disposal for more information if needed