Angband 4.2.4
Collapse
X
-
Ok by sheer luck I managed to reproduce the "cannot save" bug mentioned earlier.
Here's the strace output of trying to save with ^S:
The "EMFILE (Too many open files)" error indicates the process reached the limit of allowed opened files on my system, which is 1024:Code:root@e5550:/home/eko# strace -f -t -e trace=file -p 12560 strace: Process 12560 attached with 2 threads [pid 12560] 22:32:58 openat(AT_FDCWD, "/home/eko//.angband/Angband/CharOutput.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EMFILE (Too many open files) [pid 12560] 22:32:58 newfstatat(AT_FDCWD, "/home/eko/Games/angband/angband-4.2.4/lib/save/Eko641517.old", 0x7ffd9c794b20, 0) = -1 ENOENT (No such file or directory) [pid 12560] 22:32:58 newfstatat(AT_FDCWD, "/home/eko/Games/angband/angband-4.2.4/lib/save/Eko960892.new", 0x7ffd9c794b20, 0) = -1 ENOENT (No such file or directory) [pid 12560] 22:32:58 openat(AT_FDCWD, "/home/eko/Games/angband/angband-4.2.4/lib/save/Eko960892.new", O_WRONLY|O_CREAT|O_EXCL, 0600) = -1 EMFILE (Too many open files) [pid 12560] 22:32:58 openat(AT_FDCWD, "/home/eko//.angband/Angband/window.prf", O_RDONLY) = -1 EMFILE (Too many open files) [pid 12560] 22:32:58 openat(AT_FDCWD, "/home/eko//.angband/Angband/window.prf", O_RDWR|O_CREAT|O_APPEND, 0666) = -1 EMFILE (Too many open files) [pid 12560] 22:32:58 openat(AT_FDCWD, "/home/eko//.angband/Angband/lore.txt.new", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EMFILE (Too many open files)
Indeed, process 12560 (angband) has 1025 files opened!Code:eko@e5550:~$ ulimit -n 1024
99,99% of those 1025 files are the .mp3 files from the sound folder opened several times each (the use_sound option is set to yes), which I'd say may be a bug?Code:eko@e5550:~$ ls -l /proc/12560/fd | wc -l 1025
I can't attach the listing to this post as it exceeds the file limit but I can send it by mail if needed.
[EDIT]
Maybe it's a problem with my system only, as
1) The sound doesn't even work
2) Launching the game with a command-line indicates a problem with the sound output:
Could not open audio output file for writing.
./angband: Failed to load sound 'amb_door_iron'
./angband: Failed to load sound 'plc_hit_hay'
./angband: Failed to load sound 'plc_hit_hay'
./angband: Failed to load sound 'plc_hit_hay'
./angband: Failed to load sound 'mco_howl_croak'
./angband: Failed to load sound 'plm_click_switch'
./angband: Failed to load sound 'plm_open_case'
./angband: Failed to load sound 'plc_miss_arrow2'
./angband: Failed to load sound 'mco_hit_whip'
./angband: Failed to load sound 'plc_hit_body'
./angband: Failed to load sound 'mco_hit_whip'
./angband: Failed to load sound 'plc_hit_hay'
./angband: Failed to load sound 'mco_creature_yelp'
./angband: Failed to load sound 'plc_hit_body'
./angband: Failed to load sound 'mco_click_vibra'
./angband: Failed to load sound 'pls_tone_headstock'
./angband: Failed to load sound 'plc_hit_body'
./angband: Failed to load sound 'mco_howl_high'
Weird thing, the output doesn't mention the extension (.mp3) ?
I suppose the process can't write/open any files after triggering a sound 1024 times in the game (ie open a door, shoot a monster,...) which is why I couldn't consistently reproduce the bug...
In the end, it's not a big deal as disabling sound solves the problem, but maybe it could be a good idea to systematically close sound files and/or have a better error handling in case of SDL sound failure like on my system?
[/Edit]Last edited by animal_waves; March 15, 2022, 23:42.Comment
-
Yes, this looks like a bug. I've had issues with handling of sounds before - in fact, sound doesn't work on my OpenSUSE dev setup either. And the question of which sound file format to use doesn't lead to any good answers, any choice is some form of compromise.
In any case, I've filed it as a bug, thanks for the excellent report.One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
Which Linux distribution is this? Do you know which version of SDL and SDL mixer are installed?
What I'm seeing on Debian 11 (with Debian's packaging of libSDL 1.2.15 and libSDL-mixer 1.2.12) is one file descriptor opened the first time a sound is played and with 200-some sounds listed in lib/customize/sound.prf that wouldn't be enough to hit the limit on the number of open file descriptors.Comment
-
I'm using Slackware 15.0, which is shipped with SDL 1.2.15, SDL Mixer 1.2.12 and SDL Sound 1.0.3.
SDL Mixer is also patched with libmikmod (http://mikmod.sourceforge.net/) for whatever reason.
You can find the whole build process (including compilation options if that matters) here:
That's also the case on my Debian 9 system: only one file descriptor is opened per .mp3 file, even if the said file is played multiple times.What I'm seeing on Debian 11 (with Debian's packaging of libSDL 1.2.15 and libSDL-mixer 1.2.12) is one file descriptor opened the first time a sound is played and with 200-some sounds listed in lib/customize/sound.prf that wouldn't be enough to hit the limit on the number of open file descriptors.
On the problematic system, the process open a file descriptor each time a sound must be played (and fails to plays it), even if the descriptor for said file is already opened.
So, after trying to play +- 10XX sounds (which may be about an hour of gameplay?) the limit is reached and the process is not able to write anything anywhere.
Maybe it's just the SDL Sound/Mixer that has been compiled without .mp3 support? I don't know how to check that easily without writing & compiling some code.
We can migrate this discussion on the git bug tracker if you prefer?Comment
-
That's possible. SDL mixer is getting the mp3 support from libmad0 on Debian. Slackware's description of the libraries linked in by the SDL package doesn't seem to include a library that provides mp3 support. In any case, the cleanest solution to this would be in SDL mixer: Mix_LoadMUS() is the one that acquires the file descriptor and doesn't release it when some errors occur.
Also, if you want to switch back to the SDL2 front end, the most recent nightly build, https://github.com/angband/angband/r...4-7-g3097e3fd8 , fixes the problem with editing keymaps that you found.Comment
-
But you can see the activation chance when you 'e' look at your inventory. Is it around 50 per cent? A half troll warrior is going to have pretty much the lowest activation success in AngbandComment
-
What is your @'s Intelligence? Starting out, Half Trolls are incredibly stupid. They suck at activating magic items for quite awhile until they get their intelligence up. To me, that seems appropriate.“We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
― Tom Stoppard, Rosencrantz and Guildenstern are DeadComment
-
Here is where the original discussion about it happened; subsequent complaints appear in multiple threads
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
It is 18/70. I remember that the other H-troll warrior I played had absurdly high int (18/*** starting in midgame) thanks to randart fickleness, which would explain why I didnt notice anything amiss.
Before the change, H-troll warrior already had the worst device skill and it was arguably the biggest detriment to that race/class combo. There is no need to further push that theme to the point where playing the it becomes frustrating.
I did read through some of the above linked threads about this topic; there are many posts about how to achieve it, but I didnt find anything speaking to the why of the matter.
Maybe I have missed it, but please someone tell me _why_ all this was started ? What was wrong with the existing parameters ?Comment
-
Because the old formula had no way to make really bad device skill possible just by adjusting the data files. I also liked the shape of the curve from the new formula, which places most of the improvement in the middle game.
If people really hate the reduced device skill, it can be fixed by adjusting the data files now (probably by improving warrior device skill).One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
Lategame is mostly activating devices, especially for the warrior.
Now tele other is a case where time is of the essence; but most other actions are not: typically, you have time to use rods/staves of detection, restoration, speed.
For the latter, if you really insist on there being that bad device skill, it could be automated like digging; so the game retries without forcing the player to input action - react - input - react _all the time_. Or maybe activation has high chance of success, but takes more than 1 turn, more or less inversly proportional to the device skill. I dont really like these ideas, but something would have to happen.
The level 20 troll warrior finding an ood rod of restoration can have as low a chance to activate it as you like; but at high level, when eventually all the items become available, you give the player the choice to play suboptimally or go insane. This is exactly the same issue as digging, and in that case the devs had mercy.Comment
Comment