Angband SegFault under FreeBSD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AronaDaal
    Rookie
    • Jan 2008
    • 9

    Angband SegFault under FreeBSD

    Hello,

    I just installed Angband under FreeBSD (7 Beta 4) and I get an SegFault, when I try to start the game. See the gdb-output:

    Code:
    [aronadaal@daemonland /usr/home/aronadaal]$ gdb angband
    GNU gdb 6.1.1 [FreeBSD]
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i386-marcel-freebsd"...
    (gdb) run
    Starting program: /usr/local/bin/angband
    [New LWP 100127]
    [New Thread 0x28601100 (LWP 100127)]
    
    Program received signal SIGSYS, Bad system call.
    [Switching to Thread 0x28601100 (LWP 100127)]
    0x2830b9db in ksem_init () from /lib/libc.so.7
    (gdb) backtrace
    #0  0x2830b9db in ksem_init () from /lib/libc.so.7
    #1  0x28301399 in sem_init () from /lib/libc.so.7
    #2  0x28419f90 in SDL_CreateSemaphore () from /usr/local/lib/libSDL.so.11
    #3  0x286250b8 in ?? ()
    #4  0x00000000 in ?? ()
    #5  0x00000000 in ?? ()
    #6  0x28626780 in ?? ()
    #7  0x00000206 in ?? ()
    #8  0x28422db0 in __JCR_LIST__ () from /usr/local/lib/libSDL.so.11
    #9  0x28622130 in ?? ()
    #10 0x283d35d7 in SDL_CreateThread () from /usr/local/lib/libSDL.so.11
    #11 0x00000000 in ?? ()
    #12 0x00000000 in ?? ()
    #13 0x00000318 in ?? ()
    #14 0x28422db0 in __JCR_LIST__ () from /usr/local/lib/libSDL.so.11
    #15 0x286267c4 in ?? ()
    #16 0x282a3bdc in mixer () from /usr/local/lib/libSDL_mixer.so.2
    #17 0x00000018 in ?? ()
    #18 0x283c9eb7 in SDL_OpenAudio () from /usr/local/lib/libSDL.so.11
    #19 0x281043f4 in ?? () from /libexec/ld-elf.so.1
    #20 0xbfbfd544 in ?? ()
    #21 0x280e1838 in dladdr () from /libexec/ld-elf.so.1
    Previous frame inner to this frame (corrupt stack?)
    (gdb)
    If I try to install the game via "pkg_add -r" (precompiled sources), I can't save my games...
    Can anyone please help me?

    CU AronaDaal
  • pav
    Administrator
    • Apr 2007
    • 793

    #2
    D'oh, what's it doing in SDL damnit. Can you try to edit /usr/ports/games/angband/Makefile, adding --disable-sdl to line 22 and reinstall the port, if that would help?

    As for cannot save the game, I guess it's because packages don't retain ownership of directories. Silly mistake of mine. I will look into that.
    See the elves and everything! http://angband.oook.cz

    Comment

    • AronaDaal
      Rookie
      • Jan 2008
      • 9

      #3
      hmm... that doesn't solve my problem!

      I modified the Makefile like this:
      Code:
      (...)
      USE_GMAKE=	yes
      ALL_TARGET=	#
      GNU_CONFIGURE=	yes
      CONFIGURE_ARGS=	--with-setgid=games \
      		--disable-sdl
      .if !defined(WITHOUT_X11)
      USE_XORG=	sm x11
      CONFIGURE_ARGS+=	--with-x
      .else
      CONFIGURE_ARGS+=	--with-x=no
      .endif
      (...)

      Comment

      • pav
        Administrator
        • Apr 2007
        • 793

        #4
        Can I see a new backtrace from gdb, please?
        See the elves and everything! http://angband.oook.cz

        Comment

        • AronaDaal
          Rookie
          • Jan 2008
          • 9

          #5
          it seems that the switch does'nt work

          Code:
          [aronadaal@daemonland /usr/home/aronadaal]$ gdb angband
          GNU gdb 6.1.1 [FreeBSD]
          Copyright 2004 Free Software Foundation, Inc.
          GDB is free software, covered by the GNU General Public License, and you are
          welcome to change it and/or distribute copies of it under certain conditions.
          Type "show copying" to see the conditions.
          There is absolutely no warranty for GDB.  Type "show warranty" for details.
          This GDB was configured as "i386-marcel-freebsd"...
          (gdb) run
          Starting program: /usr/local/bin/angband
          [New LWP 100103]
          [New Thread 0x28601100 (LWP 100103)]
          
          Program received signal SIGSYS, Bad system call.
          [Switching to Thread 0x28601100 (LWP 100103)]
          0x2830b9db in ksem_init () from /lib/libc.so.7
          (gdb) backtrace
          #0  0x2830b9db in ksem_init () from /lib/libc.so.7
          #1  0x28301399 in sem_init () from /lib/libc.so.7
          #2  0x28419f90 in SDL_CreateSemaphore () from /usr/local/lib/libSDL.so.11
          #3  0x286250b8 in ?? ()
          #4  0x00000000 in ?? ()
          #5  0x00000000 in ?? ()
          #6  0x28626780 in ?? ()
          #7  0x00000206 in ?? ()
          #8  0x28422db0 in __JCR_LIST__ () from /usr/local/lib/libSDL.so.11
          #9  0x28622130 in ?? ()
          #10 0x283d35d7 in SDL_CreateThread () from /usr/local/lib/libSDL.so.11
          #11 0x00000000 in ?? ()
          #12 0x00000000 in ?? ()
          #13 0x00000318 in ?? ()
          #14 0x28422db0 in __JCR_LIST__ () from /usr/local/lib/libSDL.so.11
          #15 0x286267c4 in ?? ()
          #16 0x282a3bdc in mixer () from /usr/local/lib/libSDL_mixer.so.2
          #17 0x00000018 in ?? ()
          #18 0x283c9eb7 in SDL_OpenAudio () from /usr/local/lib/libSDL.so.11
          #19 0x281043f4 in ?? () from /libexec/ld-elf.so.1
          #20 0xbfbfd544 in ?? ()
          #21 0x280e1838 in dladdr () from /libexec/ld-elf.so.1
          Previous frame inner to this frame (corrupt stack?)
          (gdb)

          Comment

          • pav
            Administrator
            • Apr 2007
            • 793

            #6
            Can you try adding --disable-sdl-mixer to that line, too?
            See the elves and everything! http://angband.oook.cz

            Comment

            • AronaDaal
              Rookie
              • Jan 2008
              • 9

              #7
              yeah! It works now, but I still cannot save my game...

              Comment

              • pav
                Administrator
                • Apr 2007
                • 793

                #8
                Even if you rm -rf /usr/local/share/angband after you deinstall the package?
                See the elves and everything! http://angband.oook.cz

                Comment

                • AronaDaal
                  Rookie
                  • Jan 2008
                  • 9

                  #9
                  after deinstall the folder /usr/local/share/angband doen't exist anymore.

                  Comment

                  • pav
                    Administrator
                    • Apr 2007
                    • 793

                    #10
                    Good. Just making sure you're installing from port "make install", not adding the package?
                    See the elves and everything! http://angband.oook.cz

                    Comment

                    • AronaDaal
                      Rookie
                      • Jan 2008
                      • 9

                      #11
                      yes! Always installing with "make install clean" and removing with pkd_delete angbandXYZ

                      Comment

                      • pav
                        Administrator
                        • Apr 2007
                        • 793

                        #12
                        Odd, works for me. Can you give me ls -l /usr/local/share/angband ?

                        Also, are you compiling and installing as root, or as a regular user and entering root password before the installation?
                        See the elves and everything! http://angband.oook.cz

                        Comment

                        • AronaDaal
                          Rookie
                          • Jan 2008
                          • 9

                          #13
                          [aronadaal@daemonland /usr/home/aronadaal]$ ls -l /usr/local/share/angband
                          total 22
                          drwxrwxr-x 2 root games 512 Jan 2 17:26 apex
                          d---rwx--- 2 root games 512 Jan 2 17:26 bone
                          drwxrwxr-x 2 root games 512 Jan 2 17:26 data
                          drwxr-xr-x 2 root wheel 512 Jan 2 17:26 edit
                          drwxr-xr-x 2 root wheel 512 Jan 2 17:26 file
                          drwxr-xr-x 2 root wheel 512 Jan 2 17:26 help
                          drwxr-xr-x 2 root wheel 512 Jan 2 17:26 info
                          drwxr-xr-x 2 root wheel 1024 Jan 2 17:26 pref
                          d---rwx--- 2 root games 512 Jan 2 17:26 save
                          drwxr-xr-x 2 root wheel 512 Jan 2 17:26 user
                          drwxr-xr-x 5 root wheel 512 Jan 2 17:26 xtra
                          [aronadaal@daemonland /usr/home/aronadaal]$


                          no i'm logged in as root via "su"

                          Comment

                          • pav
                            Administrator
                            • Apr 2007
                            • 793

                            #14
                            Ok I think I see the problem - are you in the `games' group or not? You need to be
                            See the elves and everything! http://angband.oook.cz

                            Comment

                            • AronaDaal
                              Rookie
                              • Jan 2008
                              • 9

                              #15
                              ah! That's it! But I think the normal way is, to put all savegame files in ~/.angband

                              or not?

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎