[mono-android] Crash in Release Mode
was
skylogdev at btconnect.com
Sat Dec 24 07:38:08 EST 2011
The following code to copy a db asset to the following folder:
dbPath =
Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
"skylogpro.db");
bool exists = File.Exists(dbPath);
if (!exists)
{
// File.Delete(dbPath);
copyAssetDataBase();
//utilities.AlertMsg("Here", this);
}
private void copyAssetDataBase()
{
//Open your local db as the input stream
Stream myInput = Assets.Open(@"skylogpro.db");
// Path to the just created empty db
string outFileName = dbPath;
//Open the empty db as the output stream
Stream myOutput = new FileStream(outFileName,
FileMode.OpenOrCreate);
//transfer bytes from the inputfile to the outputfile
byte[] buffer = new byte[1024];
int b = buffer.Length;
int length;
while ((length = myInput.Read(buffer, 0, b)) > 0)
{
myOutput.Write(buffer, 0, length);
}
//Close the streams
myOutput.Flush();
myOutput.Close();
myInput.Close();
}
has worked for many months. However, today it crashes (with no error
messages) the app in the emulator in Release mode, but works ok in Debug
mode. I was using MfA 4.0.1, but I have gone back to MfA V1.2.0 - but no
difference. Any ideas?
Regards...Andrew
--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/Crash-in-Release-Mode-tp5099176p5099176.html
Sent from the Mono for Android mailing list archive at Nabble.com.
More information about the Monodroid
mailing list