Named serial port bug and how to contribute

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Named serial port bug and how to contribute

Ricardo Moran
Hi,

I think I found a bug with the named serial ports in windows.
I can open a named port without problem the first time but if I close it and try to open it again it fails until I restart the image. This doesn't happen with numeric ports. I could reproduce this bug in both Squeak5.2 and Pharo6.1 (both using windows 8.1). 

I think the problem is that SerialPort>>#primClosePortByName: calls the "primitiveSerialPortCloseByName" but I couldn't find this primitive anywhere in the SerialPlugin source (https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/src/plugins/SerialPlugin/SerialPlugin.c). So I'm guessing that the port is never properly closed. 

I added the missing primitive (find attached) and recompiled the vm, and now it seems to work. So my question is: how can I contribute this small fix? Should I commit to the VM Maker Inbox repository? 

Thanks,
Richo



SerialPlugin-primitiveSerialPortCloseByName.st (454 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Named serial port bug and how to contribute

Levente Uzonyi
Hi Richo,

Yes, the VMMaker Inbox is the right place for your fix.

Levente

On Thu, 29 Nov 2018, Ricardo Moran wrote:

> Hi,
>
> I think I found a bug with the named serial ports in windows.
> I can open a named port without problem the first time but if I close it and try to open it again it fails until I restart the image. This doesn't happen with numeric ports. I could reproduce this bug in both Squeak5.2 and Pharo6.1 (both using windows 8.1). 
>
> I think the problem is that SerialPort>>#primClosePortByName: calls the "primitiveSerialPortCloseByName" but I couldn't find this primitive anywhere in the SerialPlugin source (https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/src/plugins/SerialPlugin/SerialPlugin.c).
> So I'm guessing that the port is never properly closed. 
>
> I added the missing primitive (find attached) and recompiled the vm, and now it seems to work. So my question is: how can I contribute this small fix? Should I commit to the VM Maker Inbox repository? 
>
> Thanks,
> Richo
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Named serial port bug and how to contribute

Ricardo Moran
Great! Thank you, Levente!

Richo

On Sun, Dec 2, 2018 at 10:41 AM Levente Uzonyi <[hidden email]> wrote:
Hi Richo,

Yes, the VMMaker Inbox is the right place for your fix.

Levente

On Thu, 29 Nov 2018, Ricardo Moran wrote:

> Hi,
>
> I think I found a bug with the named serial ports in windows.
> I can open a named port without problem the first time but if I close it and try to open it again it fails until I restart the image. This doesn't happen with numeric ports. I could reproduce this bug in both Squeak5.2 and Pharo6.1 (both using windows 8.1). 
>
> I think the problem is that SerialPort>>#primClosePortByName: calls the "primitiveSerialPortCloseByName" but I couldn't find this primitive anywhere in the SerialPlugin source (https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/src/plugins/SerialPlugin/SerialPlugin.c).
> So I'm guessing that the port is never properly closed. 
>
> I added the missing primitive (find attached) and recompiled the vm, and now it seems to work. So my question is: how can I contribute this small fix? Should I commit to the VM Maker Inbox repository? 
>
> Thanks,
> Richo
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Named serial port bug and how to contribute

Eliot Miranda-2
In reply to this post by Ricardo Moran
Hi Richo,

   Integrated and a new plugin has been generated.  Thanks!!

_,,,^..^,,,_ (phone)

On Nov 29, 2018, at 5:25 PM, Ricardo Moran <[hidden email]> wrote:

Hi,

I think I found a bug with the named serial ports in windows.
I can open a named port without problem the first time but if I close it and try to open it again it fails until I restart the image. This doesn't happen with numeric ports. I could reproduce this bug in both Squeak5.2 and Pharo6.1 (both using windows 8.1). 

I think the problem is that SerialPort>>#primClosePortByName: calls the "primitiveSerialPortCloseByName" but I couldn't find this primitive anywhere in the SerialPlugin source (https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/src/plugins/SerialPlugin/SerialPlugin.c). So I'm guessing that the port is never properly closed. 

I added the missing primitive (find attached) and recompiled the vm, and now it seems to work. So my question is: how can I contribute this small fix? Should I commit to the VM Maker Inbox repository? 

Thanks,
Richo