Page 1 of 2

Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Tue Dec 23, 2014 6:18 am
by sairuk
Quick Test script separate from Wah!Cade, should detect controller plug/unplug changes without failing but will not monitor input currently. Run from the console, may need to upgrade your python to fix the sdl axis print problem actually for it to be worthwhile

Code: Select all
See attachment

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Tue Dec 23, 2014 8:18 am
by Zombie
Where does this script belong?

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Tue Dec 23, 2014 9:27 am
by sairuk
Zombie wrote:Where does this script belong?


completely separate atm, just run from cli and plug/unplug controllers to see if it dies on you

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Tue Dec 23, 2014 12:40 pm
by Zombie
I can't get this to run because of how its indented.

Code: Select all
$ python controllers.py
commandline read: python
commandline read: controllers.py

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.6.2 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2012  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2013-04-16 11:01)
(*) Direct/Memcpy: Using Generic 64bit memcpy()
(*) Direct/Thread: Started 'Fusion Dispatch' (-1) [MESSAGING OTHER/OTHER 0/0] <8388608>...
(!) Direct/Util: Opening '/dev/fb0' failed!
    --> Access to the resource is denied
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> A general initialization error occured
Segmentation fault (core dumped)

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Wed Dec 24, 2014 8:21 am
by sairuk
Have added as an attachment, see how that goes. I'm not particularly available for a week or so now.

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Mon Jan 05, 2015 11:02 pm
by Zombie
I have gotten your Python script to work, and it seems to work fine, it adds and subtracts controllers based on what I plug into USB ports.

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Mon Jan 05, 2015 11:12 pm
by sairuk
Thanks, will begin to look into integrating this back into the Wah!Cade code

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Thu Jan 08, 2015 12:33 am
by Zombie
Just tell me when I should rebuild and I will take care of it.

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Sun Mar 01, 2015 1:22 am
by sairuk
patched into 156, needs testing

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Sun Mar 01, 2015 3:17 am
by Zombie
Will recompile and give a try. Is there a status screen?

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Sun Mar 01, 2015 3:19 am
by sairuk
tail -f the wahcade.log file

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Sun Mar 01, 2015 4:27 am
by Zombie
Completely broken Joypad support. log continuually streams
Code: Select all
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events


Constantly. No joypad inputs respond. The log did detect my pad however.

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Sun Mar 01, 2015 11:26 am
by sairuk
Zombie wrote:Completely broken Joypad support. log continuually streams
Code: Select all
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events
[Sat Feb 28 22:25:07 2015]: [DEBUG] [PYGAME] Cleared pygame events


Constantly. No joypad inputs respond. The log did detect my pad however.



it'll output that if you run with -d, will look into the rest, was working with my xb1 controller

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Sun Mar 01, 2015 5:37 pm
by Zombie
My controller is a Street Fighter 4 Fight pad, not that it would matter, what would you like me to do?

Re: Joystick Plug/Unplug Crash: Bug 1404769

PostPosted: Fri Mar 13, 2015 3:14 pm
by Zombie
Code: Select all
(process:3672): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:3672): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:3672): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
Twitter Support Disabled, install tweepy (pip install tweepy)
Error: option: [lock_time] for ini file: [/home/arcade/.wahcade/wahcade.ini] not found
Error: option: [ctrlr] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
Error: ini file: [/home/arcade/.wahcade/ctrlr/.ini] does not exist.
Error: option: [consumer_key] for ini file: [/home/arcade/.wahcade/wahcade.ini] not found
Error: option: [consumer_secret] for ini file: [/home/arcade/.wahcade/wahcade.ini] not found
Error: option: [access_key] for ini file: [/home/arcade/.wahcade/wahcade.ini] not found
Error: option: [access_secret] for ini file: [/home/arcade/.wahcade/wahcade.ini] not found
Error: option: [custom_tags] for ini file: [/home/arcade/.wahcade/wahcade.ini] not found
Error: option: [ctrlr] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
Error: ini file: [/home/arcade/.wahcade/ctrlr/.ini] does not exist.
Error: option: [wrap_game_description_label] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
Error: option: [wrap_romname_label] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
Error: option: [wrap_year_manufacturer_label] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
Error: option: [wrap_screen_type_label] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
Error: option: [wrap_controller_type_label] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
Error: option: [wrap_driver_status_label] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
Error: option: [wrap_catver_label] for ini file: [/home/arcade/.wahcade/ini/gens-gs.ini] not found
SDL_JoystickNumHats value:1:


Sorry to keep you waiting.
Code: Select all
[Fri Mar 13 10:19:10 2015]: //======================= NEW LOG RUN =======================//
[Fri Mar 13 10:19:10 2015]: Wah!Cade updating user config files in: /home/arcade/.wahcade
[Fri Mar 13 10:19:10 2015]: Launching in Fullscreen Mode
[Fri Mar 13 10:19:10 2015]: Debug Mode Enabled
[Fri Mar 13 10:19:10 2015]: No custom splash found, loading /usr/share/games/wahcade/pixmaps/wahcade-logo.png
[Fri Mar 13 10:19:10 2015]: [TWITTER] support disabled due to missing options
[Fri Mar 13 10:19:10 2015]: [TWITTER] consumer_key cannot be blank in wahcade.ini, details available at https://dev.twitter.com/
[Fri Mar 13 10:19:10 2015]: [TWITTER] consumer_secret cannot be blank in wahcade.ini, details available at https://dev.twitter.com/
[Fri Mar 13 10:19:10 2015]: [TWITTER] access_key cannot be blank in wahcade.ini, details available at https://dev.twitter.com/
[Fri Mar 13 10:19:10 2015]: [TWITTER] access_key cannot be blank in wahcade.ini, details available at https://dev.twitter.com/
[Fri Mar 13 10:19:11 2015]: Warning: history file: [~/emulators/mame/history.dat] does not exist
[Fri Mar 13 10:19:12 2015]: Selected platform: Sega Genesis
[Fri Mar 13 10:19:13 2015]: Created Video gstreamer objects
[Fri Mar 13 10:19:13 2015]: Selected gameslist: All Games
[Fri Mar 13 10:19:13 2015]: Fullscreen mode
[Fri Mar 13 10:19:14 2015]: [DEBUG] [PYGAME] init ok
[Fri Mar 13 10:19:14 2015]: [PYGAME] Joystick: Mad Catz,Inc. PS3 RF pad
[Fri Mar 13 10:19:14 2015]: [PYGAME] Device ID: 0
[Fri Mar 13 10:19:14 2015]: [PYGAME] Number of axes: 4
[Fri Mar 13 10:19:14 2015]: [PYGAME] Number of trackballs: 0
[Fri Mar 13 10:19:14 2015]: [PYGAME] Number of buttons: 13
[Fri Mar 13 10:19:14 2015]: [PYGAME] Number of hats: 1
[Fri Mar 13 10:19:14 2015]: [DEBUG] [PYGAME] Cleared pygame events