Main Site Documentation

Problem on SD card after update


#1

This is the error, code was working before the update firmware to 4.2, Suggests???
File already exists in the card but wih old firmware here was no problem.

Ideas


string rootDirectory = VolumeInfo.GetVolumes()[0].RootDirectory;
            FileStream fs = new FileStream(rootDirectory +
                     @ "\Setting.txt", FileMode.Create, FileAccess.ReadWrite);


Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (5)

#### Message: 
#### MB16AW.Program::LoadSetting [IP: 004a] ####
#### MB16AW.Program::RemovableMedia_Insert [IP: 0074] ####
#### Microsoft.SPOT.IO.RemovableMedia::MessageHandler [IP: 0041] ####

Eccezione first-chance di tipo ‘System.NullReferenceException’ in EMX Application.exe
System.NullReferenceException
#### Exception System.IO.IOException - CLR_E_UNAUTHORIZED_ACCESS (5) ####
#### Message:
#### System.IO.FileSystemManager::AddToOpenList [IP: 007e] ####
#### System.IO.FileStream::.ctor [IP: 0052] ####
#### System.IO.FileStream::.ctor [IP: 0009] ####
#### MB16AW.Program::SaveSetting [IP: 0022] ####
#### MB16AW.Program::LoadSetting [IP: 0251] ####
#### MB16AW.Program::RemovableMedia_Insert [IP: 0074] ####
#### Microsoft.SPOT.IO.RemovableMedia::MessageHandler [IP: 0041] ####
Eccezione first-chance di tipo ‘System.IO.IOException’ in Microsoft.SPOT.IO.dll
Eccezione non gestita di tipo ‘System.IO.IOException’ in Microsoft.SPOT.IO.dll


#2

Are you sure that the card is properly mounted?
Does RootDirectory variable contains something good?


#3

Root contains files and when I mount it I can read it.
Ideas???


#4

Problem solved, file was readable just from linux it was damaged.
Tks


#5

Ok so does this mean that you other post is solved? (the one with downgrading?)

Do you solve the issue just by formatting you sdcard?