laamaa / m8c

Cross-platform M8 tracker headless client
Other
409 stars 85 forks source link

CRITICAL: Error -2 reading serial #57

Closed TonyMilton closed 2 years ago

TonyMilton commented 2 years ago

I quite often get the following error and m8c disconnects. I've managed to reproduce this when using samples, it'll happen after about 20 seconds of playback. Other times it appears out of nowhere with only using the FM synth.

Is there any way to get more information on what caused the error? I thought it might be the SD card isn't up to scratch but I'm using a Sandisk Ultra 32GB and used the SD card formatter to format it in Fat32 format.

CRITICAL: Error -2 reading serial

EDIT:

I'm using MacOS Monteray on a decent spec recent i7 with far too much ram. I'm not sure the machine is the issue though.

I'm running M8_V2_5_3B_HEADLESS

daniel214 commented 2 years ago

This usually indicates that the serial port isn't available because the USB disconnected. Unfortunately this can happen if you pull the plug or the Teensy crashes and stops responding to the host. A different SD card might be a good thing to check, and perhaps a different USB cable. Make sure you're setting the Teensy on something non-conductive and that you're not inadvertently hitting it with ESD (ie shocking it) by touching it. Note that you can transfer enough energy to reset the device even if you don't feel the shock.

Here are the libserialport error codes:

/** Return values. */
enum sp_return {
    /** Operation completed successfully. */
    SP_OK = 0,
    /** Invalid arguments were passed to the function. */
    SP_ERR_ARG = -1,
    /** A system error occurred while executing the operation. */
    SP_ERR_FAIL = -2,
    /** A memory allocation failed while executing the operation. */
    SP_ERR_MEM = -3,
    /** The requested operation is not supported by this system or device. */
    SP_ERR_SUPP = -4
};
TonyMilton commented 2 years ago

Thanks heaps for your feedback. I've tried with another cable and the symptoms persist. I've also tried with g0m8. I'm able to sequence multiple chains playing at the same time just fine with Wavesynth and Macrosynth.

As soon as I add some sampled to the SD card on my Mac and start to use the sample instrument the issue persists. Deleting the samples from the SD card does not solve the issue. I have to format the SD card and then I have a working-ish M8 headless again.

I think this must either be related to the SD card or my Mac so feel free to close this as I don't think this is an issue with m8c directly.

deathchimera commented 2 years ago

Getting the same issue on Artix Linux. M8 firmware and formatting the SD card don't appear to remedy the crashes. Using the "SanDisk 32GB Ultra microSDHC", one of the cards recommended for headless. Something to note is that after crashing qjackctl can't detect the stereo capture ("M8 Analog Stereo 1" & Built-in Audio Analog Stereo 1"), though, I'm not sure what that means. Issue persisted while on M8_V2_5_3B_HEADLESS, M8_V2_6_0_HEADLESS, m8c(1.0.3), and m8c(1.1.3). Bumping in case this is more than just a hardware problem.