Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old January 11, 2022, 17:22   #381
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 273
backwardsEric is on a distinguished road
Quote:
Originally Posted by lea2501 View Post
Code:
v ~/src/frogcomposband [master]
lea@openbsd > ./src/frogcomposband -uUser -mgcu -- -n1
./src/frogcomposband: Unable to prepare any 'display module'!
x ~/src/frogcomposband [master]
lea@openbsd > ./src/frogcomposband -uUser
./src/frogcomposband: Unable to prepare any 'display module'!
x ~/src/frogcomposband [master]
lea@openbsd > ./src/frogcomposband
./src/frogcomposband: Unable to prepare any 'display module'!
When I compiled it on OpenBSD 6.9, it did not recognize the installed version of ncurses by default but did recognize the X11 libraries which were also installed. Adding "--with-ncurses-prefix=/usr LIBS=-lncurses" to the options to configure let it build the curses front end. That worked, at least as far as getting to the splash screen and the prompt for what sort of game to start.
backwardsEric is offline   Reply With Quote
Old January 11, 2022, 17:32   #382
lea2501
Apprentice
 
Join Date: Dec 2019
Posts: 60
lea2501 is on a distinguished road
Quote:
Originally Posted by backwardsEric View Post
When I compiled it on OpenBSD 6.9, it did not recognize the installed version of ncurses by default but did recognize the X11 libraries which were also installed. Adding "--with-ncurses-prefix=/usr LIBS=-lncurses" to the options to configure let it build the curses front end. That worked, at least as far as getting to the splash screen and the prompt for what sort of game to start.
It managed to compile like this:
Code:
$ ./configure --prefix $HOME/.frogcomposband --with-ncurses-prefix=/usr LIBS=-lncurses --without-x --with-no-install CFLAGS="-DSGI -DULTRIX"
But then i get this (new) error:
Code:
x ~/src/frogcomposband [master]
lea@openbsd > ./src/frogcomposband -uUser
./src/frogcomposband: Fatal Error.
lea2501 is offline   Reply With Quote
Old January 11, 2022, 17:55   #383
backwardsEric
Swordsman
 
Join Date: Aug 2019
Posts: 273
backwardsEric is on a distinguished road
The "Fatal Error." means it didn't find the lib directory. Check the output of configure to see what it said the "lib path" would be. I suspect that configure wants the LIBS= option at the end of the command line (after any of the --with, --without, --enable, --prefix, ...) and ignored the --with-no-install.
backwardsEric is offline   Reply With Quote
Old January 11, 2022, 18:52   #384
smbhax
Adept
 
Join Date: Oct 2021
Location: WA
Posts: 207
smbhax is on a distinguished road
Quote:
Originally Posted by backwardsEric View Post
This also worked for Angband:

Code:
./configure --with-no-install --with-ncurses-prefix=/usr LIBS=-lncurses
Aha! That one solves the ncurses5/6 detection problem on Cygwin. Thanks! : D
__________________
My roguelike gameplay videos
smbhax is offline   Reply With Quote
Old January 12, 2022, 18:01   #385
GrimaTheBold
Apprentice
 
Join Date: Jan 2020
Posts: 72
GrimaTheBold is on a distinguished road
A quick Ninja question - is there any downside to adding light sources as long as they're offset by darkness sources?

I have a Feanoran Lamp of Darkness which decreases light by 3. Is there any penalty to using Sting, or an Amulet with Lu, as long as they are still offset by the -3 on the Lamp and I'm not getting the "Icky light" message? Is there a benefit to having a larger negative light (darkness)?
GrimaTheBold is offline   Reply With Quote
Old January 12, 2022, 21:26   #386
Sideways
Knight
 
Join Date: Nov 2008
Posts: 867
Sideways is on a distinguished road
Quote:
Originally Posted by GrimaTheBold View Post
A quick Ninja question - is there any downside to adding light sources as long as they're offset by darkness sources?
No, actually negative total light simply gets rounded up to no light. As long as any light gets offset by darkness, you're good.
__________________
The Complainer worries about the lack of activity here these days.
Sideways is offline   Reply With Quote
Old January 16, 2022, 20:31   #387
mariari
Rookie
 
Join Date: Jan 2022
Posts: 2
mariari is on a distinguished road
I got the game to compile fine on Linux, however it seems if I try to press !, or { (inscribe then select any item) the game crashes with the message given in the below code snippet .

Note this happens both with the master branch on github and the 7.1 salmiak release. Does anyone know if there is some library mismatch or any way to solve or better report this issue?

Code:
2 katya@Babylon-4:~/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak % ./frogcomposband 
=================================================================
==3746037==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe9fbb8ec0 at pc 0x555c18d6a3a2 bp 0x7ffe9fbb8c70 sp 0x7ffe9fbb8c60
WRITE of size 1 at 0x7ffe9fbb8ec0 thread T0
    #0 0x555c18d6a3a1 in askfor_aux /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/util.c:2720
    #1 0x555c18d6abbc in askfor /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/util.c:2904
    #2 0x555c18a85133 in _inscriber /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/obj.c:979
    #3 0x555c18a9cb97 in obj_prompt /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/obj_prompt.c:147
    #4 0x555c18a85555 in obj_inscribe_ui /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/obj.c:999
    #5 0x555c1884cb35 in _dispatch_command /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:4031
    #6 0x555c1884e516 in process_command /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:4499
    #7 0x555c18853232 in process_player /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:5018
    #8 0x555c1885793c in dungeon /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:5432
    #9 0x555c18860566 in play_game /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:6464
    #10 0x555c18e8adbe in main /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/main.c:779
    #11 0x7f9e56cfeb24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #12 0x555c1863fa5d in _start (/home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/frogcomposband+0x1d6a5d)

Address 0x7ffe9fbb8ec0 is located in stack of thread T0 at offset 128 in frame
    #0 0x555c18a84d6b in _inscriber /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/obj.c:959

  This frame has 2 object(s):
    [48, 128) 'insc' (line 966) <== Memory access at offset 128 overflows this variable
    [160, 415) 'name' (line 965)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/util.c:2720 in askfor_aux
Shadow bytes around the buggy address:
  0x100053f6f180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100053f6f190: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 04 f2
  0x100053f6f1a0: 04 f2 00 00 00 00 00 00 00 00 00 00 00 00 04 f3
  0x100053f6f1b0: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
  0x100053f6f1c0: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 00 00
=>0x100053f6f1d0: 00 00 00 00 00 00 00 00[f2]f2 f2 f2 00 00 00 00
  0x100053f6f1e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100053f6f1f0: 00 00 00 00 00 00 00 00 00 00 00 07 f3 f3 f3 f3
  0x100053f6f200: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
  0x100053f6f210: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 00 00
  0x100053f6f220: 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc

2 1 katya@Babylon-4:~/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak % ./frogcomposband
=================================================================
==3746105==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc69e3ad40 at pc 0x55f9d91b63a2 bp 0x7ffc69e3aae0 sp 0x7ffc69e3aad0
WRITE of size 1 at 0x7ffc69e3ad40 thread T0
    #0 0x55f9d91b63a1 in askfor_aux /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/util.c:2720
    #1 0x55f9d91b6bbc in askfor /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/util.c:2904
    #2 0x55f9d91b6c02 in get_string /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/util.c:2932
    #3 0x55f9d8bb00bc in do_cmd_pref /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/cmd4.c:1770
    #4 0x55f9d8c997ea in _dispatch_command /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:4275
    #5 0x55f9d8c9a516 in process_command /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:4499
    #6 0x55f9d8c9f232 in process_player /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:5018
    #7 0x55f9d8ca393c in dungeon /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:5432
    #8 0x55f9d8cac566 in play_game /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/dungeon.c:6464
    #9 0x55f9d92d6dbe in main /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/main.c:779
    #10 0x7f0617c3ab24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #11 0x55f9d8a8ba5d in _start (/home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/frogcomposband+0x1d6a5d)

Address 0x7ffc69e3ad40 is located in stack of thread T0 at offset 128 in frame
    #0 0x55f9d8baffdc in do_cmd_pref /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/cmd4.c:1763

  This frame has 1 object(s):
    [48, 128) 'buf' (line 1764) <== Memory access at offset 128 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/katya/Desktop/Games/Rogue/Angband/frogcomposband/frogcomposband-7.1.salmiak/src/util.c:2720 in askfor_aux
Shadow bytes around the buggy address:
  0x10000d3bf550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000d3bf560: 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 04 f2 04 f2
  0x10000d3bf570: 00 00 00 00 00 00 00 00 00 00 00 00 04 f3 f3 f3
  0x10000d3bf580: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000d3bf590: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 00 00
=>0x10000d3bf5a0: 00 00 00 00 00 00 00 00[f3]f3 f3 f3 00 00 00 00
  0x10000d3bf5b0: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00
  0x10000d3bf5c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000d3bf5d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000d3bf5e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000d3bf5f0: 00 f2 f2 f2 f2 f2 f2 f2 f2 f2 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
mariari is offline   Reply With Quote
Old January 16, 2022, 22:49   #388
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,317
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Quote:
Originally Posted by mariari View Post
I got the game to compile fine on Linux, however it seems if I try to press !, or { (inscribe then select any item) the game crashes with the message given in the below code snippet .
Looks to me like
Code:
    /* Paranoia -- Clip the default entry */
    buf[len] = '\0';
should be
Code:
    /* Paranoia -- Clip the default entry */
    buf[len - 1] = '\0';
(util.c line 2720). Or potentially you could use different call parameters in line 979 of obj.c, but that still leaves it open for error in other calls.
__________________
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 January 16, 2022, 23:57   #389
mariari
Rookie
 
Join Date: Jan 2022
Posts: 2
mariari is on a distinguished road
Quote:
Originally Posted by Nick View Post
Looks to me like
Code:
    /* Paranoia -- Clip the default entry */
    buf[len] = '\0';
should be
Code:
    /* Paranoia -- Clip the default entry */
    buf[len - 1] = '\0';
(util.c line 2720). Or potentially you could use different call parameters in line 979 of obj.c, but that still leaves it open for error in other calls.
Yeah That seems to fix the two errors I've encountered.

I've since got other people to compile the game, and seems if they ran the make file without any options, the commands work, but pref crashes when you hit enter.

However when they do compile with
Code:
./configure SANITIZE_FLAGS=-fsanitize=address --with-no-install
This error happens for them, I'm guessing without fsantize=adresss the game just sees the errors writes to the memory location that is out of bounds and continues on. Should I make a pull request with this on the repo, it seems to lack any sort of issue tracking.

Thank you once again

Last edited by mariari; January 17, 2022 at 00:36.
mariari is offline   Reply With Quote
Old January 17, 2022, 08:38   #390
smbhax
Adept
 
Join Date: Oct 2021
Location: WA
Posts: 207
smbhax is on a distinguished road
Quote:
Originally Posted by smbhax View Post
Not sure why Vanilla and Frog haven't updated their config settings to detect ncurses/w 6 as well as 5, though.
Ah, Vanilla is detecting ncurses6 now. : )
__________________
My roguelike gameplay videos
smbhax is offline   Reply With Quote
Reply

Tags
frogcomposband


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
[Announce] FrogComposband 7.1.liquorice released Sideways Variants 135 December 1, 2020 16:10
[Announce] FrogComposband 7.1.chocolate released Sideways Variants 86 February 23, 2020 01:04
[Announce] FrogComposband 7.1.toffee released Sideways Variants 129 July 18, 2019 14:22
[Announce] FrogComposband 7.0.nougat released Sideways Variants 152 November 6, 2018 12:16
[Announce] FrogComposband 7.0.mango released Sideways Variants 133 August 3, 2018 10:53


All times are GMT +1. The time now is 07:56.


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