DeadZoneLuna / uSource

uSource is a plugin for importing MDL / BSP / VMT / VTF and etc... resources to Unity!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ObjectDisposedException on map loading

gizmo87898 opened this issue · comments

commented

I seem to encounter a bug that prevents me from loading Portal 2 maps, whenever the Load BSP button is pressed it throws a ObjectDisposedException. On portal 1 maps if i keep hitting the button it will eventually do it completely but this does not work for portal 2 bsps. heres the stacktrace:
ObjectDisposedException: Cannot access a disposed object. Object name: 'Stream has been closed'. System.IO.FileStream.Seek (System.Int64 offset, System.IO.SeekOrigin origin) (at <695d1cc93cca45069c528c15c9fdd749>:0) uSource.Formats.Source.VBSP.VBSPFile.LoadStaticProps () (at Assets/Plugins/uSource/Formats/Source/VBSP/VBSPFile.cs:924) uSource.Formats.Source.VBSP.VBSPFile.Load (System.IO.Stream stream, System.String BSPName) (at Assets/Plugins/uSource/Formats/Source/VBSP/VBSPFile.cs:142) uSource.uResourceManager.LoadMap (System.String MapName) (at Assets/Plugins/uSource/uResourceManager.cs:287) uSource.uLoaderEditor.DrawGUI () (at Assets/Plugins/uSource/uLoader.cs:89) uSource.uLoaderWindow.OnGUI () (at Assets/Plugins/uSource/uLoader.cs:43)
I removed all the useless stuff from it to shorten it. At the time of the error the UnloadAll method had not been called so im confused as to whats causing it. Thanks :)

commented

This stacktrace also varies depending on what map im importing, but it is always on a line that calls .Seek()