--- Quote Start ---
so as far as the FSM's concern, the trigger is synchronized.
--- Quote End ---
No, the positive transition of TRIG[0] is directly evaluated by the state machine logic without previous synchronization. trig_risedge_SI is generated in combinational logic. If the transition coincides with the active clock edge, delay skew can cause an inconsistent state variable result.
--- Quote Start ---
But maybe the synthesizer is changing my binary style i will try to look into that.
--- Quote End ---
It surely does, unless you specify an encoding by synthesis attributes. Review Quartus software manual about FSM coding styles.
I can't say if the sketched problem is actually causing the observed FSM failure. But it surely can and is a "popular" fault when designing synchronous logic processing asynchronous input signals.