Once you have ran CB as root, you need to delete or take ownership of the CB conf file(s) to get it to work when NOT using root.
Tim S.
Normally that should not be needed, because the conf-files are below "~/.config/codeblocks", so every user has an own configuration.
But running software as root is a really bad idea in general (unless somone kows exactly what he/she does and it's really needed).
You can try to delete your configuration, by deleting (or renaming) of "~/.config/codeblocks" and starting again from scratch.
But make sure codeblocks is not running, if you do so.
And start C::B from a console to see the output.