RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Error after updating retropie-setup to 4.4.9 (a161774a)

    Scheduled Pinned Locked Moved Help and Support
    retropie-setuperrorupdate
    70 Posts 7 Posters 5.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      psyke83 Global Moderator
      last edited by psyke83

      Please let me know if this fixes the issue: https://github.com/RetroPie/RetroPie-Setup/pull/2651

      @mitu - although I'm confident the above will resolve the errors, I think that we might have highlighted the issue that joy2key (even when reverted to the commit you specified) isn't utilizing your mappings for that controller correctly, and falling back to retroarch.cfg instead. I can try to troubleshoot that in more detail if you can confirm that my suspicion is correct.

      You said that you only have one gamepad configured; the error triggers if an unconfigured or partially mapped controller is connected, so if you also had a different, unmapped controller connected, then the script doesn't need any further fixing beyond the current PR.

      mituM 1 Reply Last reply Reply Quote 1
      • mituM
        mitu Global Moderator @psyke83
        last edited by mitu

        @psyke83 The PR seems to work, thank you.

        Indeed, I have 3 /dev/input/jsX devices present, but only 1 of them was configured - the one I mentioned (USB,2-axis 8-button gamepad , mapped to /dev/input/js0). The configuration was done from Emulationstation, without any other external edits.

        There's one more message (probably related to the signal handling updates for joy2key) that appears now every time joy2key starts

        Exception OSError: (9, 'Bad file descriptor') in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
        

        It stays in the background (doesn't clutter the dialog boxes), but it doesn't appeared before. Also reported here.

        Thank you. We can debug further if you like, so let me know if you want to be to test other things.

        P 1 Reply Last reply Reply Quote 0
        • P
          psyke83 Global Moderator @mitu
          last edited by

          @mitu

          Unfortunately I can't reproduce this error. Can you isolate whether it's triggered by a specific controller in particular? I only have two PS3 controllers, and I can't trigger the error with none, one or both connected.

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @psyke83
            last edited by mitu

            @psyke83 said in Error after updating retropie-setup to 4.4.9 (a161774a):

            Unfortunately I can't reproduce this error. Can you isolate whether it's triggered by a specific controller in particular?

            I use only 1 controller (the one I mentioned), though there are 3 /dev/input/jsX entries from the other 2 controllers. If I unplug the other 2 controllers (which actually it's just a 2SNES-to-USB adapter without any controllers connected), I still get the same Exception OSError: (9, 'Bad file descriptor') ..., so it doesn't look like it's related to a particular controller.
            I'm on a fully updated Raspbian Stretch, maybe there's something from a package update.

            I tried (on the master branch) to reproduce the original error (the one reported by @hiulit) without the other 2 controllers connected and it seems ok - the problem appears only when I have the other (un-configured) 2 controllers connected.

            P 1 Reply Last reply Reply Quote 0
            • P
              psyke83 Global Moderator @mitu
              last edited by

              @mitu

              Would it be possible for you to isolate the part of the script triggering the warning via some manual edits? See: https://github.com/RetroPie/RetroPie-Setup/commit/f614804f23c6280b1441b187e36c414b8cb41191

              In the three instances where I replaced except: with a more specific exception, you could change one back to a naked exception and see if it eliminates the warning. If I could at least know which one of the three is the trigger, it should help me evaluate the exact origin of the error. Thanks!

              EfriimE mituM 3 Replies Last reply Reply Quote 0
              • EfriimE
                Efriim @psyke83
                last edited by Efriim

                @psyke83
                Line 163.
                OSError and ValueError both throw exceptions individually, if one of them is a parent, probably ValueError.

                1 Reply Last reply Reply Quote 1
                • mituM
                  mitu Global Moderator @psyke83
                  last edited by

                  @psyke83 thanks, I'll do some testing tonight, don't have access right now to the system.

                  1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @psyke83
                    last edited by

                    @psyke83 OK, I get the same thing as @Efriim (thanks for testing !).
                    If I replace the named exception on line 163, I don't get the error.

                    Now, just to recap what are the conditions in which it happens:

                    • I have 1 gamepad configured in ES and with a .cfg file in the autoconfig folder ( USB,2-axis 8-button gamepad .cfg, there are 2 spaces at the end of the device name). It's a iBuffalo SNES controller. It's mapped at /dev/input/js0.
                    • I also have plugged in a dual SNES to USB adapter (raphnet technologies Dual SNES to USB v2.2) which produces 2 more gamepads (/dev/input/js1 and /dev/input/js2), although only 1 SNES gamepad is plugged in (that's normal). This one doesn't have any configuration in ES or in the RA's autoconfiguration folder.
                      Here's the listing (/proc/bus/input/devices):
                    I: Bus=0003 Vendor=0583 Product=2060 Version=0110
                    N: Name="USB,2-axis 8-button gamepad  "
                    P: Phys=usb-3f980000.usb-1.4/input0
                    S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0583:2060.0001/input/input0
                    U: Uniq=
                    H: Handlers=js0 event0
                    B: PROP=0
                    B: EV=1b
                    B: KEY=ff 0 0 0 0 0 0 0 0 0
                    B: ABS=3
                    B: MSC=10
                    
                    I: Bus=0003 Vendor=289b Product=0057 Version=0101
                    N: Name="raphnet technologies Dual SNES to USB v2.2"
                    P: Phys=usb-3f980000.usb-1.2/input0
                    S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:289B:0057.0008/input/input5
                    U: Uniq=102739
                    H: Handlers=js1 event1
                    B: PROP=0
                    B: EV=1b
                    B: KEY=ffff 0 0 0 0 0 0 0 0 0 0 0 0 ffff 0 0 0 0 0 0 0 0 0
                    B: ABS=3
                    B: MSC=10
                    
                    I: Bus=0003 Vendor=289b Product=0057 Version=0101
                    N: Name="raphnet technologies Dual SNES to USB v2.2"
                    P: Phys=usb-3f980000.usb-1.2/input1
                    S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:289B:0057.0009/input/input6
                    U: Uniq=102739
                    H: Handlers=js2 event2
                    B: PROP=0
                    B: EV=1b
                    B: KEY=ffff 0 0 0 0 0 0 0 0 0 0 0 0 ffff 0 0 0 0 0 0 0 0 0
                    B: ABS=3
                    B: MSC=10
                    

                    NOW, if I remove the 2SNES adapter, and I'm left with only the iBuffalo gamepad (the configured one), then there is no error.

                    My guess is that the script tries to map the /dev/input/js1 and /dev/input/js2 through a RA auto-configuration file, which doesn't exist, and falls back to the RA's default config (/opt/retropie/configs/all/retroarch.cfg, which is stock 4.4 RetroPie) and it fails to map the buttons there.

                    I think that if you have 2 identical gamepads you wouldn't run into this issue, since they're both mapped by the same RA auto-configuration file. Maybe starting xboxdrv on the 2nd controller (and giving it a different name) would enable you to reproduce the error. That is if you don't have a spare gamepad you could plug in.

                    1 Reply Last reply Reply Quote 0
                    • EfriimE
                      Efriim
                      last edited by

                      Wii Motion Plus controller stand alone.
                      It has no retroarch config or listing in /dev/input/by-id/

                      It has several event handlers, for the accelerometer, IR, controller, motionplus?.
                      The main controller input has three Handlers; a kbd, js, event.

                      The controller doesn't work anyway, I thought that it was becuase of the error, and then learn these controllers wont work without additional setups. It seems close to working, the evtest buttons work, the jstest shows the same buttons working, minus the dpad which is being handled as a keyboard event.

                      mituM 1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @Efriim
                        last edited by

                        @Efriim They won't work straight out without extra software - https://retropie.org.uk/docs/Wiimote-Controller. But IMHO they're terrible as controllers compared to other gamepads - might worth it if they'd work as light-guns (i.e. detected as mice).

                        EfriimE 1 Reply Last reply Reply Quote 0
                        • EfriimE
                          Efriim @mitu
                          last edited by Efriim

                          @mitu It says there are three methods, I think they all use a different driver to access the bluetooth stack. It also says that the polling methods for finding and syncing the bluetooth are poorly written to terrible. I lost interest.
                          There is a IR sensor that you can buy for windows machines/linux boxes the 'dolphinbar' setting it up allows one to use the IR sensor on the wiimote as a mouse or whatever. The controllers are okay if you only need a handful of buttons, megadrive, nintendo, gba. The wii classic controllers are more like a modern gamepad and they attach to the wiimote.

                          Even if I did get one of the methods to work, I don't know if it will hinder my ps3 controller, or that the wii classic controller will function. I give up on it, I wish it worked out of the box, or a script module.

                          mituM 1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator @Efriim
                            last edited by mitu

                            @Efriim Ah, so you want it for the classic controller(s) - you can get an USB adapter for that, without resorting to the wiimote as an intermediary. Pretty nifty if you have any of the classic minis Nintendo released a while ago (in addition to the Wii (U) ones).
                            Something like this.

                            EfriimE 1 Reply Last reply Reply Quote 0
                            • EfriimE
                              Efriim @mitu
                              last edited by

                              @mitu
                              that is nifty, and I could use it on any usb.

                              The main problem I'm facing right now is my powersupply. I have a RetroFlag case and Overclocked to a maximum, but if I use a USB port for charging, I get undervolt warnings. I think maybe if I get 5.2V power supply as opposed to my 5.0V long cable it will solve it. But I'm not sure about this either, I may have to resort to a lower Overclock, or perhaps just disabling force_turbo.
                              Didn't mean to derail the thread.
                              I haven't had any new problems with the update.

                              1 Reply Last reply Reply Quote 0
                              • P
                                psyke83 Global Moderator
                                last edited by

                                @mitu,

                                I still haven't had luck reproducing the issue, unfortunately. I tried masking a controller via xboxdrv, writing a python script to emulate a dummy joystick via uinput and I even dug out an old PS2 clone controller that has a USB connection, but I couldn't reproduce the issue with the combination of two controllers connected but only one mapping set up.

                                Is it possible that your SNES to USB adapter is the source of the problem because it emits joystick nodes for devices that aren't connected? Try to unplug your mapped iBuffalo gamepad (and/or any other mapped controllers) to see if you can trigger the error just when you have the unmapped SNES to USB adapter connected.

                                mituM 1 Reply Last reply Reply Quote 0
                                • mituM
                                  mitu Global Moderator @psyke83
                                  last edited by mitu

                                  @psyke83 said in Error after updating retropie-setup to 4.4.9 (a161774a):

                                  Is it possible that your SNES to USB adapter is the source of the problem because it emits joystick nodes for devices that aren't connected?

                                  Well, one of the port is not connected, one has a SNES controller attached. But I can give it a try and connect a real controller instead of the adapter.

                                  Try to unplug your mapped iBuffalo gamepad (and/or any other mapped controllers) to see if you can trigger the error just when you have the unmapped SNES to USB adapter connected.

                                  Unfortunately I don't have a keyboard, but I can try with another controller instead of the iBuffalo.

                                  1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator
                                    last edited by mitu

                                    I removed the 2SNES-to-USB adapter and connected a 8Bitdo SN30 via USB.

                                    cat /proc/bus/input/devices
                                    I: Bus=0003 Vendor=0583 Product=2060 Version=0110
                                    N: Name="USB,2-axis 8-button gamepad  "
                                    P: Phys=usb-3f980000.usb-1.4/input0
                                    S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0583:2060.0001/input/input0
                                    U: Uniq=
                                    H: Handlers=js0 event0
                                    B: PROP=0
                                    B: EV=1b
                                    B: KEY=ff 0 0 0 0 0 0 0 0 0
                                    B: ABS=3
                                    B: MSC=10
                                    
                                    I: Bus=0003 Vendor=2dc8 Product=ab20 Version=0110
                                    N: Name="SNES30             SNES30 Joy    "
                                    P: Phys=usb-3f980000.usb-1.5/input0
                                    S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:2DC8:AB20.000D/input/input9
                                    U: Uniq=
                                    H: Handlers=js1 event1
                                    B: PROP=0
                                    B: EV=1b
                                    B: KEY=fff 0 0 0 0 0 0 0 0 0
                                    B: ABS=30027
                                    B: MSC=10
                                    

                                    Without configuring it, I get the same error when starting the setup script (with the iBuffalo controller).
                                    I've configured the 8bitdo in Emulationstation, auto-conf got generated. Starting again the setup script - no more errors.

                                    I removed the iBuffalo auto-config file, then started again the setup script - the error pops up again (IndexError: list index out of range, etc.).

                                    I'm thinking @Efriim got the error because he paired an Bluetooth controller, then returned back to the setup script with an extra /dev/input/jsX device - unconfigured at that point.

                                    P 1 Reply Last reply Reply Quote 0
                                    • P
                                      psyke83 Global Moderator @mitu
                                      last edited by

                                      @mitu said in Error after updating retropie-setup to 4.4.9 (a161774a):

                                      I removed the 2SNES-to-USB adapter and connected a 8Bitdo SN30 via USB.

                                      cat /proc/bus/input/devices
                                      I: Bus=0003 Vendor=0583 Product=2060 Version=0110
                                      N: Name="USB,2-axis 8-button gamepad  "
                                      P: Phys=usb-3f980000.usb-1.4/input0
                                      S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0583:2060.0001/input/input0
                                      U: Uniq=
                                      H: Handlers=js0 event0
                                      B: PROP=0
                                      B: EV=1b
                                      B: KEY=ff 0 0 0 0 0 0 0 0 0
                                      B: ABS=3
                                      B: MSC=10
                                      
                                      I: Bus=0003 Vendor=2dc8 Product=ab20 Version=0110
                                      N: Name="SNES30             SNES30 Joy    "
                                      P: Phys=usb-3f980000.usb-1.5/input0
                                      S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:2DC8:AB20.000D/input/input9
                                      U: Uniq=
                                      H: Handlers=js1 event1
                                      B: PROP=0
                                      B: EV=1b
                                      B: KEY=fff 0 0 0 0 0 0 0 0 0
                                      B: ABS=30027
                                      B: MSC=10
                                      

                                      Without configuring it, I get the same error when starting the setup script (with the iBuffalo controller).
                                      I've configured the 8bitdo in Emulationstation, auto-conf got generated. Starting again the setup script - no more errors.

                                      I removed the iBuffalo auto-config file, then started again the setup script - the error pops up again (IndexError: list index out of range, etc.).

                                      I'm thinking @Efriim got the error because he paired an Bluetooth controller, then returned back to the setup script with an extra /dev/input/jsX device - unconfigured at that point.

                                      I was only talking about not being able to reproduce the bad file descriptor warnings.

                                      When talking about seeing the IndexError: list index out of range again, do you mean without the PR active? I was under the impression that it would clear up all IndexError exceptions at the very least.

                                      mituM 1 Reply Last reply Reply Quote 0
                                      • mituM
                                        mitu Global Moderator @psyke83
                                        last edited by

                                        @psyke83 said in Error after updating retropie-setup to 4.4.9 (a161774a):

                                        I was only talking about not being able to reproduce the bad file descriptor warnings.

                                        Ah, ok then - I was thinking the other way around. Yes, I'm using master to produce the IndexError, so it's without your PR and it's normal to have the error.

                                        P 1 Reply Last reply Reply Quote 0
                                        • P
                                          psyke83 Global Moderator @mitu
                                          last edited by

                                          @mitu said in Error after updating retropie-setup to 4.4.9 (a161774a):

                                          @psyke83 said in Error after updating retropie-setup to 4.4.9 (a161774a):

                                          I was only talking about not being able to reproduce the bad file descriptor warnings.

                                          Ah, ok then - I was thinking the other way around. Yes, I'm using master to produce the IndexError, so it's without your PR and it's normal to have the error.

                                          OK; I've merged the PR as-is, since it fixes the more serious issue that actually causes joy2key to break. When I can find a way to reliably reproduce the bad file descriptor warning, I'll fix that separately; I'd prefer not go back to using naked exception as they increase the probability of the script failing to exit cleanly when interrupted.

                                          Thank you all for the assistance and be sure to ping me if you find another way to trigger the warning that I can reproduce on my end.

                                          1 Reply Last reply Reply Quote 1
                                          • D
                                            DarishZone Banned
                                            last edited by

                                            Excuse me, seems last update broken joy2key, is there a fix for that? Thx in advance

                                            mituM 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.