SD Card Not Found Mystery

Try something different than the base level 16gb. Try a 32 if for nothing more than giving it a shot. I switched but only because I got them on a deal. I’ve yet to exceed 2.1 in font storage but this latest batch of SanDisc 32gb seems to work better than the 16’s I had before.

3 posts were split to a new topic: SD Card not found

Small update to this:
I’ve found another board exhibiting the issue and have gone down OSs in increments from 6.7 down to 6.4 with identical config. The error is present in all these versions. I don’t have copies of 6.3 down to 6.0 so I can’t test those, and the config in question needs 6.x so won’t run on 5.9, but thought I’d post in case this info might be useful.

1 Like

Could you try a different config?
The older 6.x versions can be found here: Releases · profezzorn/ProffieOS · GitHub

OK Prof, possible progress…

I downloaded the earlier 6.x versions from the link you posted, and ran through each one in turn with the same config.
The results were as follows:

|6.7||Fault present|
|6.6||Fault present|
|6.5||Fault present|
|6.4||Fault present|
|6.3||Fault present|
|6.2||Fault present|
|6.1||20 consecutive boots - no fault found|
|6.0||20 consecutive boots - no fault found|

Between OSs 6.7 and 6.2, the highest number of boots I got to before the fault appeared was nine, that was with 6.2. Although that might be a red herring because in that instance the SD card error sounded on the initial confirmation boot at the end of the upload, so you could say the error appeared on the first boot powered by the USB rather than the battery. The rest of the OSs typically threw the error by about five boots.

An identical 6.x-specific config was used for all tests. The config is here:

Hope it helps.

2 Likes

Very cool, thank you so much for helping out with this.
I will review the changes between 6.1 and 6.2 and see if I can find something suspicious…

3 Likes

I will retest the results of Sabersense at the weekend to confirm at my chip (sorry, my job is preventing saberlife currently…)

1 Like

Unfortunately my review didn’t find anything that looks particularly suspicious between 6.1 and 6.2. I also checked between 6.2 and 6.3, but didn’t find anything there either.

Chris, were these tests done with Mass Storage turned on or off?

Mass storage off.
The only settings I used in that regard were Serial + WebUSB.

“Unfortunately my review didn’t find anything that looks particularly suspicious between 6.1 and 6.2. I also checked between 6.2 and 6.3, but didn’t find anything there either.”

Ahh, that’s a shame. I was really hoping we might find a clue there.
Not sure what else to suggest. Can it be co-incidence that no-one seems to have had the issue with 5.9? I guess it’s possible.

I have more builds coming up so will keep an eye and will report back if anything else comes up. But as it stands, it feels like this one has defeated us all. :frowning_face:

The most likely cause for this is a buffer overflow.
Something in the code is allocating N bytes, then using N+1 bytes, and depending on what features are active, and in which order they are compiled, that one extra byte ends up overwriting something else which ends up making the the SD card not work.

The buffer overflow could be anywhere, which makes it hard to find.

The most likely cause for this is a buffer overflow.
Something in the code is allocating N bytes, then using N+1 bytes, and depending on what features are active, and in which order they are compiled, that one extra byte ends up overwriting something else which ends up making the the SD card not work.
The buffer overflow could be anywhere, which makes it hard to find.

But presumably it still must be some part of the 6.x code that’s absent from 5.9?

It’s more likely that the bug has always been there, but some difference between 5.9 and 6.7 means that in 5.9, the overflow doesn’t affect the SD card. That overflow may end up in an area which affects something else, or maybe in an area where it is harmless.

2 Likes

Sorry to say, I have just experienced the dreaded SD card error on a board loaded with OS 5.9.

Board is a brand new KR Sabers with the supplied SD card. SDtest in serial monitor gave good speed figures.

Here’s a vid:

In case it’s useful, here’s a link to my complete OS folder, as I have made some small changes to the SA22C prop folder. (There are three and they are clearly visible on lines 528, 563 and 576).

The only other change is I move the const char version[] = line to near the top of the .ino file to make it easier to keep track of upload versions as I tweak configs.

Anyway here’s the link to that:

Looks like the case continues…
:confused:

If you wait a second or two after “not found” does it work anyway?

1 Like

No. I just tried it and got almost 20 clean boots before it threw the error. But when it did and I lit the blade there was no sound.

Worth trying 4.8?

What if you go to next preset regardless of the initial spoken “not found” errors?
Does it “kick in” then and work fine?

Just tried it - this time I got the error on the first attempt!
Tried switching fonts and it just repeated the error each time I did so.
It also didn’t save the state I left it in. i.e. I switched to the third font before re-inserting the kill key, but when I booted up again, it was back on the first font. So it seems the lady isn’t lying - she really can’t see the SD card - until you re-power when she finds it again.

So weird.
:confused: