Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old March 30, 2021, 23:39   #11
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 340
backwardsEric is on a distinguished road
Not sure if this is the appropriate thread for a bug report about Xygos, but here's one

OS: macOS 10.15.7; Xcode 12.4 for the compiler; built from source (commit number 49cbe9eff8e17b20fe1bd8912f73675233b1bc62, "An easter egg ....", was HEAD) using
Code:
./autogen.sh
cd src; make -f Makefile.osx
Problem: Crashes on a segmentation fault immediately after character creation. The new character was a human, no mutations or implants, engineer, default point buy for the stats, and a randomly selected name. Took the Foraging talent from the talent selection screen. Recompiling with debugging enabled and rerunning crashed at the same point. The top of the call stack at the point of the crash for that was
Code:
cave_monster_max(c=0) at cave.c:595
monster_list_new at mon-list.c:33
monster_list_shared_instance at mon-list.c:94
monster_list_show_subwindow(height=16, width=42) at ui-mon-list.c:354
update_monlist_subwindow(type=EVENT_MONSTERLIST, data=0, user=0x000000010054c3a8) at ui-display.c:1766
game_event_dispatch(type=EVENT_MONSTERLIST, data=0) at game-event.c:43
event_signal(type=EVENT_MONSTERLIST) at game-event.c:142
redraw_stuff(p=0x00000001028eba08) at player-calcs.c:2364
ui_enter_world(type=EVENT_ENTER_WORLD, data=0, user=0) at ui-display.c:2617
game_event_dispatch(type=EVENT_ENTER_WORLD, data=0) at game-event.c:43
event_signal(type=EVENT_ENTER_WORLD) at game-event.c:142
start_game(new_game=true) at ui-game.c:420
play_game(new_game=true) at ui-game.c:440
It looks like it may be using my existing subwindow setup from Angband, and that may explain why the monster list window is being updated at the point of the crash.

Last edited by backwardsEric; March 30, 2021 at 23:47. Reason: be more specific about the source used
backwardsEric is offline   Reply With Quote
Old March 31, 2021, 01:10   #12
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,725
Donated: $40
Pete Mack will become famous soon enough
To fix this problem, edit the make file version number and executable name.
Pete Mack is offline   Reply With Quote
Old March 31, 2021, 01:40   #13
Mike
Rookie
 
Join Date: Mar 2021
Posts: 21
Mike is on a distinguished road
This is definitely the appropriate place to report Xygos bugs. This doesn't look Mac specific, and at first glance I thought that all extra windows could be affected - I don't normally play with them and so haven't really tested them. But I have been unable to reproduce it - and the flip side of not playing with extra windows is that I haven't meddled with them. So although sharing window positions etc. with V would be unintended behaviour it still seems unlikely that doing so would cause problems. It looks as if the window is trying to be displayed too early - when there is no level generated (the null cave pointer). Simply ignoring that case would probably be effective, but I would prefer to know why it happens and how to see it on Linux.



So, please could you post your .prf? The Linux equivalent is ~/.angband/Xygos/x11-settings.prf. I don't know where they are kept on MacOS.
Mike is offline   Reply With Quote
Old March 31, 2021, 02:00   #14
Mike
Rookie
 
Join Date: Mar 2021
Posts: 21
Mike is on a distinguished road
Make file version number, name

While I did say that I didn't think that this was the cause of the segfault - it's still a bug, whether or not it is the same bug that caused that crash. If there's a duff version or exe name I would like to fix it. But at my first look there isn't - could you point me at the file/line you mean?
Mike is offline   Reply With Quote
Old March 31, 2021, 02:09   #15
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 340
backwardsEric is on a distinguished road
Quote:
Originally Posted by Mike View Post
So, please could you post your .prf? The Linux equivalent is ~/.angband/Xygos/x11-settings.prf. I don't know where they are kept on MacOS.
The contents of ~/Documents/Angband/window.prf are attached as window.txt . The ~/Documents/Xygos directory (where the Mac front end would tell Xygos to place user files) doesn't have a window.prf. For Angband, the size and placement for the active subwindows are stored by the Mac front end in ~/Library/Preferences/rephial.org.angband.plist . The human-readable form of that (generated with "plutil -p file") is attached as angband-pref.txt. It says I've got subwindows 1, 2, 3, 4, and 5 open by default.

src/Makefile.osx in Xygos uses the same setting for BUNDLE_IDENTIFIER as Angband does (i.e. org.rephial.angband). That is why the Mac front-end preferences are shared. Changing that would keep them separate.
Attached Files
File Type: txt angband-pref.txt (1.4 KB, 142 views)
File Type: txt window.txt (881 Bytes, 139 views)
backwardsEric is offline   Reply With Quote
Old April 1, 2021, 00:08   #16
Mike
Rookie
 
Join Date: Mar 2021
Posts: 21
Mike is on a distinguished road
Mac build

I've been unable to reproduce the crash on Linux, but I do now have a Mac build up that uses its own BUNDLE_IDENTIFIER and so shouldn't share any prefs with Angband. I'd appreciate it if someone could give that a try and see if it avoids the crash.
Mike is offline   Reply With Quote
Old April 1, 2021, 05:17   #17
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 340
backwardsEric is on a distinguished road
Quote:
Originally Posted by Mike View Post
I've been unable to reproduce the crash on Linux, but I do now have a Mac build up that uses its own BUNDLE_IDENTIFIER and so shouldn't share any prefs with Angband. I'd appreciate it if someone could give that a try and see if it avoids the crash.
The change to the bundle identifier works as intended. The crash immediately after exiting the birth process (as before, segmentation fault in cave_monster_max() while displaying the monster list subwindow) still happens (wiping any previous ~/Documents/Xygos and deleting the Mac front end defaults with
Code:
defaults delete xygos.rephial.org
, to simulate startup on a system where it hadn't been run before, did not help).

Without any prior defaults, the Mac front end is always setting up default sizes and placements for Term-1 to Term-5. That behavior is in Angband as well. Those terms will open immediately after going from the splash screen to the birth process. Closing them all before leaving the birth process does not prevent the crash. Changing line 350 of src/ui-mon-list.c to
Code:
if (height < 1 || width < 1 || !cave)
did let things proceed to the town, and I didn't encounter any problems after that.

To reproduce the crash on Linux, this worked for me (using Debian Buster; compiled from the latest source after configuring
Code:
./configure --with-no-install
; the X11 developer packages were installed so the X11 interface was enabled by default):
  1. Run ./xygos
  2. Create a character
  3. Once in town, exit with Ctrl-X
  4. Run ./xygos -mx11 -- -n4
  5. Once playing with the previous save, commit suicide with Q
  6. On the death screen, select the option to start a new game without exiting
  7. Going through the birth process works fine, but then crashes
backwardsEric is offline   Reply With Quote
Old April 1, 2021, 07:05   #18
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,463
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by backwardsEric View Post
Changing line 350 of src/ui-mon-list.c to
Code:
if (height < 1 || width < 1 || !cave)
did let things proceed to the town, and I didn't encounter any problems after that.
Weird. Why doesn't Angband crash there, then?
__________________
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 April 1, 2021, 17:27   #19
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 340
backwardsEric is on a distinguished road
Quote:
Originally Posted by Nick View Post
Weird. Why doesn't Angband crash there, then?
From what I'm seeing, Angband does not have PR_MONLIST included in player->upkeep->redraw on that first call to redraw_stuff() while Xygos does. For Xygos, that flag is already set when event_signal(EVENT_ENTER_WORLD) is called. I didn't track down when it was set prior to that.
backwardsEric is offline   Reply With Quote
Reply

Tags
xygos


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tales of Maj'Eyal 1.3.2 aka "Stunt Saver" is released! DarkGod ToME 0 November 29, 2015 21:40
Tales of Maj'Eyal 1.1.5 aka "Stoke Me a Clipper" is released! DarkGod ToME 0 January 10, 2014 10:37
Tales of Maj'Eyal 1.1.4 aka "Balance of Power" is released! DarkGod ToME 0 January 9, 2014 01:16
Tales of Maj'Eyal 1.1.3 aka "Oh Christmas Troy!" is released DarkGod ToME 0 December 24, 2013 17:54
Tales of Maj'Eyal 1.1.2 aka "Starburst" is released! DarkGod ToME 0 December 23, 2013 01:26


All times are GMT +1. The time now is 09:53.


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