spice2x / spice2x.github.io

🌶️ spice2x is a spicier fork of SpiceTools with hundreds of bug fixes and new features 🌶️
https://spice2x.github.io/
GNU General Public License v3.0
116 stars 2 forks source link

(card reader) COM port not closed correctly leading to acces denied on next boot #224

Closed ThatzOkay closed 1 month ago

ThatzOkay commented 1 month ago

Game and version

SDVX Exceed Gear

Version of spice2x

2024-08-24

Laptop

Nope

Describe the issue

First time i start the game after boot it opens the Reader correctly and initializes it. Then i close the game using f4 overlay start it up again. Now spice is saying COM10 Acces denied. Serial handle no longer valid

Attached log.txt file, if available

log.txt

sp2xdev commented 1 month ago

All spice is doing is opening a file handle via CreateFileA/W on the COM port. When the process dies, all file handles would be cleaned up by the OS, even if spice somehow doesn't end up closing them (e.g., if the game crashes, or if the user forcibly terminates)

Maybe double check if the old game process is fully closed. You can also use things like Process Explorer to see who is holding a handle open on the COM port.

Other than that, it seems unlikely this is a bug in spice.