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

Error upgrading with leftover files files #1688

Closed
PiggyWhiskey opened this issue Apr 30, 2016 · 10 comments
Closed

Error upgrading with leftover files files #1688

PiggyWhiskey opened this issue Apr 30, 2016 · 10 comments

Comments

@PiggyWhiskey
Copy link

PiggyWhiskey commented Apr 30, 2016

CKAN v1.16.1-0-g2e91715 (beta)
KSP 1.1.1
Windows 10

Attempting to update Kerbal Engineer Redux from 1.1.0.2 to 1.1.1.0
Select Update and Apply
Status Log shows

The following inconsistencies were found:
E:/Program Files/Steam/steamapps/common/Kerbal Space Program/GameData/KerbalEngineer/images.manifest is registered to KerbalEngineerRedux but has not been removed!
 * E:/Program Files/Steam/steamapps/common/Kerbal Space Program/GameData/KerbalEngineer/KerbalEngineer.dll is registered to KerbalEngineerRedux but has not been removed!
Error!

Attempting a second time worked.

And then upgrading another mod crashed with temp file error

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'C:\Users\Nathan\AppData\Local\Temp\CdFileMgr\78ed3de8-25c8-45.mu' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at ChinhDo.Transactions.SingleFileOperation.InnerDispose()
   at ChinhDo.Transactions.SingleFileOperation.Dispose()
   at ChinhDo.Transactions.TxEnlistment.DisposeJournal()
   at ChinhDo.Transactions.TxEnlistment.Rollback(Enlistment enlistment)

What I've found is, if the second install attempt works, the next install/upgrade will cause the temp file crash.
The other option is after the failed install (with the leftover file error) CKAN will crash with the Temp File error.

@mheguy
Copy link
Contributor

mheguy commented Apr 30, 2016

Duplicate of #1367?

@PiggyWhiskey
Copy link
Author

Kind of?

That issue recommends a work around of keeping upgrades/installs separate.

This issue is when I was only upgrading 4 mods.
And the issue occurs with a single mod upgrade too.
Not a combination

@mheguy
Copy link
Contributor

mheguy commented Apr 30, 2016

My mistake I didn't read this as well as I should have originally. Are you running KSP at the same time as CKAN? 2 instances of CKAN? Anything else that might be tying up files like an anti-virus?

@PiggyWhiskey
Copy link
Author

Nothing else major running.
Steam/Chrome/Windows Explorer/MultiMC (for minecraft)

I've cleaned the temp files too.
CKAN seems to create the folder and the temp file, then try to delete/modify the file while it is still locked.

@PiggyWhiskey
Copy link
Author

PiggyWhiskey commented May 1, 2016

After forking the code and stepping through, it appears ModuleInstaller:Uninstall file_transaction.Delete() randomly doesn't like actually deleting the files. There seems to be no reason for it. Not specific formats/attributes/file size.

I was curious to note the in built FileSystemObject wasn't used.

Edit: After doing some stepping through the code including the Transaction File Manager in VS2013,
I narrowed it down to DeleteFileOperation() in the Transaction File Manager.
However it only occurs when I DONT step through.

Perhaps ASync is too slow?
The same issue is happening with deleting files from the KSP Game Data folder, and the Temp Files.

@Sakata-MC
Copy link

Hey @PiggyWhiskey can you check to see if this is OS dependant? Perhaps this doesnt' happen in Linux/older version of Windows? My linux gaming machine decided to throw a fit and toast its board, so I can't test myself.

I'm wondering since this is reported not-so-often, that it might be OS dependant and since 90% of windows users keep my business running, they probably aren't going to be reporting issues here.

@PiggyWhiskey
Copy link
Author

@Sakata-MC Unfortunately I don't have any other OS's apart from Windows 10. I'm not sure I have the skills/knowledge to install a Linux OS for a Dual Boot

@PiggyWhiskey
Copy link
Author

@plague006 , as the issue with these temp files is the deletion of old mods before upgrading caused by the Transaction Manager, would it be better to change it to just using .NET File management?

That will make the program fully functional and useful and allows you to work on fixing the ASync nature of the Transaction Manager easier.

Also, the Transaction Manager temp file issue is because it's trying to keep a backup of the files to undo, but that would never bee needed because we've already successfully downloaded the new mod.

@mheguy
Copy link
Contributor

mheguy commented May 14, 2016

@PiggyWhiskey you're pinging the wrong person. I'm not a coder, I'm a metadata maintainer. I simply pitch in with issues when and where I can.

@ayan4m1 ayan4m1 added the Support Issues that are support requests label Aug 3, 2016
@netkan-bot
Copy link
Member

Hey there! I'm a fun-loving automated bot who's responsible for making sure old support tickets get closed out. As we haven't seen any activity on this ticket for a while, we're hoping the problem has been resolved and I'm closing out the ticket automaically. If I'm doing this in error, please add a comment to this ticket to let us know, and we'll re-open it!

@pjf pjf removed the Support Issues that are support requests label Aug 11, 2016
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

6 participants