0x0ade / FEZMod-Legacy

Kinda dead FEZ mod. Check the linked issue comment for further info.
https://github.com/0x0ade/FEZMod-Legacy/issues/5#issuecomment-341082111
MIT License
22 stars 2 forks source link

FmbLib integration keeps crashing #28

Open 0x0ade opened 8 years ago

0x0ade commented 8 years ago

STDOUT when saving FOX (FmbLib doesn't support non-STDOUT (Console) output yet):

(21:32:46.518) [FEZMod.Editor] Saving level FOX
(21:32:46.554) [FEZMod] Saving level to binary file: FOX
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Level; TH: FmbLib.TypeHandlers.Fez.LevelHandler
debug: Level: Name: FOX
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: String; TH: FmbLib.TypeHandlers.Xna.StringHandler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Vector3; TH: FmbLib.TypeHandlers.Xna.Vector3Handler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: TrileFace; TH: FmbLib.TypeHandlers.Fez.TrileFaceHandler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: TrileEmplacement; TH: FmbLib.TypeHandlers.Fez.TrileEmplacementHandler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: FaceOrientation; TH: FmbLib.TypeHandlers.Xna.EnumHandler`1[FezEngine.FaceOrientation]
debug: Level: SequenceSamplesPath: 
debug: Level: GomezHaloName: 
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: LiquidType; TH: FmbLib.TypeHandlers.Xna.EnumHandler`1[FezEngine.Structure.LiquidType]
debug: Level: TrileSetName: Untitled
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: String; TH: FmbLib.TypeHandlers.Xna.StringHandler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Dictionary`2; TH: FmbLib.TypeHandlers.Xna.DictionaryHandler`2[System.Int32,FezEngine.Structure.Volume]
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Int32; TH: FmbLib.TypeHandlers.Xna.Int32Handler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Volume; TH: FmbLib.TypeHandlers.Fez.VolumeHandler
TODO: VOLUME WRITER
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Vector3; TH: FmbLib.TypeHandlers.Xna.Vector3Handler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Vector3; TH: FmbLib.TypeHandlers.Xna.Vector3Handler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Dictionary`2; TH: FmbLib.TypeHandlers.Xna.DictionaryHandler`2[System.Int32,FezEngine.Structure.Scripting.Script]
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Int32; TH: FmbLib.TypeHandlers.Xna.Int32Handler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: Script; TH: FmbLib.TypeHandlers.Fez.ScriptHandler
debug WriteObject<T>(System.IO.BinaryWriter,T) | T: List`1; TH: FmbLib.TypeHandlers.Xna.ListHandler`1[FezEngine.Structure.Scripting.ScriptTrigger]
* Assertion at method-to-ir.c:3440, condition `method->is_inflated && mono_method_get_context (method)->method_inst' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at FmbLib.FmbUtil.WriteObject<T> (System.IO.BinaryWriter,T) <IL 0x0007e, 0x00164>
  at FmbLib.TypeHandlers.Fez.ScriptHandler.Write (System.IO.BinaryWriter,object) <IL 0x00026, 0x00097>
  at FmbLib.FmbUtil.WriteObject<T> (System.IO.BinaryWriter,T) <IL 0x0007e, 0x00164>
  at FmbLib.TypeHandlers.Xna.DictionaryHandler`2<int, FezEngine.Structure.Scripting.Script>.Write (System.IO.BinaryWriter,object) <IL 0x00062, 0x0015b>
  at FmbLib.FmbUtil.WriteObject<T> (System.IO.BinaryWriter,T) <IL 0x0007e, 0x00164>
  at FmbLib.TypeHandlers.Fez.LevelHandler.Write (System.IO.BinaryWriter,object) <IL 0x0012e, 0x0033f>
  at FmbLib.FmbUtil.WriteObject<T> (System.IO.BinaryWriter,T) <IL 0x0007e, 0x00164>
  at FmbLib.FmbUtil.WriteObject<T> (string,T) <IL 0x00021, 0x000d3>
  at FezGame.Services.GameLevelManager.Save (string,bool) <IL 0x000a3, 0x001b3>
  at FezGame.Services.GameLevelManagerHelper.Save (string,bool) <IL 0x0000c, 0x00053>
  at FezGame.Components.LevelEditor/<Save>c__AnonStorey17.<>m__0 () <IL 0x00173, 0x0048b>
  at FezGame.Components.LevelEditor.Save (bool,bool) <IL 0x000b7, 0x0037c>
  at FezGame.Components.LevelEditor/<Initialize>c__AnonStorey1.<>m__6 () <IL 0x00008, 0x0001f>
  at FezGame.Components.LevelEditor.Update (Microsoft.Xna.Framework.GameTime) <IL 0x00011, 0x00298>
  at Microsoft.Xna.Framework.Game.<UpdateAction>m__D (Microsoft.Xna.Framework.IUpdateable,Microsoft.Xna.Framework.GameTime) [0x00002] in /home/maik/fnadroid/FNA/src/Game.cs:737
  at Microsoft.Xna.Framework.Game/SortingFilteringCollection`1.ForEachFilteredItem<TUserData> (System.Action`2<T, TUserData>,TUserData) [0x00093] in /home/maik/fnadroid/FNA/src/Game.cs:1021
  at Microsoft.Xna.Framework.Game.Update (Microsoft.Xna.Framework.GameTime) [0x0000d] in /home/maik/fnadroid/FNA/src/Game.cs:741
  at FezGame.Fez.orig_Update (Microsoft.Xna.Framework.GameTime) <IL 0x00039, 0x00137>
  at FezGame.Fez.Update (Microsoft.Xna.Framework.GameTime) <IL 0x00016, 0x00044>
  at Microsoft.Xna.Framework.Game.DoUpdate (Microsoft.Xna.Framework.GameTime) [0x00020] in /home/maik/fnadroid/FNA/src/Game.cs:818
  at Microsoft.Xna.Framework.Game.Tick () [0x00216] in /home/maik/fnadroid/FNA/src/Game.cs:557
  at Microsoft.Xna.Framework.SDL2_GamePlatform.RunLoop () [0x005d9] in /home/maik/fnadroid/FNA/src/SDL2/SDL2_GamePlatform.cs:522
  at Microsoft.Xna.Framework.Game.Run () [0x0005f] in /home/maik/fnadroid/FNA/src/Game.cs:447
  at FezGame.Program.orig_MainInternal () <IL 0x0002f, 0x00093>
  at FezGame.Program.MainInternal () <IL 0x00001, 0x0001f>
  at Common.Logger.Try (System.Action) <IL 0x00001, 0x0001d>
  at FezGame.Program.orig_Main (string[]) <IL 0x00268, 0x00663>
  at FezGame.Program.Main (string[]) <IL 0x0008d, 0x0024b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00060, 0xffffffff>

Native stacktrace:

    mono() [0x4b23dc]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x10d10) [0x7f53dbd7dd10]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7f53db9d8267]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f53db9d9eca]
    mono() [0x629869]
    mono() [0x629a77]
    mono() [0x629bc6]
    mono() [0x436926]
    mono() [0x439114]
    mono() [0x4641fd]
    mono() [0x42b0df]
    mono() [0x42c89f]
    mono() [0x42d29b]
    mono() [0x4b4991]
    [0x40703046]

Debug info from gdb:

[New LWP 5119]
[New LWP 5115]
[New LWP 5026]
[New LWP 5025]
[New LWP 5022]
[New LWP 5021]
[New LWP 5019]
[New LWP 5000]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f53dbd7d8ab in __waitpid (pid=5177, stat_loc=0x7ffe55b0a3cc, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
40  ../sysdeps/unix/sysv/linux/waitpid.c: Datei oder Verzeichnis nicht gefunden.
  Id   Target Id         Frame 
  9    Thread 0x7f53d8f7b700 (LWP 5000) "Finalizer" 0x00007f53dbd7c0c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0, futex=0x944e60) at sem_waitcommon.c:42
  8    Thread 0x7f53cba3a700 (LWP 5019) "mono" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  7    Thread 0x7f53c7dc2700 (LWP 5021) "threaded-ml" 0x00007f53dba9e8dd in poll () at ../sysdeps/unix/syscall-template.S:81
  6    Thread 0x7f53c35c0700 (LWP 5022) "alsoft-mixer" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:143
  5    Thread 0x7f53c2a94700 (LWP 5025) "mono" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  4    Thread 0x7f53c0bff700 (LWP 5026) "mono" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7f53c05c7700 (LWP 5115) "mono" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  2    Thread 0x7f53b38fe700 (LWP 5119) "mono" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
* 1    Thread 0x7f53dc88c780 (LWP 4999) "mono" 0x00007f53dbd7d8ab in __waitpid (pid=5177, stat_loc=0x7ffe55b0a3cc, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40

Thread 9 (Thread 0x7f53d8f7b700 (LWP 5000)):
#0  0x00007f53dbd7c0c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0, futex=0x944e60) at sem_waitcommon.c:42
#1  do_futex_wait (sem=sem@entry=0x944e60, abstime=0x0) at sem_waitcommon.c:208
#2  0x00007f53dbd7c164 in __new_sem_wait_slow (sem=0x944e60, abstime=0x0) at sem_waitcommon.c:277
#3  0x00007f53dbd7c20a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:28
#4  0x000000000061ec08 in mono_sem_wait ()
#5  0x00000000005a21ae in ?? ()
#6  0x00000000005874e8 in ?? ()
#7  0x0000000000623a36 in ?? ()
#8  0x00007f53dbd746aa in start_thread (arg=0x7f53d8f7b700) at pthread_create.c:333
#9  0x00007f53dbaa9eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 8 (Thread 0x7f53cba3a700 (LWP 5019)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f53cf83e8e3 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#2  0x00007f53cf83def8 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#3  0x00007f53dbd746aa in start_thread (arg=0x7f53cba3a700) at pthread_create.c:333
#4  0x00007f53dbaa9eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7f53c7dc2700 (LWP 5021)):
#0  0x00007f53dba9e8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f53c9bd9601 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#2  0x00007f53c9bcab41 in pa_mainloop_poll () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#3  0x00007f53c9bcb1de in pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#4  0x00007f53c9bcb290 in pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#5  0x00007f53c9bd9596 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#6  0x00007f53c97716c8 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-6.0.so
#7  0x00007f53dbd746aa in start_thread (arg=0x7f53c7dc2700) at pthread_create.c:333
#8  0x00007f53dbaa9eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7f53c35c0700 (LWP 5022)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:143
#1  0x00007f53c9bd9be8 in pa_threaded_mainloop_wait () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
#2  0x00007f53c9e3eee1 in ALCpulsePlayback_mixerProc (ptr=ptr@entry=0x175d5a0) at /home/flibitijibibo/Programming/cppLibraries/openal-soft/Alc/backends/pulseaudio.c:810
#3  0x00007f53c9e4215f in althrd_starter (arg=<optimized out>) at /home/flibitijibibo/Programming/cppLibraries/openal-soft/common/threads.c:526
#4  0x00007f53dbd746aa in start_thread (arg=0x7f53c35c0700) at pthread_create.c:333
#5  0x00007f53dbaa9eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f53c2a94700 (LWP 5025)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00000000005fde6b in ?? ()
#2  0x0000000000610cab in ?? ()
#3  0x00000000005a4f5a in ?? ()
#4  0x0000000040d1a818 in ?? ()
#5  0x000000000000000a in ?? ()
#6  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f53c0bff700 (LWP 5026)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00000000005fde6b in ?? ()
#2  0x0000000000610cab in ?? ()
#3  0x00000000005a4f5a in ?? ()
#4  0x0000000040d1a818 in ?? ()
#5  0x000000000000000a in ?? ()
#6  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f53c05c7700 (LWP 5115)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00000000005fde6b in ?? ()
#2  0x0000000000610cab in ?? ()
#3  0x0000000000585f9e in ?? ()
#4  0x0000000000586f19 in ?? ()
#5  0x0000000040f6883d in ?? ()
#6  0x00007f53b8001060 in ?? ()
#7  0x00007f53c05c6e40 in ?? ()
#8  0x00007f53da88e710 in ?? ()
#9  0x00007f53da88e710 in ?? ()
#10 0x00007f53da915d60 in ?? ()
#11 0x00007f53a8000bd0 in ?? ()
#12 0x0000000000000002 in ?? ()
#13 0x00007f53c05c6a10 in ?? ()
#14 0x00007f53c05c6990 in ?? ()
/build/buildd/gdb-7.9/gdb/dwarf2-frame.c:683: internal-error: Unknown CFI encountered.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

/build/buildd/gdb-7.9/gdb/dwarf2-frame.c:683: internal-error: Unknown CFI encountered.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Abgebrochen
0x0ade commented 8 years ago

Loading levels doesn't crash anymore with a copy of ARCH modified via FZ2. Still requires more testing.