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

SA2EventViewer: Crashing event files #83

Open
MainMemory opened this issue Feb 4, 2020 · 3 comments
Open

SA2EventViewer: Crashing event files #83

MainMemory opened this issue Feb 4, 2020 · 3 comments

Comments

@MainMemory
Copy link
Contributor

MainMemory commented Feb 4, 2020

I tried opening e0003 in SA2EventViewer after adding the GCModel field, and it crashed.

System.ArgumentException: position data
   at SonicRetro.SAModel.GC.VertexData.SetAttributeData(GXVertexAttribute attribute, Object data) in E:\Programs\sa_tools\SAModel\GC\VertexData.cs:line 101
   at SonicRetro.SAModel.GC.VertexData.Load(Byte[] file, UInt32 address, UInt32 imageBase) in E:\Programs\sa_tools\SAModel\GC\VertexData.cs:line 188
   at SonicRetro.SAModel.GC.GCAttach..ctor(Byte[] file, Int32 address, UInt32 imageBase, Dictionary`2 labels) in E:\Programs\sa_tools\SAModel\GC\GCAttach.cs:line 43
   at SonicRetro.SAModel.Attach.Load(Byte[] file, Int32 address, UInt32 imageBase, ModelFormat format, Dictionary`2 labels) in E:\Programs\sa_tools\SAModel\Attach.cs:line 68
   at SonicRetro.SAModel.NJS_OBJECT..ctor(Byte[] file, Int32 address, UInt32 imageBase, ModelFormat format, NJS_OBJECT parent, Dictionary`2 labels, Dictionary`2 attaches) in E:\Programs\sa_tools\SAModel\NJS_OBJECT.cs:line 113
   at SA2EventViewer.Event.GetGCModel(Byte[] file, Int32 address, UInt32 imageBase, Dictionary`2 models) in E:\Programs\sa_tools\SA2EventViewer\EventData.cs:line 104
   at SA2EventViewer.EventEntity..ctor(Byte[] file, Int32 address, UInt32 imageBase, Boolean battle, Dictionary`2 models, List`1 motions) in E:\Programs\sa_tools\SA2EventViewer\EventData.cs:line 176
   at SA2EventViewer.EventScene..ctor(Byte[] file, Int32 address, UInt32 imageBase, Boolean battle, Dictionary`2 models, List`1 motions) in E:\Programs\sa_tools\SA2EventViewer\EventData.cs:line 131
   at SA2EventViewer.Event..ctor(String filename) in E:\Programs\sa_tools\SA2EventViewer\EventData.cs:line 57
   at SA2EventViewer.MainForm.LoadFile(String filename) in E:\Programs\sa_tools\SA2EventViewer\MainForm.cs:line 139
   at SA2EventViewer.MainForm.openToolStripMenuItem_Click(Object sender, EventArgs e) in E:\Programs\sa_tools\SA2EventViewer\MainForm.cs:line 129
@PiKeyAr
Copy link
Member

PiKeyAr commented Feb 13, 2021

Looks like E0003 from SA2PC plays fine in the current version
image

@PiKeyAr PiKeyAr changed the title Can't Read GC Models From Events SA2EventViewer: Crashing event files Feb 13, 2021
@PiKeyAr
Copy link
Member

PiKeyAr commented Feb 13, 2021

E_0024 does crash though in some chunk model related code.
System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' ChunkAttach.cs line 307.

@End-User-Person
Copy link
Collaborator

End-User-Person commented Feb 14, 2021

That happens because one of the shape motions is wrong in the first scene of that file, which throws an exception unless you skip to the next scene.

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

3 participants