Skip to main content
abbb.12
Associate
March 30, 2021
Question

�?CubeIDE】Why delete my Src folder ?Why haven't you fix it for so long?

  • March 30, 2021
  • 17 replies
  • 4622 views

Sorry,I really want to curse the CubeIDE/CubeMX development team�?�?�?�?�?�?�?

Because of you, the results of my work are gone three times�?�?�?�?

Not Once,Not Twice ,It is Three,Three,Three�?�?�?�?�?�?

​

For the first time, I thought I deleted it by mistake.

The second time, I thought my hard drive was broken.

For the third time, I found out that it was CubeIDE!!!

​

I searched on Google for a long time, and found that other people encountered it, but I didn’t give a solution. It just said it was a BUG. The next version was corrected. Believe it or not, I believe it anyway.

​

Almost a year has passed, and I found that this is still the case. I have used a lot of IDEs, Only CubeIDE will delete my files. And why not fix it, why?

​

This time, I have time to find why,.and finally found out that it was caused by clone the project. For example, copy the OBJ_A folder and rename it to OBJ_B, CubeIDE opens OBJ_B, open the ioc file, and modifies some things in CubeMX. Regenerate, Oh Yeah, at the moment of witnessing the miracle, the Core\Src folder in OBJ_A is gone. Like girlfriend who abandoned me, disappeared forever。

​

The solution is so simple: after copying, delete the .mxproject MX project file in OBJ_B.

CubeMX will recreate it when you open ioc file.

​

God, for such a simple question, why not fix it soon? Is it difficult to judge the path before opening it? Moreover, even if the path is wrong, why do you delete my files, if you want to delete them, why not put it to the recycle ?Why?

​

Don't ask me why I want to copy the project, why not create a new one, I have a lot of configuration, can I do it again? Other IDEs can, why not your CubeIDE?

​

​

My sincere regards! ! !​

​

------------------------------------------------------------------------------------------------

�?�自一个开�?�者的愤怒:

抱歉,我真的想问候一下CubeIDE / CubeMX开�?�团队�?�?�?�?�?�?�?�?

​

因为你们,我的工作�?果消失了三次,硬盘�?��?都找�?回�?�?�?�?

​

�?是一次,�?是两次,而是三次,三次,三次�?�?�?�?�?�?

​

第一次,我以为是我自己误删除了。

第二次,我以为是我硬盘�??了。

第三次,我�?�?�现是CubeIDE。

​

我在谷歌上�?�索了很久,�?�现也有其他人�?�到了,但是,没给出解决办法,�?�是说是BUG,下个版本修正,�?管你们信�?信,�??正我信了

​

快一年过去了,我�?�现还是这样,我使用了好多IDE,就你们会删除我的文件。而且为什么�?修正它,为什么?

​

这一次,我有空了,�?�了实验,终于�?�现了,是�?制项目造�?的,例如:OBJ_A 文件夹直接�?制一个,�?新命�??为OBJ_B, CubeIDE 打开OBJ_B,打开ioc文件,CubeMX中修改一些东西,�?新生�?,duang,�?�?奇迹的时刻,OBJ_A中的Core\Src文件夹没了,就�?抛弃你的女朋�?�,永远消失了。

​

解决办法也简�?�,就是�?制完,删除OBJ_B中的.mxproject MX项目文件。

�?新打开ioc文件,​.mxproject会被�?建。

​

MD,这么简�?�的一个问题,为什么�?修正,打开�?,判断一下路径很难�?�?而且,就算路径�?对,为啥你�?删除我的文件,你�?删除,放回收站也好呀。

​

�?�?问我为什么�?�?制项目,为什么�?新建,我一大堆�?置,难�?��?�?�一�??�?�?其他IDE�?�以,为什么你们CubeIDE�?�?�以。

​

献上我诚挚的问候�?�?�?​

This topic has been closed for replies.

17 replies

abbb.12
abbb.12Author
Associate
March 30, 2021

My CubeIDE Ver:1.6.0

Now:3.30 2021 ,Hope you guys fix it soon,TKS�?

dungeonlords789
Associate III
April 8, 2021
Markus GIRDLAND
ST Employee
April 9, 2021

I'll bring it up to the team. We're trying to make sure these cases shouldn't happen but not all cases have been found yet, it seems.

Cartu38 OpenDev
Graduate II
April 1, 2021

Good finding ! Would help @STM_support.

Then I guess .mxproject is not useless .... Such is Device Configuration tool metadata. Removing them may leading to extra pain ... especialy if asking at a point to perform some project update if revisiting some IP setting or ... Such .metadata are kind of memory of project life history ... loosing it may have drawbacks.

Instead remove it maybe better to keep it but to rework it. I.e. doing project clone let's patch such file especialy updating absolute path ...

Myself always careful about hacking / removing metadata ... such are never useless and as end users we are not aware of they are serving product behavior ...

Another way to do being safer I guess is:

1) you're intending to clone your project so called "myProject1"

2) copy (Thanks favorite explorer or ...) your current project to "myProject1_temp"

3) Thanks IDE rename "myProject1" to "myProject2" .... please notice here project renaming is propagated to .ioc file name and content AND .mxproject file content

4) Back to your favorite explorer rename "myProject1" to "myProject2"

5) Back to your favorite explorer rename "myProject1_temp" to "myProject1"

6) Within IDE refresh project explorer (F5 key) and import "myProject1"

I may agree all such is not so user friendly but fact based neither Eclipse vanilla nor STM32CubeiDE promote project clone feature ...

abbb.12
abbb.12Author
Associate
April 7, 2021

TKS for your reply.

In my project,when I open .ioc file in CubeIDE,the .mxproject will be recreated,and everything is OK。

And We can also manually modify the wrong path in the .mxproject file,instead of deleting it。

​

​

​

AVI-crak
Senior
April 1, 2021

TortoiseGit

abbb.12
abbb.12Author
Associate
April 7, 2021

TKS.

I use Git and SVN。

CubeIDE delete not my current working project,but the original project,when i feel wrong,someting not commit is gone。

​

GregKN
Associate II
April 7, 2021

Hello,

i found this thread, because STM32CubeIDE deleted nearly all my src-folders during i try to export my projects into a zip file for backup. Didn't believe it until i found several threads including this one reporting this bug.

Be aware! You only have to open the project and try to export it and you will loose all your .c-files in the src folder. You don't have to recompile or edit the project!

Really a nightmare!

Thanks ST!

nico 2010
Associate
April 8, 2021

Can you be more specific? I use CubeMx 1.6.0 and the installed CubeMX 6.2.0 RC3 and I follow what you did. I mean I try to export in a zip archive one of my opened projects. I check to be all the folders marked and then I archive them. After that, I check the newly made archive and everything was there (.c files, .h files etc.).

Really I do not understand what are you guys trying to do?

Example given:

My project

0693W000008yyCiQAI.pngExported archive:0693W000008yyCxQAI.pngSrc folder content:0693W000008yyDRQAY.pngInc folder content:0693W000008yyDlQAI.pngAll of them are identical with coresponding files in my project. So, no problems at all.

Tesla DeLorean
Guru
April 8, 2021

Ok, people who don't have a problem have no complaints. People aren't complaining about things working as expected.

If the tools' not deleting your work that's great, for you, it doesn't really help diagnose the failing case.

However when the tools does delete things due to some corner conditions or broken logic, everyone has a bad day...

When the chance of failure is in the ppm, you give it to a few hundred million people, you're likely to see a few fail.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Cartu38 OpenDev
Graduate II
April 8, 2021

I agree but sounds here issue is hopefully understood looking at such topic's posts: .mxproject is bad guy if some specific conditions which is project move (Thanks clone or copy or ...). If doing a project move at a point (which is fully valuable if real life) specific attention has to be set to such .mxproject file content.

DavidAlfa
Senior II
April 9, 2021

I had this issue after updating to v1.5.1. It deleted files in projects that were closed!

It kept happening until I deleted everything related to Cube IDE, CubeMx, and JRE.

That means deleting all cube folders in the user folder and c:\.

It even kept happening until I uninstalled java and reinstalled again.

Not sure if that was the fix or just a lucky shot, but didn't happen again.

But I learned to not trust it, I use eGit and commit everything.

Cartu38 OpenDev
Graduate II
April 9, 2021

"I use eGit and commit everything" is definitively a good practice ;) whatever software bug or not.

I foresee myself project closing is not preventing at all some piece of IDE to act on (should be but depends how IDE contributions are written). If Eclipse world project closing is mainly aiming to improve runtime thinking hierarchical file search or workspace file indexing.

By then end our project data are files relying on a file system. Even is your project is closed .. still file system under the hood. If some IDE contributions are acting directly to file system not relying on common Eclipse workspace & project APIs ... project closure is not preventing anything.

DavidAlfa
Senior II
April 9, 2021

Well, for that you can set the git repository to a local folder that's linked to Gdrive or dropbox, or just use github.

That will be bomb-proof.

You know how it is, you start working in something and keep coding for 2 hours without noticing it.

Then suddenly something goes wrong and you lose everything. Then you learn to commit every 2 minutes!

abbb.12
abbb.12Author
Associate
April 27, 2021

Use CubeIDE like a Bomb:face_with_tears_of_joy:

GregKN
Associate II
April 12, 2021

Hello Nico 2010,

i did the same as you did, exporting my projects without touching them. All src folders were missing in the zip file, because they were deleted by STM32CubeIDE during export. This should never happen. And to blame eclipse for that behavior as others do is not correct. I'm working with several eclipse-based IDEs (e.g. CodeComposerStudio) and none has ever deleted files or folders without asking.

This is a major bug, nothing else.

P.S. I'm really happy for you that your installation is not affected.

Cartu38 OpenDev
Graduate II
April 12, 2021

@GregKN​ definitively not an Eclipse platform issue here. '.mxproject' file is pure STM metadata, issue here is coming from.