It looks like the crash on exit when a controller is connected is caused by the call to SDL_JoystickClose. It's completely unclear to me why this would be, because the pointer itself is valid, and the joystick is working just fine. I've disabled this part of the code, since it's only called when exiting RetroFE. This does not appear to give any new problems, but let me know if you encounter any.
The new code is in bit bucket, and will be included in the next release.