cancel
Showing results for 
Search instead for 
Did you mean: 

Create new project: "File already exists" (it doesn't)

JSome.2
Associate II

When I attempt to create a new project with TouchGFX Designer 4.18.0 using the STM32F469I Discovery as a board setup, the Create button gets to 88% and then consistently fails with the message "Error: Cannot create a file when that file already exists."

The message seems completely misleading though. It also asks me to look at the TouchGFXDesigner.log for additional info. That log tells a completely different story. Roughtly halfway through the logfile, I find:

2021-10-27 14:57:50,354 [10] INFO Utils.WebHandling.WebHandler: Downloading washer_demo_image_02.png

2021-10-27 14:57:50,526 [10] INFO Utils.WebHandling.WebHandler: Downloading washer_demo_image_03.png

2021-10-27 14:57:50,713 [10] INFO Utils.WebHandling.WebHandler: Downloading STM32F746G-DISCO_washerdemo.png

2021-10-27 14:57:50,869 [10] INFO Utils.WebHandling.WebHandler: Downloading washer_demo_image_02.png

2021-10-27 14:57:51,041 [10] INFO Utils.WebHandling.WebHandler: Downloading washer_demo_image_03.png

2021-10-27 14:57:51,197 [10] INFO Utils.WebHandling.WebHandler: Downloading BlankUI.png

2021-10-27 16:24:59,410 [22] ERROR Utils.WebHandling.WebHandler: The operation has timed out.

System.Net.WebException: The operation has timed out.

  at System.Net.HttpWebRequest.GetResponse()

  at Utils.WebHandling.WebHandler.RequestHeadStatusResponse(Uri uri)

2021-10-27 16:35:42,305 [10] INFO TouchGFXPackages.Implementation.FileDownloader: Take operation was canceled. IsCancellationRequested=True

2021-10-27 16:35:42,330 [1] INFO TouchGFXDesigner.Main.MainWindow: Application closed

2021-10-27 16:55:19,721 [1] INFO TouchGFXDesigner.App: Logging configured

followed by roughly one metric ton of .NET exceptions.

Also note the message: "Take operation was canceled." This is not a manual cancellation by me. Once I started the project generation, I did not interact with Designer again. The message appears to refer to an internal or self-cancelation of some sort.

If there is a timeout, it's an incredibly short one. The generation process gets from 0% to 88% in just a few seconds, and then the error happens within subsecond time of reaching 88%.

Suggestions?

6 REPLIES 6
Romain DIELEMAN
ST Employee

Hi,

Could you share your log file so that I can forward it to the TouchGFX Designer team ? Could you try to change the name of the project you are trying to create to something different to the standard MyApplication_x ?

/Romain

JSome.2
Associate II

Thank you for answering so promptly, Romain. I will attach my logfile here.

I see where at least part of my confusion comes from. Looking at the timestamps, this logfile was not created when I generated my project. It's a cumulative logfile of everything Designer has done since I installed it yesterday.

I reproduced the error using the project name EmptyTestProject. I notice that if I create the project on a local drive, project creation works fine, but if I create it on a shared drive (as in this case), the error occurs. I've only done this 2 or 3 times but I am pretty confident there's a correlation there.

helioz
Associate II

I am experiencing the same problem with V4.22.0 when I create a STM32H747I-DISCO project on a shared drive.
The project creates successfully on C: drive with no error messages, but every time I try to create it on a shared drive I get the "File already exists" error.

The relevant section from the log file:
2023-08-19 10:25:02,416 [1] ERROR TouchGFXDesigner.App: Cannot create a file when that file already exists.
System.IO.IOException: Cannot create a file when that file already exists.
at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)
at System.IO.FileInfo.MoveTo(String destFileName, Boolean overwrite)
at TouchGFXPackages.Implementation.ZipUtil.RenameProjectFileAndUpdateResultingPackage(TouchGFXPackage touchGFXPackage, String projectPath, String applicationName)
at TouchGFXPackages.Implementation.ZipUtil.Unpack(TouchGFXPackage touchGFXPackage, String projectPath, String applicationName, IProgress`1 progress)
at TouchGFXPackages.Implementation.PackageManager.Unpack(TouchGFXPackage touchGFXPackage, String projectPath, String applicationName, IProgress`1 progress)
at TouchGFXPackages.Implementation.PackageManager.CombineAtAndUi(TouchGFXPackage tgui, TouchGFXPackage tgat, String projectPath, String applicationName, Int32 height, Int32 width, ColorDepth selectedColorDepth, IProgress`1 progressPercentage)
at TouchGFXDesigner.Main.Lobby.ApplicationCreatorOperation.<>c__DisplayClass5_0.<CombinePackagesAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at TouchGFXDesigner.Main.Lobby.ApplicationCreatorOperation.CombinePackagesAsync(ApplicationCombineConfig applicationConfig, IProgress`1 progressPercentage)
at TouchGFXDesigner.Main.Lobby.ApplicationCreatorOperation.Create(ApplicationCombineConfig applicationConfig, IProgress`1 progressPercentage)
at TouchGFXDesigner.Main.Lobby.ApplicationCreator.ApplicationCreatorViewModel.CreateApplication(Object obj)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

This is an issue for users which use virtual machines. In my case, I run GFXDesigner on a Win10 virtual machine and the the CubeIDE is running natively on macOS.

It would be great if the developers could resolve this issue to enable the use of shared drives and thereby the use of task oriented VM's.

For additional context here are the log file entries just before the error:

2023-08-19 09:59:19,012 [.NET ThreadPool Worker] DEBUG TouchGFXPackages.Implementation.TouchGFXPackageStream: Filestream opened on C:\Users\eb\AppData\Roaming\TouchGFX-4.22.0\Downloads\STM32H747I-DISCO\3.0.9\STM32H747I-DISCO-3.0.9.tpa
2023-08-19 09:59:19,255 [.NET ThreadPool Worker] DEBUG TouchGFXPackages.Implementation.TouchGFXPackageStream: Filestream opened on C:\TouchGFX\4.22.0\app\packages\BlankUI-2.0.0.tpa
2023-08-19 09:59:19,281 [.NET ThreadPool Worker] DEBUG TouchGFXPackages.Implementation.TouchGFXPackageStream: Filestream opened on C:\Users\eb\AppData\Roaming\TouchGFX-4.22.0\Downloads\STM32H747I-DISCO\3.0.9\STM32H747I-DISCO-3.0.9.tpa
2023-08-19 09:59:20,243 [.NET ThreadPool Worker] DEBUG TouchGFXPackages.Implementation.TouchGFXPackageStream: Filestream opened on C:\TouchGFX\4.22.0\app\packages\BlankUI-2.0.0.tpa
2023-08-19 09:59:20,279 [1] ERROR TouchGFXDesigner.App: Cannot create a file when that file already exists.

Yoann KLEIN
ST Employee

Hello @helioz,

I just created a project on a shared drive, without any issues.

Does that happen only while using VM or also on a classic Windows 10 setup ?

Yoann KLEIN
ST Software Developer | TouchGFX
CTapp.1
Senior

I've just run into this when trying to create the projected in a shared folder under VMware Fusion on Mac.

Looks like creating the project on a local drive and then moving to the share works.