paulober / MicroPico

MicroPico (aka Pico-W-Go) is a Visual Studio Code extension designed to simplify and speed up the development of MicroPython projects for the Raspberry Pi Pico and Pico W boards.
https://marketplace.visualstudio.com/items?itemName=paulober.pico-w-go
Mozilla Public License 2.0
266 stars 25 forks source link

MicroPico disconnect won't free serial port #207

Open Prototype-Laboratory opened 6 months ago

Prototype-Laboratory commented 6 months ago

What are the steps to reproduce this issue?

  1. open VSCode and connect with the MicroPico extension to the Raspberry Pi Pico
  2. disconnect by pressing the "toggle board connection" button or by using the MicroPico Command "Disconnect"
  3. open another serial monitor and try to connect to the Raspberry Pi Pico (won't work)

What happens?

Even if I disconnect the Raspberry Pi Pico, the tty port is still occupied by the extension, so using another serial monitor to connect to the Pico won't work

What were you expecting to happen?

Release the serial port after pressing the "toggle board connection" button to disconnect the Pico.

Any other comments?

Which version of MicroPico are you using?

3.7.5

Support info

Copy this from the Help -> Info/About -> Copy (Code -> About Visual Studio Code -> Copy on macOS) option in Visual Studio Code:

Version: 1.87.0
Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2
Datum: 2024-02-27T23:42:16.599Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
Betriebssystem: Linux x64 6.6.16-2-MANJARO
jkozniewski commented 6 months ago

hi - I guess it's related to https://github.com/paulober/MicroPico/issues/197

@Prototype-Laboratory are you on Mac platform (intel / silicon) ?

@paulober - any chance to look into this ? seems it's pretty common issue already raised in three related issues and it makes working with pico almost impossible, let me know is you need any additional debug data apart from what I've provided in https://github.com/paulober/MicroPico/issues/197

Prototype-Laboratory commented 6 months ago

No, it's an ordinary PC with Linux

Operating System: Manjaro Linux KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.12 Kernel Version: 6.6.19-1-MANJARO (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics Memory: 27.1 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: LENOVO Product Name: 21K4S02000 System Version: ThinkPad T14 Gen 4

chrfwow commented 2 months ago

I am having a similar issue. Connecting to my Raspberry Pi Pico does not work. However, the port does not seem to remain occupied after I close VSCode, but I still cannot connect to its COM Port. When trying to connect to the COM Port from a Java application using jSSC, I get a Port Busy exception when VSCode is opened (as expected), but when VSCode is closed, I get the following error message:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=21592, tid=22632
#
# JRE version: OpenJDK Runtime Environment (17.0+35) (build 17+35-2724)
# Java VM: OpenJDK 64-Bit Server VM (17+35-2724, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C  [jSSC-2.8_x86_64.dll+0xb5db]

I also cannot connect the Serial Monitor inside VSCode, or using rshell via WSL.

The errors occur both on my desktop pc and my laptop, with both running Windows 10