Possible SD card issue

Awesome I’ll try that thank you for all you help and your quick responses.

So basically it doesn’t matter how much is actually on the board memory config, too many fonts on the SD is just too many fonts on the SD?

Basically.
However, there are things you can do to improve it, which is to put fonts in subdirectories. And use 8-character directory names.

If you create 16 subdirectories, and put 16 fonts in each, then they should all be equally fast/slow. Assuming that your SD card is fast enough for putting fonts in subdirectories, you can have at least 256 fonts.

I think it’s weird that 40 fonts is enough to make it bad though.
My math says that 40 fonts ought to be about as slow as a single subdirectory, and I have had fonts in subdirectories on some of my sabers with no problems.

Again, sdtest is your friend. sdtest will give you numbers instead of speculation.

1 Like

Thanks! Will fonts automatically be slower in a subdirectory? Can I leave my most used 16 on the base level of the SD for speed and then put others into subdirectories like “light side” and “dark side” etc?

tack så mycket!!!
(I have an uncle whose lived in Gotëborg for over 25 years, I love a kräftskiva!)

“automatically” might not be the word I would choose, but yes.
The actual arrangement of fonts gets a bit interesting, because the second block of the root directory should be about as fast as a subdirectory, so you could arrange your fonts like:

SUBDIR/fontXX/
fontYY
fontZZ

YY would be 15 fonts that would be the fastests.
ZZ would be up to 16 fonts
XX would be up to 16 fonts

The XX fonts and the ZZ fonts would be about equally “slow” I think.

But see here is where I get confused. You have 40 fonts, and at least 32 of those ought to be fast enough already, and I wouldn’t expect the last 8 to be so slow that it really matters either.

Of course, the math changes a bit if you use long file names. (longer than 8 characters.)

Thank you, just to be clear I’ll put a folder on the root titled fontYY and fonts in that folder?

Then fontZZ? Sorry I’m not super literate in the programming.

“fontYY” was meant to mean “font01”, “font02”, etc.
Although any directory names will work as long as they shorter than 8 characters and only use A-Z and 0-9.

Ok I follow thank you I’ll try on another SD, I’ll try to run the Arduino sdtest when I get a chance. Battery in and and micro USB that permits data regardless of charging?

Ok so just removed a ton of fonts, set everything back up with three different subdirectories, 15 fonts on the root and 10 or less in each subdirectory, and placed on brand new Kingston 32gb 100 mb/s SD. Everything seemed fine then about half way through all fonts, on Tusken Terminator it starts crackling then the board crashes and the blade locks on a silent static blade.

I’m not sure I have a safe cable for sdtest in Arduino, so I haven’t done that. I will when I know I have a safe cable, but is it possible that 3 of 3 sd cards are bad?

Could there be something in that font that is corrupting the board or the SD?

Sorry I know I’ve been a squeaky wheel.

Is it always this font that causes problems, or is it just because it happened to be font number X?

It’s weird that the board crashes though. It’s not supposed to do that, even if the sd card is slow. When it crashes, does the sound continue? Or do you get silence? Or squee-of-death?

This question doesn’t make sense to me.
What do you mean by a “safe cable”?

Normally, I would think it would be very unlikely that 3 out of 3 sd cards would not work well, but when you push the cards by putting more fonts on it, the likelyhood of the cards being “bad enough” goes up. Although this really does seem like maybe something else is going on. The only way to be sure is to try different experiments and see what happens though.

When you removed the fonts, did you format the card in between?

So, if the board crashes while it’s trying to save something, then there is every possibility of corrupting the SD card. These corruptions might be minor and resolvable, but they still cause problems when proffieOS tries to read the card sometimes. ProffieOS 7 should be better at this stuff.

No worries, as long as you’re willing to put in the work to try different things, I’m willing to help you try them. :slight_smile:

So I was noticing cracking in between smooth swings and accents, for example on Rogue Vader I could do a smooth swing and then every time I stop the blade there would be a crackle at the end of the smooth swing.wav file playing.

So everything was good then on Tusken Terminator in between swings I noticed the crackle then there’s “squee-of-death” the the blade animation freezes and it’s silent on a static blade until I remove the battery. This is on my newest setup just this evening, before it was on several fonts. Once it happened once this evening i stopped using it.

By “safe cable” I guess I’m just ignorant to the truth about having a data only usb cable as not to fry the board when plugging into a computer.

I removed 13 fonts from a copy of my saber sd card files on my computer so there’s 33 fonts, plus the common folder, and I put 15 on the root and the others in 3 different subdirectories. I had everything set up how I wanted it in a file on my computer that simulates my SD as a backup, then inserted a brand new SD, ensured the SD was in the 32FAT format (which was default) then pasted everything at once onto the SD.

Unless the cable was made maliciously, it should alway be safe to plug the board into your computer.

A slow sd card should not be able to cause that. That means there is something else going on here. Corrupt files on the SD cards could possibly cause that, but slow sd cards should not. You are using “remove safely” when moving files to the sd card, right?

If you have more than 16 directores in the root, and you care about making some of them faster than others, then you need to paste those first. Note that “common” and “tracks” also count.

However, we should probably focus on the crashes and fix any slowness afterwards…

For remove safely, I have a Mac so I select “Eject SD” before removing.

Where should I go from here? Re-download fonts from that font maker’s dropbox for fonts that I fear could be issues?

To run sdtest leave battery in, select a font and do sdtest? Then select next font and continue?

Thanks

I was able to capture a crash on video. I know it’s on Tusken Terminator but it happened on the green font initially. You can see the delay in animations for blasters before the crash.

Sorry, I didn’t realize how loud I was breathing lol

That doesn’t seem like a squee-of-death, although I suppose it could be if it wasn’t playing anything when it happened.

Crashes can be tricky to find, because almost anything could be causing them.
If it’s a font problem, then it would be fairly consistent though, basically whenever it would try to play a particular file, it would crash. Of course, we normally select a file at random for each effect, so it can still be difficult to get it to do it consistently.

If it seems to be caused by a particular effect in a particular font, it might still not be the files themselves that are bad, but it could be corruption or slowness on the SD card which is causing it. A good way to test that is to rename the old font directory (don’t delete it!) and then upload the font again. If there was any corruption or bad sectors on the SD card, those will now be in the old font directory, not the new one. (Assuming the SD card is mostly fine.)

However, it could also be something completely different. Like maybe it’s running out of memory or something. Testing that means re-programming the proffieboard with simpler styles and see if that works better. (But with the same fonts.)

Ok thanks,
It’s done the squee before just not that particular time. I’ll try flashing the board it will be my first time so fingers crossed.

One more thought, could the board just be overwhelmed if there are 25 plus different blade styles, especially if some are reasonable complex?

If you can fit it in memory, there’s no overloading or overtaxing the board really. 99.9999% full memory should perform the same as 52%.
I think. :slight_smile:

No,
Well, mostly no…
So there are two types of memory in a Proffieboard (three if you count the SD card.) When it comes to FLASH memory, it’s all or nothing. Either if fits, and it works perfectly, or it doesn’t.

Then there is RAM, which is used for everything that is temporary while the program is running, and it’s not quite so simple as the flash memory. For one thing, you won’t find out if you use too much ram until you actually try to do something, and depending on where it runs out of ram first, the consequences might be crashes, glitches, or nothing.

Another complication with RAM is something called “fragmentation”. Fragmentation occurs because already allocated memory cannot be moved. So let’s say you have 10kb of memory. You can allocate 7kb just fine. Now you have 3kb left. Let’s allocate one more kb. Now there are 2 kb left. If we free the 7kb allocation and try to allocate 8kb. Even though there is 9kb available, we cannot allocate 8kb, because there is a 1kb allocation sort of in the middle of our 10kb block.

Large styles use a good chunk of RAM, especially if you have sparkle or fire in them, and if there is any fragmentation in the memory, it may become impossible to run these styles after flipping through your presets for a while. ProffieOS tries pretty hard to avoid fragmentation, but it doesn’t always work, and so these sort of problems can occur.

If your styles are big enough to cause these sort of problems, replacing them with simpler styles should fix the problem of course.

1 Like

I plan on simplifying some styles.

What do you mean by flipping through styles? once activating multiple styles throughout your config it can bog down the RAM?

How do your reset the “flip through” when you remove the battery or after that board is idle or unused for a bit?

I just mean going from one preset to the next.

Removing the battery will reset it. Waiting will not.