Post by LittleRedSonja on Apr 9, 2023 8:10:14 GMT -5
Hi!
I am having a big problem right now when trying to import files from a package into another package. This is the first time i develop a mod with multiple packages to make it more manageable during developement, so it is my first time facing this issues even when i have used sims 4 studio for a while now. The thing is that i do not want to release the mod containing multiple packages, but instead i would like to put everything together in one single package so it would be easier to install for players and less prone to cause installation problems. I thought about "merging" but i am not sure if everything in the mod would work as intended (for example snippets for xmlinjector) and i think it would be annoying for translators (since there would be multiple strings for every language instead of only one string). So i have been trying with "batch exporting" all the files in each package, and simply "batch importing" all inside one single package. But i get constant errors. At least the majority of the files seem to be imported, but since there is so many it very difficult to say, and the errors i get worries me and makes me think that not everything is getting imported. Every single package works as intended, i get no errors, i can edit normally in s4s, and the mod works fine without bugs in game, so i do not think there is a problem with the tuning?. Also all the objects included in the packages work fine in game.
This is one of the errors i have seen, only when trying to import a few files (when i try with more files i get more similar errors):
The Sims 4 Studio - Version 3.2.0.4
System.AggregateException: One or more errors occurred. (Collection was modified; enumeration operation may not execute.)
---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at S4Studio.Data.IO.Package.DBPFPackage.WriteDataStream(Stream src_stream, FileStream final_stream)
at S4Studio.Data.IO.Package.DBPFPackage.SaveTempPackage(String out_file, String tmp, Stream pkg_stream)
at S4Studio.Data.IO.Package.DBPFPackage.Save(String out_file, Boolean inline, String temp_path)
at S4Studio.ViewModels.Warehouse.WarehousePackageViewModel.BatchImport(IEnumerable`1 filepaths)
at S4Studio.ViewModels.Warehouse.WarehousePackageViewModel.<>c__DisplayClass52_0.<ExecuteImportResourceBatchCommand>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
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 inner exception stack trace ---
Any idea or suggestion about what could be causing this or how could i avoid it would be much appreciated
I am having a big problem right now when trying to import files from a package into another package. This is the first time i develop a mod with multiple packages to make it more manageable during developement, so it is my first time facing this issues even when i have used sims 4 studio for a while now. The thing is that i do not want to release the mod containing multiple packages, but instead i would like to put everything together in one single package so it would be easier to install for players and less prone to cause installation problems. I thought about "merging" but i am not sure if everything in the mod would work as intended (for example snippets for xmlinjector) and i think it would be annoying for translators (since there would be multiple strings for every language instead of only one string). So i have been trying with "batch exporting" all the files in each package, and simply "batch importing" all inside one single package. But i get constant errors. At least the majority of the files seem to be imported, but since there is so many it very difficult to say, and the errors i get worries me and makes me think that not everything is getting imported. Every single package works as intended, i get no errors, i can edit normally in s4s, and the mod works fine without bugs in game, so i do not think there is a problem with the tuning?. Also all the objects included in the packages work fine in game.
This is one of the errors i have seen, only when trying to import a few files (when i try with more files i get more similar errors):
The Sims 4 Studio - Version 3.2.0.4
System.AggregateException: One or more errors occurred. (Collection was modified; enumeration operation may not execute.)
---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at S4Studio.Data.IO.Package.DBPFPackage.WriteDataStream(Stream src_stream, FileStream final_stream)
at S4Studio.Data.IO.Package.DBPFPackage.SaveTempPackage(String out_file, String tmp, Stream pkg_stream)
at S4Studio.Data.IO.Package.DBPFPackage.Save(String out_file, Boolean inline, String temp_path)
at S4Studio.ViewModels.Warehouse.WarehousePackageViewModel.BatchImport(IEnumerable`1 filepaths)
at S4Studio.ViewModels.Warehouse.WarehousePackageViewModel.<>c__DisplayClass52_0.<ExecuteImportResourceBatchCommand>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
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 inner exception stack trace ---
Any idea or suggestion about what could be causing this or how could i avoid it would be much appreciated