Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. Android crash when app is high score menu opened

Android crash when app is high score menu opened

Scheduled Pinned Locked Moved Android
helpjavaandroid
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11326209
    wrote on last edited by
    #1

    He I am new to android programming. I tried to execute a app from one of the tutorials and it is showing runtime error. If it runs highscores menu. Application closed. Below are the error messages from logcat and the activity file. Appreciate your help. Thanks in advance. Error 12-15 03:49:51.124: I/HighScores(1115): getScores() called 12-15 03:49:51.154: I/HighScores(1115): getScores() no scores found 12-15 03:49:51.354: I/Reversi, RevHSCustAd getView called(1115): position = 0 12-15 03:49:51.444: I/Reversi, RevHSCustAd getView called(1115): position = 0 12-15 03:49:51.454: D/AndroidRuntime(1115): Shutting down VM 12-15 03:49:51.454: W/dalvikvm(1115): threadid=1: thread exiting with uncaught exception (group=0xb2a40ba8) 12-15 03:49:51.594: D/dalvikvm(1115): GC_FOR_ALLOC freed 447K, 11% free 4353K/4880K, paused 89ms, total 100ms 12-15 03:49:51.714: E/AndroidRuntime(1115): FATAL EXCEPTION: main 12-15 03:49:51.714: E/AndroidRuntime(1115): Process: uk.co.flumeland.reversi, PID: 1115 12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException 12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.AbsListView.obtainView(AbsListView.java:2263) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.measureHeightOfChildren(ListView.java:1263) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.onMeasure(ListView.java:1175) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12

    L D 2 Replies Last reply
    0
    • U User 11326209

      He I am new to android programming. I tried to execute a app from one of the tutorials and it is showing runtime error. If it runs highscores menu. Application closed. Below are the error messages from logcat and the activity file. Appreciate your help. Thanks in advance. Error 12-15 03:49:51.124: I/HighScores(1115): getScores() called 12-15 03:49:51.154: I/HighScores(1115): getScores() no scores found 12-15 03:49:51.354: I/Reversi, RevHSCustAd getView called(1115): position = 0 12-15 03:49:51.444: I/Reversi, RevHSCustAd getView called(1115): position = 0 12-15 03:49:51.454: D/AndroidRuntime(1115): Shutting down VM 12-15 03:49:51.454: W/dalvikvm(1115): threadid=1: thread exiting with uncaught exception (group=0xb2a40ba8) 12-15 03:49:51.594: D/dalvikvm(1115): GC_FOR_ALLOC freed 447K, 11% free 4353K/4880K, paused 89ms, total 100ms 12-15 03:49:51.714: E/AndroidRuntime(1115): FATAL EXCEPTION: main 12-15 03:49:51.714: E/AndroidRuntime(1115): Process: uk.co.flumeland.reversi, PID: 1115 12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException 12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.AbsListView.obtainView(AbsListView.java:2263) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.measureHeightOfChildren(ListView.java:1263) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.onMeasure(ListView.java:1175) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The error log is telling you what the problem is, and where it occurs:

      12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException
      12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68)

      Step through with your debugger and you should see what is null and why.

      U 1 Reply Last reply
      0
      • L Lost User

        The error log is telling you what the problem is, and where it occurs:

        12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException
        12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68)

        Step through with your debugger and you should see what is null and why.

        U Offline
        U Offline
        User 11326209
        wrote on last edited by
        #3

        RevHighScoreAdapter.java

        package uk.co.flumeland.reversi;

        import java.util.ArrayList;
        import java.lang.String;

        import android.app.Activity;
        import android.content.Context;
        import android.net.Uri;
        import android.util.Log;
        import android.view.LayoutInflater;
        import android.view.View;
        import android.view.ViewGroup;
        import android.widget.AdapterView;
        import android.widget.ArrayAdapter;
        import android.widget.BaseAdapter;
        import android.widget.ImageView;
        import android.widget.TextView;

        public class RevHighScoreAdapter extends ArrayAdapter {

        private Score\[\] scores;
        private Context context;
        

        // Constructor
        public RevHighScoreAdapter(Context context, Score[] score){
        super(context, 0);
        scores = score;
        this.context = context;
        }

        @Override
        public int getCount() {
            // length of list
            return scores.length;
        }
        
        @Override
        public Object getItem(int position) {
            // length of list
            return position;
        }
        
        @Override
        public long getItemId(int position) {
            return position;
        }
        
        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            View row = convertView;
            Log.i("Reversi, RevHSCustAd getView called", "position = " + position );
        
            if (row == null) {
                LayoutInflater inflater = ((Activity) context).getLayoutInflater();
                row = inflater.inflate(R.layout.high\_scores\_listview\_row, parent, false);
            }
            TextView nameTV = (TextView) row.findViewById(R.id.hs\_player\_name\_lv);
            ImageView photoIV = (ImageView) row.findViewById(R.id.hs\_player\_image\_lv);
            TextView scoreTV = (TextView) row.findViewById(R.id.hs\_score\_lv);
            Log.i("Reversi, RevHSCustAd getView called", "position = " + position );
        
            //if (scores\[position\].getPhotolink() != null) {
                //photoIV.setImageURI(Uri.parse(scores\[position\].getPhotolink()));
            //} else {
                //photoIV.setImageResource(R.drawable.social\_add\_person);
            //}
               ****nameTV.setText(scores\[position\].getName());
                Log.i("Reversi, RevHSCustAd getView called", "position = " + position );
                scoreTV.setText(String.valueOf(scores\[position\].getScore()));****
            return row;
        }
        

        }

        Error code? How do I fix it ?

        nameTV.setText(scores[position].getName());
        Log.i("Reversi, RevHSCustAd getView called&

        L 1 Reply Last reply
        0
        • U User 11326209

          RevHighScoreAdapter.java

          package uk.co.flumeland.reversi;

          import java.util.ArrayList;
          import java.lang.String;

          import android.app.Activity;
          import android.content.Context;
          import android.net.Uri;
          import android.util.Log;
          import android.view.LayoutInflater;
          import android.view.View;
          import android.view.ViewGroup;
          import android.widget.AdapterView;
          import android.widget.ArrayAdapter;
          import android.widget.BaseAdapter;
          import android.widget.ImageView;
          import android.widget.TextView;

          public class RevHighScoreAdapter extends ArrayAdapter {

          private Score\[\] scores;
          private Context context;
          

          // Constructor
          public RevHighScoreAdapter(Context context, Score[] score){
          super(context, 0);
          scores = score;
          this.context = context;
          }

          @Override
          public int getCount() {
              // length of list
              return scores.length;
          }
          
          @Override
          public Object getItem(int position) {
              // length of list
              return position;
          }
          
          @Override
          public long getItemId(int position) {
              return position;
          }
          
          @Override
          public View getView(int position, View convertView, ViewGroup parent) {
              View row = convertView;
              Log.i("Reversi, RevHSCustAd getView called", "position = " + position );
          
              if (row == null) {
                  LayoutInflater inflater = ((Activity) context).getLayoutInflater();
                  row = inflater.inflate(R.layout.high\_scores\_listview\_row, parent, false);
              }
              TextView nameTV = (TextView) row.findViewById(R.id.hs\_player\_name\_lv);
              ImageView photoIV = (ImageView) row.findViewById(R.id.hs\_player\_image\_lv);
              TextView scoreTV = (TextView) row.findViewById(R.id.hs\_score\_lv);
              Log.i("Reversi, RevHSCustAd getView called", "position = " + position );
          
              //if (scores\[position\].getPhotolink() != null) {
                  //photoIV.setImageURI(Uri.parse(scores\[position\].getPhotolink()));
              //} else {
                  //photoIV.setImageResource(R.drawable.social\_add\_person);
              //}
                 ****nameTV.setText(scores\[position\].getName());
                  Log.i("Reversi, RevHSCustAd getView called", "position = " + position );
                  scoreTV.setText(String.valueOf(scores\[position\].getScore()));****
              return row;
          }
          

          }

          Error code? How do I fix it ?

          nameTV.setText(scores[position].getName());
          Log.i("Reversi, RevHSCustAd getView called&

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Member 11360501 wrote:

          How do I fix it ?

          Fix what? You still have not explained what the error is.

          U 1 Reply Last reply
          0
          • L Lost User

            Member 11360501 wrote:

            How do I fix it ?

            Fix what? You still have not explained what the error is.

            U Offline
            U Offline
            User 11326209
            wrote on last edited by
            #5

            it is showing runtime error. If it runs highscores menu. Application closed. Error Log

            12-15 03:49:51.124: I/HighScores(1115): getScores() called
            12-15 03:49:51.154: I/HighScores(1115): getScores() no scores found
            12-15 03:49:51.354: I/Reversi, RevHSCustAd getView called(1115): position = 0
            12-15 03:49:51.444: I/Reversi, RevHSCustAd getView called(1115): position = 0
            12-15 03:49:51.454: D/AndroidRuntime(1115): Shutting down VM
            12-15 03:49:51.454: W/dalvikvm(1115): threadid=1: thread exiting with uncaught exception (group=0xb2a40ba8)
            12-15 03:49:51.594: D/dalvikvm(1115): GC_FOR_ALLOC freed 447K, 11% free 4353K/4880K, paused 89ms, total 100ms
            12-15 03:49:51.714: E/AndroidRuntime(1115): FATAL EXCEPTION: main
            12-15 03:49:51.714: E/AndroidRuntime(1115): Process: uk.co.flumeland.reversi, PID: 1115
            12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException
            12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.AbsListView.obtainView(AbsListView.java:2263)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.onMeasure(ListView.java:1175)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
            12-15 03:49:51.714: E/AndroidRuntime(1115): at com.

            L G 2 Replies Last reply
            0
            • U User 11326209

              it is showing runtime error. If it runs highscores menu. Application closed. Error Log

              12-15 03:49:51.124: I/HighScores(1115): getScores() called
              12-15 03:49:51.154: I/HighScores(1115): getScores() no scores found
              12-15 03:49:51.354: I/Reversi, RevHSCustAd getView called(1115): position = 0
              12-15 03:49:51.444: I/Reversi, RevHSCustAd getView called(1115): position = 0
              12-15 03:49:51.454: D/AndroidRuntime(1115): Shutting down VM
              12-15 03:49:51.454: W/dalvikvm(1115): threadid=1: thread exiting with uncaught exception (group=0xb2a40ba8)
              12-15 03:49:51.594: D/dalvikvm(1115): GC_FOR_ALLOC freed 447K, 11% free 4353K/4880K, paused 89ms, total 100ms
              12-15 03:49:51.714: E/AndroidRuntime(1115): FATAL EXCEPTION: main
              12-15 03:49:51.714: E/AndroidRuntime(1115): Process: uk.co.flumeland.reversi, PID: 1115
              12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException
              12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.AbsListView.obtainView(AbsListView.java:2263)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.onMeasure(ListView.java:1175)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
              12-15 03:49:51.714: E/AndroidRuntime(1115): at com.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              It is no use repeatedly posting the same data. I already explained that you need to use your debugger to trap where the error occurs and establish which variable is the null pointer, and what it is supposed to refer to.

              U 1 Reply Last reply
              0
              • L Lost User

                It is no use repeatedly posting the same data. I already explained that you need to use your debugger to trap where the error occurs and establish which variable is the null pointer, and what it is supposed to refer to.

                U Offline
                U Offline
                User 11326209
                wrote on last edited by
                #7

                thanks I will use debugger I sent information you

                1 Reply Last reply
                0
                • U User 11326209

                  He I am new to android programming. I tried to execute a app from one of the tutorials and it is showing runtime error. If it runs highscores menu. Application closed. Below are the error messages from logcat and the activity file. Appreciate your help. Thanks in advance. Error 12-15 03:49:51.124: I/HighScores(1115): getScores() called 12-15 03:49:51.154: I/HighScores(1115): getScores() no scores found 12-15 03:49:51.354: I/Reversi, RevHSCustAd getView called(1115): position = 0 12-15 03:49:51.444: I/Reversi, RevHSCustAd getView called(1115): position = 0 12-15 03:49:51.454: D/AndroidRuntime(1115): Shutting down VM 12-15 03:49:51.454: W/dalvikvm(1115): threadid=1: thread exiting with uncaught exception (group=0xb2a40ba8) 12-15 03:49:51.594: D/dalvikvm(1115): GC_FOR_ALLOC freed 447K, 11% free 4353K/4880K, paused 89ms, total 100ms 12-15 03:49:51.714: E/AndroidRuntime(1115): FATAL EXCEPTION: main 12-15 03:49:51.714: E/AndroidRuntime(1115): Process: uk.co.flumeland.reversi, PID: 1115 12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException 12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.AbsListView.obtainView(AbsListView.java:2263) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.measureHeightOfChildren(ListView.java:1263) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.onMeasure(ListView.java:1175) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) 12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497) 12

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  Look at line 68 of RevHighScoreAdapter.java.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  1 Reply Last reply
                  0
                  • U User 11326209

                    it is showing runtime error. If it runs highscores menu. Application closed. Error Log

                    12-15 03:49:51.124: I/HighScores(1115): getScores() called
                    12-15 03:49:51.154: I/HighScores(1115): getScores() no scores found
                    12-15 03:49:51.354: I/Reversi, RevHSCustAd getView called(1115): position = 0
                    12-15 03:49:51.444: I/Reversi, RevHSCustAd getView called(1115): position = 0
                    12-15 03:49:51.454: D/AndroidRuntime(1115): Shutting down VM
                    12-15 03:49:51.454: W/dalvikvm(1115): threadid=1: thread exiting with uncaught exception (group=0xb2a40ba8)
                    12-15 03:49:51.594: D/dalvikvm(1115): GC_FOR_ALLOC freed 447K, 11% free 4353K/4880K, paused 89ms, total 100ms
                    12-15 03:49:51.714: E/AndroidRuntime(1115): FATAL EXCEPTION: main
                    12-15 03:49:51.714: E/AndroidRuntime(1115): Process: uk.co.flumeland.reversi, PID: 1115
                    12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.AbsListView.obtainView(AbsListView.java:2263)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.ListView.onMeasure(ListView.java:1175)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.View.measure(View.java:16497)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
                    12-15 03:49:51.714: E/AndroidRuntime(1115): at com.

                    G Offline
                    G Offline
                    Gonzoox
                    wrote on last edited by
                    #9

                    This is your error

                    12-15 03:49:51.124: I/HighScores(1115): getScores() called
                    12-15 03:49:51.154: I/HighScores(1115): getScores() no scores found

                    So because is not finding any scores, it is returning a null value that is not handled

                    12-15 03:49:51.714: E/AndroidRuntime(1115): at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68)

                    so just adding some error handling will fix your problem, easy

                    I want to die like my grandfather- asleep, not like the passengers in his car, screaming!

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups