Question [Q] [Help]Camera not working on custom ROM

Hello everybody, i need help! i have a s4 snapdragon version and have encountered a big problem...with original firmware(first 4.4 leaked or last italian no brand version) the camera works fine, but when i flash a custom rom (i use slimkat, but tried also cyanogenmod) the camera stop working, it,s autoclosing every time i open it...tried fix permission,wiping, fresh install...nothing!