AnsweredAssumed Answered

Renaming project fails and leaves project unusable

Question asked by SCOTT MILLER on Mar 28, 2019
Latest reply on Apr 1, 2019 by SCOTT MILLER

This has really been driving me nuts - an MCUX project with linked folders will consistently cause a crash when renaming or moving a project with linked folders:



Here's a stack trace:


!MESSAGE Indexed 'rename_test' (22 sources, 49 headers) in 1.53 sec: 8,176 declarations; 19,832 references; 4 unresolved inclusions; 66 syntax errors; 38 unresolved names (0.14%)
!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2019-03-28 15:19:57.130
!MESSAGE Internal Error
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(
at org.eclipse.core.runtime.Assert.isNotNull(
at org.eclipse.core.filesystem.URIUtil.toPath(
at org.eclipse.core.internal.resources.Workspace.copyVariable(
at org.eclipse.core.internal.resources.Workspace.transferVariableDefinition(
at org.eclipse.core.internal.resources.Workspace.copyTree(
at org.eclipse.core.internal.resources.Workspace.copyTree(
at org.eclipse.core.internal.resources.Workspace.copyTree(
at org.eclipse.core.internal.resources.Workspace.move(
at org.eclipse.core.internal.resources.ResourceTree.movedProjectSubtree(
at org.eclipse.core.internal.resources.ResourceTree.standardMoveProject(
at org.eclipse.core.internal.resources.Resource.unprotectedMove(
at org.eclipse.core.internal.resources.Resource.move(
at org.eclipse.ltk.core.refactoring.resource.RenameResourceChange.perform(
at org.eclipse.ltk.core.refactoring.CompositeChange.perform(
at org.eclipse.ltk.core.refactoring.PerformChangeOperation$
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(
at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(
at org.eclipse.jface.operation.ModalContext$


And it's worse than just crashing - the operation fails partway through and leaves the old project folder behind with its .project file and nothing else, and the new project is unusable - none of the include paths work, at the very least.


This is just compounding the difficulty of coloring within the lines in MCUX.  I've spent days migrating a project to the MCUX SDK, and to do it right I started with a brand new SDK project and verified all of the settings manually, recreated the linked folder setup and the build configurations, set the include paths, and so on.  Now that it's ready and I want to replace the main project - I can't move it.  I can't export and reimport it. And I've got to restore the project from backups to even try it again.


To reproduce this problem:


Create a new project.  I'm importing the hello_world example from the twrk21f120m SDK package.  Rename it to test123.  Rebuild, still works.  Create a linked folder under 'source' called 'test', linked to a file system path - I'm using 'c:\temp'.  Now rename the project to test345 and it crashes with a 'null argument' error.


It'd be really nice if this could be fixed sometime soon.  It's caused me all sorts of headaches.