Menu

#2240 x64sc coredumps when using -config or -addconfig

v3.x
open
nobody
None
Linux
x64sc
18 hours ago
5 days ago
No

Hello,

if I start x64sc this way as a normal user:
x64sc -logfile vice_.log -logtofile -config ~/.config/vice/real_1541_test

then I get:

Reading configuration file `/home/andreas/.config/vice/vicerc'.
free(): invalid size
Abbruch (core dumped)

The log options are likely irrelevant, I just kept them there to not change anything. I can attach the core dump file. It is made on opensuse tumbleweed. Note that this core dump does not occur if I start x64sc with kdbg as prefix and it doesn't occur if I start it as root. So there may be some permission issues involved.

Discussion

  • Andreas Schallenberg

    Command output when extracting dump

     
  • Andreas Schallenberg

    Core dump (bz2)

     
  • gpz

    gpz - 5 days ago

    Did you try with a recent build?

    also, would you post that config file?

     
  • Andreas Schallenberg

    Also note that as far as I can see the contents of the config file to load are not relevant.

     
  • Andreas Schallenberg

    I updated the vice package before retrying today:

    Informationen zu Paket vice:
    ----------------------------
    Repository         : Community Emulators
    Name               : vice
    Version            : 3.10-1.17
    Arch               : x86_64
    Anbieter           : obs://build.opensuse.org/Emulators
    Installierte Größe : 46,3 MiB
    Installiert        : Ja
    Status             : aktuell
    Quellpaket         : vice-3.10-1.17.src
    Upstream-URL       : http://vice-emu.sourceforge.net
    Zusammenfassung    : VICE, the Versatile Commodore Emulator
    Beschreibung       : 
        VICE is a set of accurate emulators for the Commodore 64, 128, VIC20,
        PET, Plus4, CBM-II 8-bit computers and the C64DTV.
    
    
        - Upgrading
        ===========
    
        If you run into trouble please try removing any VICE configuration files
        left over from previous installs.
        (vice.ini / .vicerc / vice2.cfg / vice-sdl.ini depending on platform)
    
        Before reporting bugs, always try with a clean config: Run the emulator
        with the "-default" command line argument or use "restore default config"
        in the UI).
    

    The contents of the config file are:

    > cat /home/andreas/.config/vice/real_1541_test 
    [Version]
    ConfigVersion=3.10
    
    [C64SC]
    Window0Width=800
    
     

    Last edit: Andreas Schallenberg 5 days ago
  • gpz

    gpz - 5 days ago

    I can reproduce the crash ONLY when giving all three options. Omiting one of them - regardless which one - makes the emu start up correctly.

    Now this is very odd, wth

     
  • Andreas Schallenberg

    I just tried to start it seven times with the three arguments. five times it failes, two times it started.

     
  • gpz

    gpz - 5 days ago

    Developments build can be found here btw (i have no idea what this 3.10-1.17 is supposed to be - does it show the svn revision in "about"?)

    https://github.com/VICE-Team/svn-mirror/releases

     
  • Andreas Schallenberg

    Shortened to

    x64sc -config ~/.config/vice/real_1541_test

    Gives seven out of seven successful starts. Now that is strange....

     
  • gpz

    gpz - 5 days ago

    In gdb it works more often for me than without. Strange indeed

     
    • Olaf Seibert

      Olaf Seibert - 5 days ago

      Maybe address space randomization makes it either crash or not? For me on NetBSD I have tried it a bunch of time and Vice started up correctly every time.

      But I did get the impression that the actual contents of the file name after -config were not even read. I even specified some file that wasn't a config file at all, and Vice still started up and had the settings from my default vicerc.

      Maybe running it with valgrind could give a hint.

       
      • gpz

        gpz - 4 days ago

        -config is a bit special, there are extra hacks so it can even work at early startup (which is a mess...). So maybe the order of these options matter?

         
  • Andreas Schallenberg

    Thats the "about" dialogue

     
  • Andreas Schallenberg

    The package info mentions a build time "Fr 26 Dez 2025 16:09:44 CET", so it is at least 7 months old.

     
    • gpz

      gpz - 5 days ago

      That is just the regular 3.10 release then, no idea why they added -1.17 to the package

      (Doesn't matter in this case, since the same problem still exists in trunk)

       
  • gpz

    gpz - 21 hours ago

    should be fixed, please try r46177

     
    • Andreas Schallenberg

      I managed to build the revision but I had to configure it this way:
      LIBS="-lGLX" ./configure

      Otherwise the compilation breaks with:
      /usr/bin/ld.bfd: ../src/arch/gtk3/libarch.a(opengl_renderer_unix.o): undefined reference to symbol 'glXQueryVersion'

      ChatGPT advised this change because apparently autoconf created linkflags which are unsuitable for openSuse Tumbleweed.

      I now have to make x64sc find ROMs and then can hopefully test and report back.

       
      • Andreas Schallenberg

        Had to extend the command line to:
        x64sc -directory /usr/share/vice/ -logfile vice_.log -logtofile -config ~/.config/vice/real_1541_test

        But still it sometimes crashes and sometimes starts up.

         
        • gpz

          gpz - 18 hours ago

          did you do "sudo make install"?

           
          • Andreas Schallenberg

            Silly me. No I didn't, but I crucially forgot to call "src/x64sc" instead of "x64sc".

            Tried six times, doesn't crash.

            Next I'll see if the config actually loads.

             
            • Andreas Schallenberg

              Loading the config doesn't work unfortunately.

               
      • Andreas Schallenberg

        Side note: An alternative way to make it work on my machine is:

        Index: configure.ac
        ===================================================================
        --- configure.ac        (Revision 46176)
        +++ configure.ac        (Arbeitskopie)
        @@ -1282,7 +1282,7 @@
               dnl Find where the GL functions live on this system
               old_clags="$CFLAGS"
               CFLAGS="$VICE_CFLAGS"
        
        -      PKG_CHECK_MODULES(GLEW, [glew], have_pkg_glew="yes")
        +      PKG_CHECK_MODULES(GLEW, [glew glx], have_pkg_glew="yes")
               if test x"$have_pkg_glew" = "xyes"; then
                   LIBS="$LIBS $GLEW_LIBS"
               fi
        

        On environments which don't have GLX this should be disabled (mac?).

         

Log in to post a comment.