TechnicalSupport

Serial Port Write Failed


Serial Port Write Failed


Why It Is Failing

Hook of the Reaper tries to write a command to the Serial Port, up to 3 times. If all 3 writes fail, it will then display an error pop-up message. The message will tell the user that the Serial Port write failed.

The pop-up message might crash Hook of the Reaper, because Microsoft sucks. If the write fails, then Hook of the Reaper will collect failing data from Windows. The data should be formatted into a string. But sometimes the string pointer will be null or point to nowhere. When Hook of the Reaper tried to put the string into the error pop-up message, it would crash Hook of the Reaper. I started to check if the string is null, which then only crash is string point pointed to nowhere. Then in v1.1.9, I took out the failing data from Windows, so now the error pop-up message shouldn't crash Hook of the Reaper anymore. This problem was also known as, "Crash HOTR all the Time."

Debug Mode

Turn on the "Bypass Serial Port Write Checks," in the Debug section of the settings. A pop-up message will come up to warn the user, not to use this in normal playing. Then update the setting and close it. Now play the games that was giving the Serial Port write error. Play the game multiple times, to make sure. If everything works good or OK, with no errors, then it is most likely the USB. Then disable the "Bypass Serial Port Write Checks" setting, in the settings and update and close.

Check USB

If using an USB extension, then replace it or remove it. Then replay games multiple times. If no errors, then the problem is fixed. If no USB extension, then try a different USB port. The best is the ones on the back of the computer. Then replay games multiple times. If no errors, then the problem is fixed. If that doesn't fix it, can try ferrite beads on the light gun's USB cable. If it is a DYI light gun, then it might be good to open it up and check the wires and solder joints. If not an DYI, then it would be good to reach out to the manufacturer.

MameHooker worked, but Hook of the Reaper Didn't

This is because MameHooker doesn't check Serial Port writes. While Hook of the Reaper does check the writes, and retries up to 2 more times, with a total of 3 tries. It is good practice to check the writes. If something is not working right, it is better to fix it, than ignore it.