Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old March 12, 2022, 18:53   #41
animal_waves
Rookie
 
Join Date: Aug 2018
Posts: 24
animal_waves is on a distinguished road
Quote:
Originally Posted by Selkie View Post
I hope I'm not totally missing the point, and I'm sorry you lost game time and juicy artifacts, but why not save with control S? I've never done anything different, even when quitting out of the game.

I'm not denying this is a bug, just a workaround in the meantime
Ah good question! Out of habit I suppose, I never imagined saving "in game" in a roguelike, only on exit. Actually I wasn't even aware of the command until you mentioned it.
I will test it, but I suppose it uses the same function as the ^X command so I don't get too much hope.

Quote:
Originally Posted by backwardsEric View Post
Is the filesystem where your savefiles and lore.txt are located close to running out of inodes or space (some condition that would prevent generation of a new file)? Saving the lore happens after the savefile but looks like it has better handling of "couldn't open the file" conditions than the savefile code so you see the message about the lore.txt save failing but not about the failure to save the savefile.
Nope, I still have 90% inodes and around 87GB free. Thanks for reminding me checking the health of my HDD however.
I'll try to debug with strace and post here if I have any news!
animal_waves is offline   Reply With Quote
Old March 13, 2022, 02:20   #42
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,691
Donated: $40
Pete Mack is on a distinguished road
Delete any old lore.txt.new in the user directory. Then try again.
Pete Mack is offline   Reply With Quote
Old March 13, 2022, 16:40   #43
spara
Adept
 
Join Date: Nov 2014
Posts: 235
spara is on a distinguished road
I see that my lantern (found on the floor) has not been fully ID:d. However, the resistances etc. matrix does not show any question marks. Is this supposed to happen?

edit. Found an ID scroll that reveals the lantern has been cursed. So the curse was the reason for ??, but was it so that curses we're not rune magic or something hence not showing question marks in the resistances matrix?
spara is offline   Reply With Quote
Old March 15, 2022, 13:26   #44
animal_waves
Rookie
 
Join Date: Aug 2018
Posts: 24
animal_waves is on a distinguished road
The matrix does not list all possible curses (ex: teleportation, sickliness, envelopping curse are missing). I think the reason must be because they have no 'flags' fields in curse.txt so they don't appear in the Matrix. Other curses have such flags (ex: vulnerabilty have AGGRAVATE as a flag) so they will appear in the matrix.
animal_waves is offline   Reply With Quote
Old March 15, 2022, 18:12   #45
Ingwe Ingweron
Veteran
 
Join Date: Jan 2009
Location: Manhattan Beach, CA
Posts: 2,116
Ingwe Ingweron is on a distinguished road
Quote:
Originally Posted by Nick View Post
Confirmed, it's broken. I think I know what's wrong, there will be a fix in due course. Also 4.2.5 confirmed
Any ETA for this fix? Or should I just continue the laborious process of "probing" each monster, and doing several iterations of being careful not to kill unprobed uniques? I can do it, I've done it a few times before. I've gotten my current @ to about 40% full knowledge.
__________________
“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 Dead
Ingwe Ingweron is offline   Reply With Quote
Old March 15, 2022, 20:36   #46
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,379
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by Ingwe Ingweron View Post
Any ETA for this fix?
ETA for a fix - 8 days ago by backwardsEric.
ETA of a built version - in a few minutes, now you've prompted me to actually pull the fix in
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old March 15, 2022, 22:03   #47
animal_waves
Rookie
 
Join Date: Aug 2018
Posts: 24
animal_waves is on a distinguished road
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:
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)
The "EMFILE (Too many open files)" error indicates the process reached the limit of allowed opened files on my system, which is 1024:

Code:
eko@e5550:~$ ulimit -n
1024
Indeed, process 12560 (angband) has 1025 files opened!
Code:
eko@e5550:~$ ls -l /proc/12560/fd | wc -l
1025
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?

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 at 22:42.
animal_waves is offline   Reply With Quote
Old March 15, 2022, 22:49   #48
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,379
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by animal_waves View Post
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?
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.
Nick is offline   Reply With Quote
Old March 16, 2022, 05:47   #49
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 308
backwardsEric is on a distinguished road
Quote:
Originally Posted by animal_waves View Post
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?
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.
backwardsEric is offline   Reply With Quote
Old March 16, 2022, 09:45   #50
animal_waves
Rookie
 
Join Date: Aug 2018
Posts: 24
animal_waves is on a distinguished road
Quote:
Originally Posted by backwardsEric View Post
Which Linux distribution is this? Do you know which version of SDL and SDL mixer are installed?
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.
https://slackware.nl/slackware/slack.../source/l/sdl/
You can find the whole build process (including compilation options if that matters) here:
https://slackware.nl/slackware/slack...sdl.SlackBuild

Quote:
Originally Posted by backwardsEric View Post
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.
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.
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?
animal_waves is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
emar
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.