Pages: 1
  Print  
Author Topic: Adding Sound causes "Game returned -1073741819"  (Read 212 times)
Offline (Unknown gender) Kahmore
Posted on: October 16, 2020, 04:15:44 PM
Member
Joined: Oct 2020
Posts: 3

View Profile
Installed ENIGMA (and LateralGM) on my 64 bit Windows 10 yesterday after a haitus. After a few small miracles, I did actually get it to work (installation is not exactly intuitive, is it? XD).
Am quite enjoying using it, but I wasn't able to get sounds to work, so I was hoping for some help on that.

What I do:
Launch mingw64, cd to enigma-dev, and java -jar lateralgm.jar. Everything starts up great.
Create a Room resource. Notice some weird exceptions in the console, but otherwise it seems to be working
Run (empty game with 1 room - the test case). Game starts up fine. I then exit the game.
Create a Sound resource (but don't populate it).
Run. Game starts up fine. I exit the game.
Load a simple wav file (just something I found on the internet of someone saying "one") into said sound resource.
Run. Compilation seems to go fine. Game attempts to start but instantly closes in a flash. Console tells me:

Code: [Select]
Running "C:/msys64/tmp/egm5657834002195878703.exe"


Game returned -1073741819

I've left it to the default settings, so I believe it's trying to use DirectSound. Not sure if there's anything fancy I have to do to get that working?
I also tried switching it over to OpenAL, but it complained about missing libraries which I wasn't able to figure out how to install (I saw the announcement post saying to run "pacboy -S libmodplug:x" but "pacboy" does not exit... so I tried using pacman instead but it doesn't find any libraries like that). Doesn't matter to me which one I use, just as long as it works XD.

-K
Logged
Offline (Male) time-killer-games
Reply #1 Posted on: October 16, 2020, 07:47:17 PM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1167

View Profile Email
You can get the dll you need here:

https://enigma-dev.org/forums/index.php?topic=3006.0

But it should already exist in your MinGW installation and the one I uploaded is probably outdated at this point.

I can't speak for DirectSound without more information. I never had issues with it using wav.

run in debug mode and use gdb like mentioned on the wiki. Wait until it crashes and give us a pastebin of the backtrace.
Logged
Offline (Unknown gender) Kahmore
Reply #2 Posted on: October 16, 2020, 08:41:24 PM
Member
Joined: Oct 2020
Posts: 3

View Profile
For reference, I installed using the directions on https://enigma-dev.org/docs/Wiki/Install:Windows
I've tried with both the dll provided in that topic you linked and the openal dll found in my mingw installation (obviously not at the same time!), copied them into msys64/tmp which is where enigma has been creating the exes. No luck either way:
Code: [Select]
...
[g++] Universal_System/Resources/spriteinit.cpp
echo // GENERATED RESOURCE FILE FRONTEND > C:/Users/K/AppData/Local/ENIGMA/.eobjs/Windows/Windows/Mingw_GCC_G++/Debug/resources.rc
for res in Preprocessor_Environment_Editable/Resources.rc Widget_Systems/Win32/resources.rc; do echo "#include \"$res\"" >> C:/Users/K/AppData/Local/ENIGMA/.eobjs/Windows/Windows/Mingw_GCC_G++/Debug/resources.rc; done
Linking C:/msys64/tmp/egm8290042648037077027.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmodplug
w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmodplug
w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmodplug
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:172: compile_game] Error 1
make[1]: Leaving directory '/c/ENIGMA/enigma-dev/ENIGMAsystem/SHELL'
collect2.exe: error: ld returned 1 exit status
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:172: compile_game] Error 1
make[1]: Leaving directory '/c/ENIGMA/enigma-dev/ENIGMAsystem/SHELL'
make[1]: *** [Makefile:172: compile_game] Error 1
make: *** [Makefile:25: Game] Error 2
make: Leaving directory '/c/ENIGMA/enigma-dev'
make[1]: Leaving directory '/c/ENIGMA/enigma-dev/ENIGMAsystem/SHELL'
make: *** [Makefile:25: Game] Error 2
make: Leaving directory '/c/ENIGMA/enigma-dev'
make: *** [Makefile:25: Game] Error 2
make: Leaving directory '/c/ENIGMA/enigma-dev'

As far as the gdb route goes, as per https://enigma-dev.org/docs/Wiki/Debugging it suggests that enigma comes with its own MinGW (I don't see it in the enigma-dev directory - I had to install msys64 myself) and suggests using git-bash.bat (also not seeing it?) and I can't seem to find gdb in my MinGW (although I do see gcc)?

Forgive me if I need a little hand-holding, I'm still a bit of a rookie when it comes to programming XD
« Last Edit: October 16, 2020, 08:42:57 PM by Kahmore » Logged
Offline (Unknown gender) Kahmore
Reply #3 Posted on: October 18, 2020, 12:39:20 PM
Member
Joined: Oct 2020
Posts: 3

View Profile
I was able to pacman -Sy gdb, seeing as it apparently does *not* come preinstalled as otherwise suggested. Here is the output when I follow the steps in the debugging wiki section around gdb:

Code: [Select]
Starting program: /c/msys64/tmp/egm913556157439571773.exe
[New Thread 1372.0xad4]
[New Thread 1372.0x98c]
[New Thread 1372.0xdd0]
[New Thread 1372.0x293c]
[New Thread 1372.0x14d4]
[New Thread 1372.0x1248]
[New Thread 1372.0x2a6c]
[Thread 1372.0x1248 exited with code 0]
[Thread 1372.0x2a6c exited with code 0]
[New Thread 1372.0x1640]
[Thread 1372.0x14d4 exited with code 0]
[New Thread 1372.0x2b38]
[New Thread 1372.0x1900]
[New Thread 1372.0x2650]
[New Thread 1372.0x216c]
warning: onecore\com\combase\objact\objact.cxx(827)\combase.dll!00007FFE7F760BC9: (caller: 00007FFE7F75F99A) ReturnHr(1) tid(1084) 800401F0 CoInitialize has not been called.
[New Thread 1372.0x404]
[New Thread 1372.0x9e8]

Thread 1 received signal SIGSEGV, Segmentation fault.
enigma::sound_add_from_buffer (id=0, buffer=0x4763fd0, bufsize=7352)
    at Audio_Systems/DirectSound/DSsystem.cpp:189
189                                 0))                    // Flag.
(gdb) bt
#0  enigma::sound_add_from_buffer (id=0, buffer=0x4763fd0, bufsize=7352) at Audio_Systems/DirectSound/DSsystem.cpp:189
#1  0x0000000000488b03 in enigma::exe_loadsounds (exe=0x7ffe7f6cfa90 <msvcrt!_iob+144>)
    at Universal_System/Resources/soundinit.cpp:66
#2  0x0000000000485ef4 in enigma::initialize_everything () at Universal_System/Resources/loading.cpp:107
#3  0x00000000004087ab in enigma::enigma_main (argc=1, argv=0x28a6080) at Platforms/General/PFmain.cpp:85
#4  0x000000000040ee67 in WinMain (hInstance=0x400000, hPrevInstance=0x0, lpCmdLine=0x28b4348 "", iCmdShow=10)
    at Platforms/Win32/WINDOWSmain.cpp:460
#5  0x00000000006860b2 in main (flags=<optimized out>, cmdline=<optimized out>, inst=<optimized out>)
    at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18
#6  0x00000000004013c1 in __tmainCRTStartup () at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:333
#7  0x00000000004014f6 in mainCRTStartup () at C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:212
(gdb) _
Logged
Pages: 1
  Print