Need help with an electrical puzzle

i have had dimmer switches do crazy things, make sure the connection is clean and check it with a jumper wire ( bypassing the switch with the jumper wire ) at least it will eliminate the dimmer switch if nothing else.. good luck .. wiring sucks