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
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at org.eclipse.core.filesystem.URIUtil.toPath(URIUtil.java:60)
at org.eclipse.core.internal.resources.Workspace.copyVariable(Workspace.java:1154)
at org.eclipse.core.internal.resources.Workspace.transferVariableDefinition(Workspace.java:1130)
at org.eclipse.core.internal.resources.Workspace.copyTree(Workspace.java:1066)
at org.eclipse.core.internal.resources.Workspace.copyTree(Workspace.java:1118)
at org.eclipse.core.internal.resources.Workspace.copyTree(Workspace.java:1118)
at org.eclipse.core.internal.resources.Workspace.move(Workspace.java:2023)
at org.eclipse.core.internal.resources.ResourceTree.movedProjectSubtree(ResourceTree.java:679)
at org.eclipse.core.internal.resources.ResourceTree.standardMoveProject(ResourceTree.java:1101)
at org.eclipse.core.internal.resources.Resource.unprotectedMove(Resource.java:1824)
at org.eclipse.core.internal.resources.Resource.move(Resource.java:1502)
at org.eclipse.ltk.core.refactoring.resource.RenameResourceChange.perform(RenameResourceChange.java:115)
at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:280)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:257)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:305)
at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:96)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:216)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

 

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.

 

Thanks,

 

Scott

Outcomes