It is currently Sun Apr 22, 2018 12:03 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: 5.46LTS and 5.62 code crashes at CloseSerialPort()
PostPosted: Thu Feb 08, 2018 8:24 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 3825
Location: Germany
Hi,

since I want to do some tests about RTS handshake, I discovered that CloseSerialPort() crashes the executable.
(started from the IDE) It generates an unremovable ghost task, even kill -9 has no effect.

I use this code:
Code:
If OpenSerialPort(0, "/dev/tty.usbserial", 9600, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1024, 1024)
  Debug "Success"
  CloseSerialPort(0)
Else
  Debug "Failed"
EndIf


5.46 LTS x64 and 5.62 x64 on High Sierra 10.13.3

5.61 x64 works fine.

Bernd


Last edited by infratec on Thu Feb 08, 2018 4:00 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: 5.46LTS and 5.62 code crashes at CloseSerialPort()
PostPosted: Thu Feb 08, 2018 2:25 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jun 06, 2005 2:35 pm
Posts: 1126
Location: germany
The CloseSerialPort() function needs some serial port number as parameter. So you may need to set CloseSerialPort(0)? But my compiler is complaining about the missing parameter.

If I set this to be 0, it works fine for me (PB 5.46 LTS x64 on High Sierra 10.13). But I do not have such serial adapter. I used ttys0 instead.

I do not have any issues using this code:
Code:
If OpenSerialPort(0, "/dev/ttys0", 9600, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1024, 1024)
  Debug "Success"
  CloseSerialPort(0)
Else
  Debug "Failed"
EndIf


Top
 Profile  
Reply with quote  
 Post subject: Re: 5.46LTS and 5.62 code crashes at CloseSerialPort()
PostPosted: Thu Feb 08, 2018 4:00 pm 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 3825
Location: Germany
This was only a typo. From the Mac I have no access to the internet.

So the bug is still there.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye