The cannabis is not 'causing' the problem.
It is a warning sign.
If you pass out or get vertigo (the 'spins') after smoking cannabis, you should go see a doctor right away, and have your blood sugar and pressure checked. You may have a REAL problem, not related to cannabis use.