Main Site Documentation

Cobra II SD random errors


#1
var ps = new PersistentStorage("SD");
                ps.MountFileSystem();
                System.Threading.Thread.Sleep(1000);
                new FileStream(info.FullName, FileMode.Open);

At random time (usually when Cobra II is not running for a few days) the SD card is not readable. I found this (https://www.ghielectronics.com/community/forum/topic?id=11423).
In my case the problem was fixed when I remove and insert the SD again. It fixed the error, but a few days later it comes again. It’s nasty to do this(removing and inserting) SD every few days.
Someone else had the same problem and a possible fix?

[quote]Using mainboard GHI Electronics FEZCobra II version 1.0
Program Started
#### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (4) ####
#### Message:
#### Microsoft.SPOT.IO.NativeIO::GetAttributes [IP: 0000] ####
#### System.IO.FileStream::.ctor [IP: 005c] ####
#### System.IO.FileStream::.ctor [IP: 0010] ####
#### MatjazLib.FileUtils::LoadBitmap [IP: 001d] ####
#### LivingRoom.Program::InitDisplay [IP: 0078] ####
#### LivingRoom.Program::RunProgram [IP: 001f] ####
A first chance exception of type ‘System.NotSupportedException’ occurred in Microsoft.SPOT.IO.dll
A first chance exception of type ‘System.NotSupportedException’ occurred in System.IO.dll
An unhandled exception of type ‘System.NotSupportedException’ occurred in System.IO.dll

Uncaught exception
The thread ‘’ (0x4) has exited with code 0 (0x0).
The thread ‘’ (0x3) has exited with code 0 (0x0).[/quote]


#2

Have you trieda different SD card, different brand?


#3

does unmounting and remounting help?

does “not running for a few days” mean the board was unpowered?