I2C port causes system to behave unpredictably

I2C is really not suited for long wires. Pixhawk has a slower I2C by default so it should work with longer wires.
I2C on Navio2 is less busy, it only has a barometer there.

Do you have a UART cable connected? 3DR GPS+Compass is powered only through the 6-pin UART port, not I2C 4-pin. If you only have an I2C cable connected then compass chip won’t power properly and may cause problems on the bus.