Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Odd Android error: **** ERROR unknown type 0x73736572 (glSizeof,72)

Tags:

android

I'm facing a super weird situation and to be honest I will start crying soon.

I have created a view - displaying an admob banner at the bottom. For me everything seems ok, but I noticed that

  1. it takes a long time to diplay the activity
  2. There is a strange errors looping all over the logcat console.

Here the errors(repeating hundred times):

03-30 14:16:14.052: E/eglCodecCommon(999): glUtilsParamSize: unknow param 0x00000b44
03-30 14:16:14.122: E/eglCodecCommon(999): glUtilsParamSize: unknow param 0x00000bd0
03-30 14:16:14.252: E/eglCodecCommon(999): **** ERROR unknown type 0x73736572 (glSizeof,72)

When I press the back button and I'm out of the activity, everything stops.

Here is my layout:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".AllJokes" 
    android:background="@drawable/background"
    android:id="@+id/allJokesLo">

    <ListView
              android:id="@+id/allJokesList"
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:gravity="center">
    </ListView>


    <com.google.android.gms.ads.AdView android:id="@+id/adView"

              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:gravity="center_vertical"
              ads:adUnitId="ca-app-pub-code/code"
              ads:adSize="BANNER"
    />

</LinearLayout>

And here is the java part:

public class AllJokes extends Activity {

    public static ArrayAdapter<String> adapter;
    public static ListView listView;
     private AdView adView;

      /* Your ad unit id. Replace with your actual ad unit id. */
      private static final String AD_UNIT_ID = "ca-app-pub-code/code";

    @SuppressLint("NewApi")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_all_jokes);        

        adView = new AdView(this);
        adView.setAdSize(AdSize.BANNER);
        adView.setAdUnitId(AD_UNIT_ID);

        // Add the AdView to the view hierarchy. The view will have no size
        // until the ad is loaded.
        final ViewGroup adViewContainer = (ViewGroup) findViewById(R.id.adView);
        adViewContainer.addView(adView);

        // Create an ad request. Check logcat output for the hashed device ID to
        // get test ads on a physical device.
        AdRequest adRequest = new AdRequest.Builder()
          .addTestDevice("B3EEABB8EE11C2BE770B684D95219ECB")
            .build();

        // Start loading the ad in the background.
        adView.loadAd(adRequest);

        final GlobalsHolder globals = (GlobalsHolder)getApplication();
            new loadJson().execute();
        adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, new ArrayList<String>());
        adapter.clear();
        adapter.addAll(globals.getMyStringArray());

        listView = (ListView) findViewById(R.id.allJokesList);
        listView.setAdapter(adapter);
        listView.setBackgroundColor(Color.WHITE);

        listView.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                globals.setClickedJokeName((String) ((TextView) view).getText());
                openJokeBody(view);

                globals.setClickedPosition(position);

                // When clicked, shows a toast with the TextView text
                Toast.makeText(getApplicationContext(),
                ((TextView) view).getText(), Toast.LENGTH_SHORT).show();
            }
        });

    }
     @Override
      public void onResume() {
        super.onResume();
        if (adView != null) {
          adView.resume();
        }
      }

      @Override
      public void onPause() {
        if (adView != null) {
          adView.pause();
        }
        super.onPause();
      }

      /** Called before the activity is destroyed. */
      @Override
      public void onDestroy() {
        // Destroy the AdView.
        if (adView != null) {
          adView.destroy();
        }
        super.onDestroy();
      }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.all_jokes, menu);
        return true;
    }

    public class loadJson extends AsyncTask<Void, Integer, String[]>{

        private ProgressDialog Dialog = new ProgressDialog(AllJokes.this);

        @Override
        protected void onPreExecute()
        {
            Dialog.setMessage("Fetching the latest jokes!");
            Dialog.show();
        }

        @Override
        protected String[] doInBackground(Void... params) {
            /*Getting the joke names JSON string response from the server*/
            URL u;
            StringBuffer buffer = new StringBuffer();
            StringBuffer buffer2 = new StringBuffer();
            try {
                u = new URL("https://site.com/android/Jokes/showJokes.php?JokeCat=allJokes");
                URLConnection conn = u.openConnection();
                BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));

                String inputLine;
                while ((inputLine = in.readLine()) != null) 
                    buffer.append(inputLine);
                in.close();         
            }catch(Exception e){
                e.printStackTrace();
            }
            try {
                u = new URL("https://site.com/android/britishJokes/JokesBody.php?JokeCat=allJokes");
                URLConnection conn = u.openConnection();
                BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));

                String inputLine;
                while ((inputLine = in.readLine()) != null) 
                    buffer2.append(inputLine);
                in.close();         
            }catch(Exception e){
                e.printStackTrace();
            }
//          return buffer.toString(); ako se naloji da vurna - da pogledna tva return4e
            return new String[]{buffer.toString(), buffer2.toString()};
        }

        @SuppressLint("NewApi")
        protected void onPostExecute(String[] buffer) {
            final GlobalsHolder globals = (GlobalsHolder)getApplication();
            JSONArray jsonArray = new JSONArray();
            JSONArray jsonArray1 = new JSONArray();
            try {
                jsonArray = new JSONArray(buffer[0]);
                jsonArray1 = new JSONArray(buffer[1]);
            } catch (JSONException e) {
                e.printStackTrace();
            }           
       /*Looping trough the results and adding them to a list*/
        ArrayList<String> list = new ArrayList<String>();     
        ArrayList<String> list1 = new ArrayList<String>();   
        if (jsonArray != null) { 
           int len = jsonArray.length();
           for (int i=0;i<len;i++){ 
            try {
                list.add(jsonArray.get(i).toString());
                globals.setJokeNamesList(list);
            } catch (JSONException e) {
                e.printStackTrace();
            }
          } 
        }

        if (jsonArray != null) { 
               int len = jsonArray1.length();
               for (int i=0;i<len;i++){ 
                try {
                    list1.add(jsonArray1.get(i).toString());
                    globals.setList(list1);
                } catch (JSONException e) {
                    e.printStackTrace();
                }
              } 
            } 
           /* Redrwawing the view */
             adapter.clear();
             adapter.addAll(list);      
             Dialog.dismiss();
             globals.setLoaded(true);
         }

    }

    /*This method opens the new activity - TopJokesBody when a joke name from the list is clicked*/
    public void openJokeBody(View view) {
        Intent intent = new Intent(this, AllJokesBody.class);
        startActivity(intent);
    }   

}

Here is a screenshot: enter image description here

Have you ever faced the same issue? I really can't spot my mistake, even if it is a small one.

Please, give me a clue!

like image 739
chility Avatar asked Mar 30 '14 18:03

chility


1 Answers

Regarding your second question: It's not your app, it's the emulator. I think you're using hardware (video) acceleration?

Don't worry about it, you can filter these messages so that they don't appear in logcat. More information can be found in this post: PhoneGap Eclipse Issue - eglCodecCommon glUtilsParamSize: unknow param errors

like image 95
Alex Butter Avatar answered Oct 05 '22 08:10

Alex Butter