2022-03-07 07:32 PM
Throws this incredibly descriptive error:
Errors occurred during the build.
Errors running builder 'CDT Builder' on project 'App'.
java.lang.NullPointerException
I tried cleaning and re-importing the project, and the error persists. If I go back to v1.8.0, it works fine. Anyone have a work around for this?
Solved! Go to Solution.
2022-03-09 03:18 AM
After some analysis we found the issue. It is a bit of a corner case which effects customers who are migrating projects from any previous version of CubeIDE into 1.9.0. But only if the customer has touched the Output prefix setting.
If this field has been touched, and the user has clicked Apply or Apply and Close, a line will be injected into the .cproject file. This line has changed format in 1.9.0. Actually it can also be one line per build configuration --> potentially several lines!
The line added to CubeIDE 1.8.0 and previous versions:
<outputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.output.1640602458" outputPrefix="foo"/>
(The digits at the end of the id is irrelevant)
If this line exist in your project you will get the null-pointer exception. This is because of a minor change in toolchain integration.
If you were to modify the Output prefix field in CubeIDE 1.9.0 and newer versions the following line will instead be added:
<outputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.output.elf.1640602458" outputPrefix="foo" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.output.elf"/>
This line will work in CubeIDE 1.9.0 and later.
In conclusion we have a break in the format in 1.9.0 vs previous versions.
How to fix the issue in CubeIDE?
Users using this feature AND frequently moving between 1.8.0 or prior version AND the 1.9.0 will still have a headache.
In your case @BStic.2 you are not using this option at all in your project. Our guess is that you probably just played with this option long time ago then clicked Apply. Then removed your change, clicked Apply. As a consequence you have the line in your .cproject-file with an empty value.
So, assuming that you just clean the line, your project should be running fine in any version of CubeIDE.
Thanks for bringing this corner case defect to our attention!
Let us know if there are more questions.
Internal ticket reference: 124045
2022-03-07 11:44 PM
Hi @BStic.2 ,
Can you share the .log file (workspace/.metadata/.log), hopefully containing a more explicite Java stack trace.
2022-03-08 07:36 AM
2022-03-08 09:08 AM
There is clearly something wrong, we'll get back to you to ask for more details if needed.
Thanks for the report ! In the meantime continue using 1.8.0, apologizes for that.
2022-03-08 09:09 AM
Thanks!
2022-03-08 10:55 AM
Hi,
Could you please provide us with your .project and .cproject file and the .settings folder? Make a zip-file and send it to us for analysis?
If you have more than one project in your workspace, then we would be grateful if we have the files/folders described above for all projects.
You can send it to me as a PM or my e-mail. See my profile.
2022-03-08 11:04 AM
Sure, I PM'd a zip file of the Eclipse project files to you.
2022-03-09 03:18 AM
After some analysis we found the issue. It is a bit of a corner case which effects customers who are migrating projects from any previous version of CubeIDE into 1.9.0. But only if the customer has touched the Output prefix setting.
If this field has been touched, and the user has clicked Apply or Apply and Close, a line will be injected into the .cproject file. This line has changed format in 1.9.0. Actually it can also be one line per build configuration --> potentially several lines!
The line added to CubeIDE 1.8.0 and previous versions:
<outputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.output.1640602458" outputPrefix="foo"/>
(The digits at the end of the id is irrelevant)
If this line exist in your project you will get the null-pointer exception. This is because of a minor change in toolchain integration.
If you were to modify the Output prefix field in CubeIDE 1.9.0 and newer versions the following line will instead be added:
<outputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.output.elf.1640602458" outputPrefix="foo" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.output.elf"/>
This line will work in CubeIDE 1.9.0 and later.
In conclusion we have a break in the format in 1.9.0 vs previous versions.
How to fix the issue in CubeIDE?
Users using this feature AND frequently moving between 1.8.0 or prior version AND the 1.9.0 will still have a headache.
In your case @BStic.2 you are not using this option at all in your project. Our guess is that you probably just played with this option long time ago then clicked Apply. Then removed your change, clicked Apply. As a consequence you have the line in your .cproject-file with an empty value.
So, assuming that you just clean the line, your project should be running fine in any version of CubeIDE.
Thanks for bringing this corner case defect to our attention!
Let us know if there are more questions.
Internal ticket reference: 124045
2022-03-09 07:15 AM
Great! Thanks! I was able to compile my project.