Hi all - I have a similar problem - I get the same error message on MAME.
I adjust the keyboard settings which act as my arcade controls & it works fine when I'm in the game but as soon as I exit it crashes (80% of the time) & the other 20% of the time it will crash on re-entry into the game.
I can't find much info on this error & am at a loss to fix it!???
Any insight would be much appreciated as this is killing my arcade dream at the final hurdle after man many hours building the thing!
I have no Xbox controller - I am merely adjusting the keyboard settings