Program stack when trying to open serial port

What can mess up??

You, and the incorrect way you posted some of your code. Go read the stickies at the top of the forum - the ones you were supposed to read BEFORE you blundered in here.