-
Notifications
You must be signed in to change notification settings - Fork 43
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
Segmentation fault when trying to start game #122
Comments
I have no problems running it on Fedora 26 with latest commit. I accidentally deleted my Ubuntu development VM, so when I'll set it up, I'll try it on Ubuntu. But I cannot see where the problem is. |
I'm also experiencing a segfault now (commit 8485fa8) on macos:
|
Try it with 75b0af3 please, but I am not sure it will solve it, since the segfault on your end is bound to loading some WAV. If this does not help, please add a debug log to the beginning of Engine/Resource/Loaders/WavResourceLoader::VGetLoadedResourceSize method to print the name of the resource for which it is failing, e.g.: [Line 46]: LOG("Trying to load: " + handle->GetName()); and run it again and post the log here. Thanks. |
Works / worked for me also on clean debian distro btw. |
Ok, i've found something, segfault appeared with sdl2 package upgrade from 2.0.5-4 to 2.0.6-1. Still works fine when i downgrade the package version.
Full log with log on line 46, as there is no handle variable in VGetLoadedResourceSize method. menubed.wav doesn't seem to be loaded.
|
Thanks for the update. I will try to reproduce it with that SDL2 version. |
SDL2 guys must have broken something since I am not the only one with this problem: |
Yeah I'm also using SDL 2.0.6 so this seems to be it. |
Hello! Please see this bug I filed with SDL: |
@fragglet , great ! Let's hope they will issue some hotfix. By the way, it works fine for me on Windows but it crashes on all linux distros. Also on Windows when using the 2.0.6 version, the memory footprint of the game is almost 5 times greater than with 2.0.5 (with 2.0.5 it uses around 80-90 MBs of memory, with 2.0.6 it uses around 400 MBs) - this may be caused by wrong mixing specs described below after Mixer initialization, as all WAVs blow up in size 8 times. Another thing is that when using 2.0.6 and doing:
it disregards the options and instead the actual values after doing Mix_QuerySpec are: Frequency - 48000 This does not problem with 2.0.5 version. |
When I update SDL version on windows, the game's memory footprint goes from 80MB to 400-500MB for some reason. Not sure if this is same for linux as I dont have native linux machine, only one emulated in vmware (which does not store textures in GPU but rather in memory) |
Hm, interesting, it looks like it utilizes memory far more than GPU on Linux.
after 10th level was loaded (with SDL 2.0.4):
I went to see also memory footprint when level was loaded and right before level was finished:
Since playing the game until end of the level would take some time, i started to record RAM usage only after level was loaded:
If someone wants to test this also, this is what i used to get memory footprint: |
Yeah I have some major memory leaks scattered throughout the codebase... Mainly it's from bad approach to sprite/sound caching I think. At some points I fixed some leaks, but rather high memory usage was never an issue so I didn't really focus on it specifically. |
The text was updated successfully, but these errors were encountered: