Renaming project fails and leaves project unusable

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Renaming project fails and leaves project unusable

1,560 Views
scottm
Senior Contributor II

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:

pastedImage_1.png

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

Labels (1)
0 Kudos
6 Replies

1,357 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello SCOTT MILLER,

I take a video to show the steps about adding linked folder and linked files,

you can have a look.

Hope it helps,


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,357 Views
scottm
Senior Contributor II

Here's a video showing the failure.

0 Kudos

1,357 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Scott,

Sorry I can't open your video, I used Firefox and IE , all can't open, could you please also attached it through "Action -> Edit-> Attach"

pastedImage_1.png


Have a great day,
TIC

0 Kudos

1,357 Views
scottm
Senior Contributor II

I've attached it as a file.  It's working on Chrome, Firefox, and IE here so I think it's something on your end.  Not much to the video, in any case - it's just throwing the error I described when I try to rename.

0 Kudos

1,357 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Scott,

I refer to your video steps test on my side, there is no error.

I use the latest version of MCUXpressso IDEv10.3.1.

How about change to another workspace, or re-install it.

0 Kudos

1,357 Views
scottm
Senior Contributor II

I have done both, many times.  I've even scoured my hard drive for every reference to every previous version of MCUXpresso, Kinetis Design Studio, and CodeWarrior, along with every JTAG driver and anything from P&E Micro, removed all of them, and reinstalled what I needed.

Just now, I created a new workspace, added the demo project, renamed it, then added a linked folder and renamed it again.  This is the entire Eclipse log file, from creation of the workspace to the final error when it couldn't save metadata for the partially-renamed project.

!SESSION 2019-04-01 20:23:44.234 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_181
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86 -data C:\workspaces\rename_test

!ENTRY org.eclipse.ui 2 0 2019-04-01 20:24:39.821
!MESSAGE Warnings while parsing the images from the 'org.eclipse.ui.commandImages' extension point.
!SUBENTRY 1 org.eclipse.ui 2 0 2019-04-01 20:24:39.821
!MESSAGE Cannot bind to an undefined command: plug-in='com.genuitec.eclipse.theming.ui', id='com.genuitec.myeclipse.help.darktheme.commandid'

!ENTRY com.genuitec.eclipse.theming.ui 1 0 2019-04-01 20:24:44.511
!MESSAGE A DevStyle Theme is being activated on this workspace; preparing colors and configuration

!ENTRY com.genuitec.eclipse.theming.ui 1 0 2019-04-01 20:24:44.563
!MESSAGE DevStyle has archived current color configurations to alternate preferences - will be restored when switching out of the DevStyle Theme

!ENTRY org.eclipse.jface 2 0 2019-04-01 20:24:45.462
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2019-04-01 20:24:45.463
!MESSAGE A conflict occurred for CTRL+U:
Binding(CTRL+U,
 ParameterizedCommand(Command(com.nxp.swtools.clocks.commands.unlockAll,Unlock All Settings,
  ,
  Category(org.eclipse.core.commands.categories.autogenerated,Uncategorized,Commands that were either auto-generated or have no category,true),
  org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@8fa8ea,
  ,,true),null),
 org.eclipse.ui.defaultAcceleratorConfiguration,
 org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+U,
 ParameterizedCommand(Command(org.eclipse.jdt.debug.ui.commands.Execute,Execute,
  Evaluate selected text,
  Category(org.eclipse.debug.ui.category.run,Run/Debug,Run/Debug command category,true),
  org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@ab4c4e,
  ,,true),null),
 org.eclipse.ui.defaultAcceleratorConfiguration,
 org.eclipse.ui.contexts.window,,,system)

!ENTRY org.eclipse.ui 4 4 2019-04-01 20:24:46.557
!MESSAGE Plugin com.nxp.mcuxpresso.trace.core, extension org.eclipse.ui.decorators, id com.nxp.mcuxpresso.trace.core.decorator: Required sub element 'icon' not defined

!ENTRY org.eclipse.ui 4 4 2019-04-01 20:24:46.561
!MESSAGE Plugin com.nxp.mcuxpresso.trace.core, extension org.eclipse.ui.decorators, id com.nxp.mcuxpresso.trace.core.decorator: Unknown extension tag found: decorator

!ENTRY org.eclipse.launchbar.core 2 0 2019-04-01 20:24:48.369
!MESSAGE Enablement expression is missing for descriptor type org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY org.eclipse.launchbar.core 2 0 2019-04-01 20:24:48.377
!MESSAGE Enablement expression is missing for config provider for org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY org.eclipse.launchbar.core 2 0 2019-04-01 20:24:48.384
!MESSAGE Enablement expression is missing for config provider for org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:48.526
!MESSAGE Recreating part support. No part support available.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:49.218
!MESSAGE Using manifest XSD 'manifest-schema/sdk_manifest_v3.4.xsd' for manifest 'C:\Users\Scott\mcuxpresso\01\SDKPackages\MK22FN512xxx12\MK22FN512xxx12_manifest_v3_4.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:49.266
!MESSAGE Using SDK manifest 'MK22FN512xxx12_manifest_v3_4.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:49.976
!MESSAGE Using manifest XSD 'manifest-schema/sdk_manifest_v3.3.xsd' for manifest 'C:\Users\Scott\mcuxpresso\01\SDKPackages\SDK_2.3.1_MK22DX256xxx5\MK22DX256xxx5_manifest_v3_2.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:50.083
!MESSAGE Using SDK manifest 'MK22DX256xxx5_manifest_v3_2.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:50.649
!MESSAGE Using manifest XSD 'manifest-schema/sdk_manifest_v3.3.xsd' for manifest 'C:\Users\Scott\mcuxpresso\01\SDKPackages\SDK_2.3.1_MK22FN1M0Axxx12\MK22FN1M0Axxx12_manifest_v3_2.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:50.685
!MESSAGE Using SDK manifest 'MK22FN1M0Axxx12_manifest_v3_2.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:50.896
!MESSAGE The device 'MK22FN512xxx12' (version='1.0.0') from SDK 'SDK_2.x_MK22FN512xxx12' (version='2.5.0', build='') will be installed.

!ENTRY org.eclipse.egit.ui 2 0 2019-04-01 20:24:51.048
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\Scott'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:51.140
!MESSAGE Using manifest XSD 'manifest-schema/sdk_manifest_v3.3.xsd' for manifest 'C:\nxp\MCUXpressoIDE_10.3.0_2200\ide\plugins\com.nxp.mcuxpresso.core.datamodels.resources_10.3.0.201810041206\fragments\ksdk_manifest.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:51.170
!MESSAGE Using SDK manifest 'ksdk_manifest.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:51.507
!MESSAGE Using manifest XSD 'manifest-schema/sdk_manifest_v3.3.xsd' for manifest 'C:\nxp\MCUXpressoIDE_10.3.0_2200\ide\plugins\com.nxp.mcuxpresso.core.datamodels.resources_10.3.0.201810041206\override\override_manifest.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:51.521
!MESSAGE Using SDK manifest 'override_manifest.xml'.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:54.189
!MESSAGE The device 'MK21FN1M0Axxx12' (version='1.0.0') from SDK 'SDK_2.x_MK22FN1M0Axxx12' (version='2.3.1', build='') will be installed.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:55.676
!MESSAGE The device 'MK22FN1M0Axxx12' (version='1.0.0') from SDK 'SDK_2.x_MK22FN1M0Axxx12' (version='2.3.1', build='') will be installed.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:56.949
!MESSAGE The device 'MK21DN512Axxx5' (version='1.0.0') from SDK 'SDK_2.x_MK22DX256xxx5' (version='2.3.1', build='') will be installed.

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2019-04-01 20:24:58.117
!MESSAGE The device 'MK22DX256xxx5' (version='1.0.0') from SDK 'SDK_2.x_MK22DX256xxx5' (version='2.3.1', build='') will be installed.

!ENTRY com.crt.log 1 0 2019-04-01 20:26:51.554
!MESSAGE Unable to find XML element for reference: armgcc (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:51.554
!MESSAGE Unable to find XML element for reference: iar (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:51.570
!MESSAGE Unable to find XML element for reference: mdk (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:51.570
!MESSAGE Unable to find XML element for reference: iar (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:51.570
!MESSAGE Unable to find XML element for reference: mdk (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:51.570
!MESSAGE Unable to find XML element for reference: armgcc (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY org.eclipse.cdt.core 1 0 2019-04-01 20:26:51.832
!MESSAGE Indexed 'frdmk22f_hello_world' (0 sources, 0 headers) in 0 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:52.720
!MESSAGE Unable to find XML element for reference: armgcc (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:52.725
!MESSAGE Unable to find XML element for reference: iar (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:52.729
!MESSAGE Unable to find XML element for reference: mdk (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:52.780
!MESSAGE Unable to find XML element for reference: iar (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:52.785
!MESSAGE Unable to find XML element for reference: mdk (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY com.crt.log 1 0 2019-04-01 20:26:52.789
!MESSAGE Unable to find XML element for reference: armgcc (class com.nxp.mcuxpresso.core.datamodels.manifest.xml.ToolchainType)

!ENTRY org.eclipse.cdt.core 1 0 2019-04-01 20:27:11.338
!MESSAGE Indexed 'renamed_project' (0 sources, 0 headers) in 0 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2019-04-01 20:27:44.300
!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)

!ENTRY org.eclipse.cdt.core 1 0 2019-04-01 20:27:50.520
!MESSAGE Indexed 'renamed_again' (16 sources, 43 headers) in 1.12 sec: 6,676 declarations; 14,651 references; 2 unresolved inclusions; 92 syntax errors; 78 unresolved names (0.36%)

!ENTRY org.eclipse.ui.ide 4 4 2019-04-01 20:28:23.328
!MESSAGE Problems saving workspace

!ENTRY org.eclipse.ui.ide 4 1 2019-04-01 20:28:23.335
!MESSAGE Problems occurred while trying to save the state of the workbench.
!SUBENTRY 1 org.eclipse.core.resources 4 568 2019-04-01 20:28:23.335
!MESSAGE Could not write metadata for '/renamed_project'.
!STACK 0
java.io.FileNotFoundException: C:\workspaces\rename_test\.metadata\.plugins\org.eclipse.core.resources\.projects\renamed_project\.markers (The system cannot find the path specified)
 at java.io.FileOutputStream.open0(Native Method)
 at java.io.FileOutputStream.open(FileOutputStream.java:270)
 at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
 at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
 at org.eclipse.core.internal.localstore.SafeFileOutputStream.<init>(SafeFileOutputStream.java:51)
 at org.eclipse.core.internal.resources.SaveManager.visitAndSave(SaveManager.java:1657)
 at org.eclipse.core.internal.resources.SaveManager.visitAndSave(SaveManager.java:1739)
 at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1199)
 at org.eclipse.core.internal.resources.Workspace.save(Workspace.java:2283)
 at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$5.run(IDEWorkbenchAdvisor.java:526)
 at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

It looks to me like the problem is happening in org.eclipse.core.filesystem.URIUtil.toPath.

Thanks,

Scott

0 Kudos