headswe / Swifty-Issue-Tracker

Swifty Issue Tracker
21 stars 4 forks source link

Error when creating repository - mikero obsfucation #172

Closed m1kesk closed 7 years ago

m1kesk commented 7 years ago

When creating a repo with swifty-cli.exe, this error occurs:

Processing @fow - 1/1

Neosetrená vyjimka: System.AggregateException: Doslo k jedné nebo více chybám. -
--> System.ArgumentException: Polozka s tímto klícem jiz byla pridána.
   v System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   v System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Bool
ean add)
   v System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   v SwiftAddon.FileData.ProcessPbo(FileStream stream)
   v SwiftAddon.FileData..ctor(FileInfo info, DirectoryInfo source, String addon
Name)
   v SwiftAddon.Addon.<>c__DisplayClass5_0.<.ctor>b__0(FileInfo fileInfo)
   v System.Threading.Tasks.Parallel.<>c__DisplayClass30_0`2.<ForEachWorker>b__0
(Int32 i)
   v System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   v System.Threading.Tasks.Task.InnerInvoke()
   v System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   v System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>
b__0(Object )
   --- Konec trasování zásobníku pro vnitrní vyjimku ---
   v System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledE
xceptions)
   v System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationTok
en cancellationToken)
   v System.Threading.Tasks.Task.Wait()
   v System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int3
2 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWith
State, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   v System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](TSource[] arr
ay, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Acti
on`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEveryth
ing, Func`1 localInit, Action`1 localFinally)
   v System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1
 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState,
 Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEv
erything, Func`1 localInit, Action`1 localFinally)
   v System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Acti
on`1 body)
   v SwiftAddon.Addon..ctor(String path)
   v swifty_cli.Defines.ProcessAddons(List`1 addonfolders, String output)
   v swifty_cli.Create.Do(List`1 args)
   v swifty_cli.Program.Main(String[] args)
Sniperhid commented 7 years ago

I believe this is occurring because the repo generator is getting caught up on certain pbos. This is likely one of the pbos in the mod @fow - Is the Faces of War mod ( https://forums.bistudio.com/topic/198194-faces-of-war-ww2/ ) ?

m1kesk commented 7 years ago

@Sniperhid Yes, it is @fow - Faces of War mod. I separated all mods one by one and error is occuring on this one. Maybe there are more mods like this.

m1kesk commented 7 years ago

Still issue also in 2.1.5.2

m1kesk commented 7 years ago

Still issue in 2.1.5.5

Processing @FOW - 1/1

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at SwiftAddon.FileData.ProcessPbo(FileStream stream)
   at SwiftAddon.FileData..ctor(FileInfo info, DirectoryInfo source, String addonName)
   at SwiftAddon.Addon.<>c__DisplayClass5_0.<.ctor>b__0(FileInfo fileInfo)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass30_0`2.<ForEachWorker>b__0(Int32 i)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](TSource[] array, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
   at SwiftAddon.Addon..ctor(String path)
   at swifty_cli.Defines.ProcessAddons(List`1 addonfolders, String output)
   at swifty_cli.Create.Do(List`1 args)
   at swifty_cli.Program.Main(String[] args)
m1kesk commented 7 years ago

Video of error occuring. I used CMD run as administrator.

https://www.youtube.com/watch?v=GTN_WzdObSY

headswe commented 7 years ago

I intend to investigate this in the weekend.

m1kesk commented 7 years ago

Any findings ?

headswe commented 7 years ago

I just ran trough FOW and managed to crunch it fine using swifty cmd create.

m1kesk commented 7 years ago

Just tested on clean installation of windows with 2.1.5.6

fow_error

Download mod from: https://forums.bistudio.com/topic/198194-faces-of-war-ww2 mega / google drive link

headswe commented 7 years ago

Having toyed with this a bit more, i managed to solve one of the errors due to their usage of files with same name but capitalized different, but sadly they somehow managed to cram two identical named files into a pbo and this causes the error.

For now i suggest turning to the source of the issue and il try to work around this issue by disabling pbo delta patching on it.

m1kesk commented 7 years ago

New addon have same problem. Processing addon @csa38 is resulting with same issue. Here is link to mod: http://www.moddb.com/mods/csa38-czechoslovak-army-1938

headswe commented 7 years ago

They also use mikero obsfucation

m1kesk commented 7 years ago

Resolved with new config in version 2.1.5.7

"disablepbodeltapatching=@fow,@csa_38"