I think I have found the problem. I was sending (after the sysex message) another midi message to the channel zero (invalid channel). This may have caused a crash. I had to clean/rebuild the application and change from zero to channel one to make it work.
I prevented the app to start the MidiOut automatically, so the user must explicitly click a button to start MidiOut. Now, apparently that bug was solved.