At joystick_st->button[joystick_ev->number] = joystick_ev->value, which suggest that joystick_ev->number is out of bounds for joystick_st->axis but not sure why. Should probably add an extra check there. Need to install QtCreator and then debug this carefully. If you can make Teamviewer available I can login remotely to investigate more.
Please don't post teamviewer details in the public forum!! Send an email to This email address is being protected from spambots. You need JavaScript enabled to view it. with the details.