Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when reached file limit #5

Open
securigy opened this issue Dec 26, 2021 · 7 comments
Open

Exception when reached file limit #5

securigy opened this issue Dec 26, 2021 · 7 comments

Comments

@securigy
Copy link

Got this unhandled exception out of the blue... and it i snot the first time I run my app... I guess it reached 10 filles that I set...

An exception occurred while renaming the old log file
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_10.tx1
to
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_09.tx1

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at TracerX.FileBase.TryRename(String from, String basePath, Int32 num)
An exception occurred while renaming the old log file
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_09.tx1
to
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_08.tx1

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at TracerX.FileBase.TryRename(String from, String basePath, Int32 num)
An exception occurred while renaming the old log file
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_08.tx1
to
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_07.tx1

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at TracerX.FileBase.TryRename(String from, String basePath, Int32 num)
An exception occurred while renaming the old log file
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_07.tx1
to
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_06.tx1

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at TracerX.FileBase.TryRename(String from, String basePath, Int32 num)
An exception occurred while renaming the old log file
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_06.tx1
to
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_05.tx1

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at TracerX.FileBase.TryRename(String from, String basePath, Int32 num)
An exception occurred while renaming the old log file
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_05.tx1
to
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_04.tx1

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at TracerX.FileBase.TryRename(String from, String basePath, Int32 num)
An exception occurred while renaming the old log file
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_04.tx1
to
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_03.tx1

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at TracerX.FileBase.TryRename(String from, String basePath, Int32 num)
An exception occurred while renaming the old log file
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_03.tx1
to
C:\Projects\DTDesktopExtension\DesktopAutomation\DesktopAutomation\bin\Debug\Logs\DesktopAutomationLog_02.tx1

System.IO.IOException: Cannot create a file when that file already exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at TracerX.FileBase.TryRename(String from, String basePath, Int32 num)
The thread 0x2024 has exited with code 0 (0x0).
20:28:05.409 Verbose Main Thread Program+ Another DesktopAutomation application instance is already running, exiting...
The program '[20672] DesktopAutomation.exe' has exited with code 0 (0x0).

@MarkLTX
Copy link
Owner

MarkLTX commented Jan 12, 2023

This is a very old issue that I think has been fixed in later releases. I can't reproduce it so unless somebody besides me is still seeing this I will probably close this soon.

@securigy
Copy link
Author

Hi Mark, so I have been using your latest version and in most cases it handled async/await pattern OK when working under Visual Studio. However, lately I shipped the app to my beta tester, and one of the exceptions is as depicted in screenshot... Seems like something is still wrong...
image

@MarkLTX
Copy link
Owner

MarkLTX commented Jan 28, 2023

Sorry about that.

Is there any chance you could provide sample code that reproduces this issue?

It looks like thread 2 was awaiting the task that was running thread 4, the exception was thrown in thread 4 and captured by the Task object, and then re-thrown as an AggregateException in thread 2 when it tried to access the Task.Result. Does that seem right to you?

BTW, this probably should have been a new issue.

@securigy
Copy link
Author

securigy commented Jan 28, 2023 via email

@MarkLTX
Copy link
Owner

MarkLTX commented Jan 30, 2023

I haven't been able to reproduce this yet. Which version of .NET are you targeting?

@securigy
Copy link
Author

securigy commented Jan 30, 2023 via email

@MarkLTX
Copy link
Owner

MarkLTX commented Jan 31, 2023

Please check the properties of your reference to TracerX-Logger.dll and confirm it's referencing the 'net46' version. That is, the path should end with something like this: "\packages\TracerX-Logger.8.0.0\lib\net46\TracerX-Logger.dll". Note the "net46" folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants