Random complete loss of database on Droid only

by Jonas Petersson » Thu, 22 Apr 2010 14:20:34 GMT


Sponsored Links
 (long)time(!C);  // ;-)




I have no real clue to offer, but I can say that my Milestone (which is 
pretty much the same as a Droid) has had no problems what so ever with 
your app. The initial 2.0 had plenty of other issues of which most were 
fixed in 2.0.1. Mine is UK registered so I've not got my 2.1 yet (should 
be any day now since I can see FR and ES users already have it).


My main remaining issue with the Milestone is that it will occasionally 
hang or reboot, typically either while playing Bebbled or just after 
I've used the debugger and unplugged (while the debugger was still 
active). I guess such a crash COULD break your database if it is being 
written to at the time.


                        Best / Jonas

--



Random complete loss of database on Droid only

by Chander Pechetty » Thu, 22 Apr 2010 15:02:13 GMT


 Interesting, I had filed an issue earlier with my G1 crashing
occasionally when playing bebbled; wonder if they are related ( to
cosmic rays :-)

 http://code.google.com/p/android/issues/detail?id=6478 

There is a lengthy discussion on loss of database at


Sponsored Links


Other Threads

1. Problem :can't read a file, can't comunicate with a server

Hi guys, I've some problems:

1)first I'm not able to read  a file:(
2)second seems that my code that have to simulate a Client can't
connect to my server.
maybe I'm wrong something, Ip address(I think it is right)? I have set
the virtual device on port 5554 (the default)..I need to redirect the
host port?
this is my code:


;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import java.io.*;
import java.net.*;
import java.util.NoSuchElementException;
import java.util.Scanner;



public class C extends Activity {
    /** Called when the activity is first created. */
        private PrintWriter savedpoint;
        private Context context = this;


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        try{

        savedpoint = new PrintWriter(openFileOutput
("Data.dat",MODE_APPEND));


        for(int i=0;i<20;i++)//scrive coordinate
        {
                savedpoint.println(-78.443221+"i"+" "+120.344423+"i");

        }

        F thread=new F(getFilesDir(),this);
        thread.start();

        }catch (FileNotFoundException e) {
                        e.printStackTrace();
                }
    }
}

//thread that have to acess to the server
class F extends Thread{
        File directory;
        Context context;

        private final static String host = "10.0.2.2";
        private final static int port = 2120;


        F(File directory,Context context)
{this.directory=directory;this.context=context;}
        public void run()
        {

                try{

                Socket socket = null;
                PrintWriter out = null;
                InetAddress ip = InetAddress.getByName(host);
                socket = new Socket(ip,port);       ----->SEEMS THERE IS NO
CONNECTIONS, BECAUSE THE SERVER DOESN'T SIGN ANYTHING
                out = new PrintWriter( new BufferedWriter( new 
OutputStreamWriter
(socket.getOutputStream())),true);
                Scanner s=new Scanner(directory+"Data.dat");     ---> The right 
way?

                try {
                        while (true) {

                                String l = s.nextLine();    ---->ERROR
                                out.println(l);
                        }
                } catch (NoSuchElementException e) {s.close();
                out.println("*");
                }//catch(FileNotFoundException e){}
                } catch (UnknownHostException e) {
                        e.printStackTrace();
                } catch (IOException e) {
                        e.printStackTrace();}
}
}

the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="prova.client"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".C"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="3" />
</manifest>


thanks in advance for any help..

--~--~---------~--~----~------------~-------~--~----~

2. Failed to find provider info for com.google.settings

Hi!

I was looking in the forum but couldnt find any useful information
regarding my error. I just wanted to implement the map-example /
tutorial but if i start the map-activity, i get..

Failed to find provider info for com.google.settings

07-27 16:55:24.917: ERROR/ActivityThread(854): Failed to find provider
info for com.google.settings
07-27 16:55:25.077: DEBUG/AndroidRuntime(854): Shutting down VM
07-27 16:55:25.087: WARN/dalvikvm(854): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
07-27 16:55:25.087: ERROR/AndroidRuntime(854): Uncaught handler:
thread main exiting due to uncaught exception
07-27 16:55:25.126: ERROR/AndroidRuntime(854):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.airwriting.mobile.android/
com.airwriting.mobile.android.activity.helper.map.Map}:
java.lang.NullPointerException
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.os.Handler.dispatchMessage(Handler.java:99)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.os.Looper.loop(Looper.java:123)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
java.lang.reflect.Method.invokeNative(Native Method)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
java.lang.reflect.Method.invoke(Method.java:521)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
dalvik.system.NativeStart.main(Native Method)
07-27 16:55:25.126: ERROR/AndroidRuntime(854): Caused by:
java.lang.NullPointerException
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
com.airwriting.mobile.android.activity.helper.map.Map.onCreate
(Map.java:19)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
07-27 16:55:25.126: ERROR/AndroidRuntime(854):     ... 11 more

--~--~---------~--~----~------------~-------~--~----~

3. Android on Motorola A810?

4. Using custom _init and _fini on Android ARM

5. dirent64 is missing in bionic/libc/kernel/common/linux/dirent.

6. MPEG2 TS + HTTP Live Streaming Support on Android

7. the mediaplayer with mediacontroller issue