Inochi2D / inochi-session

Application that allows streaming with Inochi2D puppets
https://inochi2d.com
BSD 2-Clause "Simplified" License
301 stars 21 forks source link

[BUG] Virtual Space deletion Crash. #23

Closed DevChimera closed 1 year ago

DevChimera commented 1 year ago

Validations

Describe the bug

When deleting a Virtual Space, it crashes if the IP cannot be resolved.

Reproduction

1 Create Virtual Space 2 name it (main in this case) 3 Select VTubeStudio 4 phoneIP set to 0.0.0.0:8001 5 save changes 6 save (bottom) 7 reopen menu 8 try delete it (will crash)

System Architecture

x86_64

Operating System

Windows

Version

v0.5.4

Logs

Click to expand! [INFO] Inochi Session v0.5.4, args=[] [INFO] Lua support initialized. (Statically linked for now) [INFO] Scanning plugins at C:\Users\mrmgp\AppData\Roaming\.inochi-session\plugins... [INFO] Found zone main [INFO] Found zone testing [INFO] Frame-sending started successfully! std.socket.AddressException@std\socket.d(1534): Unable to resolve host '0.0.0.0:8001': Host desconocido. ---------------- 0x00007FF70D50910D in fprintf 0x00007FF70D508E76 in fprintf 0x00007FF70D4FCCFF in fprintf 0x00007FF70D4E68CA in fprintf 0x00007FF70D4C7668 in fprintf 0x00007FF70D43794E 0x00007FF70D4EE008 in fprintf 0x00007FF8018D9363 in recalloc 0x00007FF802B326BD in BaseThreadInitThunk 0x00007FF8040CDFB8 in RtlUserThreadStart
### Additional Context _No response_
grillo-delmal commented 1 year ago

I went and built a debug version of v0.5.4 was able to reproduce this (on Linux/Wayland). Here is the backtrace output:

[ERR ] Could not start texture sharing, it will be disabled. Is the library missing?
std.socket.AddressException@std/socket.d(1534): Unable to resolve host '0.0.0.0:8001': Success
----------------[Thread 0x7fffab5ff6c0 (LWP 97225) exited]

??:? @safe std.socket.InternetAddress std.socket.InternetAddress.__ctor(scope const(char)[], ushort) [0x7ffff7c43cef]
../facetrack-d/source/ft/adaptors/vtsproto.d:199 [0x4f7081]
??:? thread_entryPoint [0x7ffff798d569]
??:? [0x7ffff776212c]
??:? [0x7ffff77e3bbf]
[Thread 0x7fffc6b816c0 (LWP 97223) exited]
[Thread 0x7fffc77fe6c0 (LWP 97217) exited]
[Thread 0x7fffc7fff6c0 (LWP 97216) exited]
[Thread 0x7fffd4bfe6c0 (LWP 97215) exited]
[Thread 0x7fffd53ff6c0 (LWP 97214) exited]
[Thread 0x7fffe0abc6c0 (LWP 97213) exited]
[Thread 0x7fffe12bd6c0 (LWP 97212) exited]
[Thread 0x7fffe1abe6c0 (LWP 97211) exited]

Thread 1 "inochi-session" received signal SIGSEGV, Segmentation fault.
0x00007ffff799de27 in rt.dwarfeh.actionTableLookup(core.internal.backtrace.unwind._Unwind_Exception*, uint, const(ubyte)*, const(ubyte)*, ubyte, ulong, const(ubyte)*) () from /lib64/libdruntime-ldc-shared.so.100
(gdb) bt
#0  0x00007ffff799de27 in rt.dwarfeh.actionTableLookup(core.internal.backtrace.unwind._Unwind_Exception*, uint, const(ubyte)*, const(ubyte)*, ubyte, ulong, const(ubyte)*) () at /lib64/libdruntime-ldc-shared.so.100
#1  0x00007ffff799d9f8 in rt.dwarfeh.scanLSDA(const(ubyte)*, ulong, ulong, bool, bool, core.internal.backtrace.unwind._Unwind_Exception*, out ulong, out int) ()
    at /lib64/libdruntime-ldc-shared.so.100
#2  0x00007ffff799d304 in _d_eh_personality_common () at /lib64/libdruntime-ldc-shared.so.100
#3  0x00007ffff7eb8177 in _Unwind_RaiseException (exc=0x7ffff76c9990) at ../../../libgcc/unwind.inc:118
#4  0x00007ffff799d188 in _d_throw_exception () at /lib64/libdruntime-ldc-shared.so.100
#5  0x00007ffff798d641 in core.thread.osthread.Thread.join(bool) () at /lib64/libdruntime-ldc-shared.so.100
#6  0x00000000004f71a6 in _D2ft8adaptors8vtsproto10VTSAdaptor4stopMFZv (this=0x7ffff75d3300) at ../facetrack-d/source/ft/adaptors/vtsproto.d:267
#7  0x00000000004f714d in _D2ft8adaptors8vtsproto10VTSAdaptor6__dtorMFZv (this=0x7ffff75d3300) at ../facetrack-d/source/ft/adaptors/vtsproto.d:213
#8  0x00007ffff79a0b07 in rt_finalize2 () at /lib64/libdruntime-ldc-shared.so.100
#9  0x00007ffff797abe0 in core.internal.gc.impl.conservative.gc.Gcx.sweep() () at /lib64/libdruntime-ldc-shared.so.100
#10 0x00007ffff7976ef3 in core.internal.gc.impl.conservative.gc.Gcx.fullcollect(bool, bool, bool) () at /lib64/libdruntime-ldc-shared.so.100
#11 0x00007ffff79772d3 in core.internal.gc.impl.conservative.gc.ConservativeGC.runLocked!(core.internal.gc.impl.conservative.gc.ConservativeGC.fullCollectNoStack().go(core.internal.gc.impl.conservative.gc.Gcx*), core.internal.gc.impl.conservative.gc.Gcx*).runLocked(ref core.internal.gc.impl.conservative.gc.Gcx*) ()
    at /lib64/libdruntime-ldc-shared.so.100
#12 0x00007ffff7980fdd in gc_term () at /lib64/libdruntime-ldc-shared.so.100
#13 0x00007ffff799c6a6 in rt_term () at /lib64/libdruntime-ldc-shared.so.100
#14 0x00007ffff799cbc1 in rt.dmain2._d_run_main2(char[][], ulong, extern(C) int(char[][]) function).runAll() () at /lib64/libdruntime-ldc-shared.so.100
#15 0x00007ffff799c9c6 in _d_run_main2 () at /lib64/libdruntime-ldc-shared.so.100
#16 0x00007ffff799c81e in _d_run_main () at /lib64/libdruntime-ldc-shared.so.100
#17 0x000000000045ce02 in main (argc=1, argv=0x7fffffffd748) at /usr/lib/ldc/x86_64-redhat-linux-gnu/include/d/core/internal/entrypoint.d:42
#18 0x00007ffff76fe510 in __libc_start_call_main (main=main@entry=0x45cde0 <main>, argc=argc@entry=1, argv=argv@entry=0x7fffffffd748)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#19 0x00007ffff76fe5c9 in __libc_start_main_impl
    (main=0x45cde0 <main>, argc=1, argv=0x7fffffffd748, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd738)
    at ../csu/libc-start.c:381
#20 0x000000000043b0f5 in _start ()

It only can be reproduced with the VTubeStudio adaptor. Other adaptors work fine.

It can also get reproduced when using the latest version of facetrack-d and on the latest nightly version of inochi-session.

LunaTheFoxgirl commented 1 year ago

This may have been fixed by https://github.com/Inochi2D/inochi-session/commit/aaaa22166e18cee5fc1355ef1b1a3c2de337f857 as I can't reproduce it now, closing for now.

LunaTheFoxgirl commented 1 year ago

I was made aware that the bug may be platform specific, this commit should fix it https://github.com/Inochi2D/facetrack-d/commit/2a0632859ebbf1bc1328435b1542bfa3411ae652