Question

after adding a class to my app that animates my bitmaps, they would no longer appear on galaxy s3 or s2 phones, but would appear on s4 regardless of os version.

tests:

s4 os version 4.3 - works.

s4 os version 4.2.2 - works.

s3 os version 4.2.2 - fails.

s3 os version 4.1.1 - fails.

s2 os version 4.2.2 - fails.

when going through and debugging i noticed none of the methods in the ondraw method were executing for some reason, but loops and if statements were still being read.

EDIT: upon reverting the addition of the animation class, the game works on s3 again, but i need that class in order to animate my sprites. I'm going to run more tests.

EDIT2: I tried just changing "bullet" back from bitmap to animation. acts as normal until the canvas tries to draw the bullet. at that point any updates to the canvas aren't drawn.

anything already drawn stays, but any bitmap not previously drawn is not drawn after the moment the ondraw() method tries to draw a bitmap fetched by an animation.

EDIT3: i've found the source of the problem. on s3 Bitmap.createBitmap(Bitmap,int,int,int,int) seems to be returning as an empty transparent bitmap. any idea why?

EDIT4: decided to try calling Bitmap.createBitmap in the animation class' constructor to see if calling it in each on draw was using too much memory. still works on s4, but on s3 it threw this exception.

04-30 00:01:30.531: W/dalvikvm(1364): threadid=1: thread exiting with uncaught exception (group=0xa6156908)
04-30 00:01:30.531: E/AndroidRuntime(1364): FATAL EXCEPTION: main
04-30 00:01:30.531: E/AndroidRuntime(1364): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.irksomesloth.botbreaker/com.irksomesloth.botbreaker.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class com.irksomesloth.botbreaker.GameView
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.os.Looper.loop(Looper.java:137)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.ActivityThread.main(ActivityThread.java:5041)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at java.lang.reflect.Method.invokeNative(Native Method)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at java.lang.reflect.Method.invoke(Method.java:511)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at dalvik.system.NativeStart.main(Native Method)
04-30 00:01:30.531: E/AndroidRuntime(1364): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.irksomesloth.botbreaker.GameView
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.view.LayoutInflater.createView(LayoutInflater.java:613)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.Activity.setContentView(Activity.java:1881)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at com.irksomesloth.botbreaker.MainActivity.onCreate(MainActivity.java:15)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.Activity.performCreate(Activity.java:5104)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
04-30 00:01:30.531: E/AndroidRuntime(1364):     ... 11 more
04-30 00:01:30.531: E/AndroidRuntime(1364): Caused by: java.lang.reflect.InvocationTargetException
04-30 00:01:30.531: E/AndroidRuntime(1364):     at java.lang.reflect.Constructor.constructNative(Native Method)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.view.LayoutInflater.createView(LayoutInflater.java:587)
04-30 00:01:30.531: E/AndroidRuntime(1364):     ... 22 more
04-30 00:01:30.531: E/AndroidRuntime(1364): Caused by: java.lang.IllegalArgumentException: x + width must be <= bitmap.width()
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.graphics.Bitmap.createBitmap(Bitmap.java:546)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at android.graphics.Bitmap.createBitmap(Bitmap.java:514)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at com.irksomesloth.botbreaker.Animation.<init>(Animation.java:20)
04-30 00:01:30.531: E/AndroidRuntime(1364):     at com.irksomesloth.botbreaker.GameView.<init>(GameView.java:56)
04-30 00:01:30.531: E/AndroidRuntime(1364):     ... 25 more

....and here's the new constructor for the animation class for reference:

public class Animation {
    private Bitmap[] bmpFrames;
    private int intWidth;
    private int intHeight;
    private int intFrames;
    private int intFrameCount = 0;
    private double dblFrameMod = 0.25;
    private int intMyFrame = 0;

    public Animation(Bitmap source, int width, int height, int frames){
        intWidth = width;
        intHeight = height;
        intFrames = frames;
        bmpFrames = new Bitmap[intFrames];
        for(int i = 0; i < intFrames; i++){
            bmpFrames[i] = Bitmap.createBitmap(source, intWidth * i , intHeight * i,
                    intWidth * i + intWidth - 1, intHeight * i + intHeight - 1);
        }
    }

    public Bitmap getBitmap(){
        return bmpFrames[intMyFrame];
    }

code for surfaceview, that bitmaps are being drawn to:

EDIT: before anyone asks, the height and width are the exact height and width of the bitmaps and are currently placeholders.

package com.irksomesloth.botbreaker;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Point;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

public class GameView extends SurfaceView implements SurfaceHolder.Callback{
    //controllers
    private GameLogic session;
    private SurfaceHolder holder;
    private FrameThread thread;
    //touch-based stuff
    private Point pntTouch;
    //lane stuff
    private int[] intLaneTimer;
    private Animation laneIdle;
    private Animation laneAct;
    private Animation laneTouched;
    private Animation laneBroke;
    private ShotLane[] lanes;
    //bullet stuff
    private Animation bullet;
    //player stuff
    private Animation playerIdle;
    private Animation playerDead;
    //game status stuff
    private boolean blnInitialized = false;
    private boolean blnGameLoss = false;
    private boolean blnPaused = false;
    private String strHiScore;
    //drawing tools
    //BitmapFactory.Options setup = new BitmapFactory.Options();
    private Paint p;
    private Matrix m;

    public GameView(Context context, AttributeSet attrs) {
        super(context, attrs);
        holder = getHolder();
        //init animation thread
        thread = new FrameThread(this);
        //init touch detection variable
        pntTouch = new Point(-100, -100);
        //init lane sprites
        laneIdle = new Animation(BitmapFactory.decodeResource(getResources(), R.drawable.laneidle), 437, 1000, 1);
        laneAct = new Animation(BitmapFactory.decodeResource(getResources(), R.drawable.laneact), 437, 1000, 1);
        laneTouched = new Animation(BitmapFactory.decodeResource(getResources(), R.drawable.lanetouched), 437, 1000, 1);
        laneBroke = new Animation(BitmapFactory.decodeResource(getResources(), R.drawable.lanebroke), 437, 1000, 1);
        //init bullet sprite
        bullet = new Animation(BitmapFactory.decodeResource(getResources(), R.drawable.bullet), 150 , 150, 1);
        //init player sprites
        playerIdle = new Animation(BitmapFactory.decodeResource(getResources(), R.drawable.player), 200, 200 , 1);
        playerDead = new Animation(BitmapFactory.decodeResource(getResources(), R.drawable.playerdead), 200, 200, 1);
        //init lane data
        intLaneTimer = new int[6];
        lanes = new ShotLane[6];
        //init drawing tools
        //setup.inPurgeable = true;
        p = new Paint();
        m = new Matrix();
        //add our callback
        holder.addCallback(this);
    }

    @Override
    public void surfaceCreated(SurfaceHolder holder) {
        //now that our surfaceview has dimensions 
        //we can init our game logic contoller
        session = new GameLogic(getWidth(), getHeight());
        // the line below this is line 80, which the second logcat is pointing to
        p.setColor(Color.WHITE);
        p.setTextSize(getHeight() / 4);
        p.setTextAlign(Align.CENTER);
        //...and start the animation thread
        thread.setFPS(session.getFPS());
        thread.runThread(true);
        thread.start();

    }

    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int width,
    int height) {
    }

    @Override
    public void surfaceDestroyed(SurfaceHolder holder) {
        boolean blnRetry = true;
        thread.runThread(false);
        while(blnRetry){
            try{
                thread.join();
                blnRetry = false;
            }
            catch(InterruptedException e){
            }
        }
        thread = null;
        session = null;
        p = null;
        m = null;
    }

    @SuppressLint("DrawAllocation")
    @Override
    public void onDraw(Canvas canvas){
        canvas.drawColor(Color.BLACK);
        //lets update our game controller
        //and see if we got a game over
        blnGameLoss = session.Update();
        Point pntTouchTest = pntTouch;
        pntTouch = new Point(-100, -100);
        //on our first ondraw we'll init our lanes
        for(int i = 0; i < 6; i++){
            if(!blnInitialized){
                lanes[i] = new ShotLane(laneIdle, laneAct, laneTouched, laneBroke,
                        i + 1, session.getPlayerX(), session.getPlayerY(), session.getCornerAngle());
            }
            m.reset();
            m.postTranslate(lanes[i].getX(), lanes[i].getY());
            m.postRotate((float) lanes[i].getAngle(), session.getPlayerX(), session.getPlayerY());
            canvas.drawBitmap(lanes[i].getCurrentSprite().getBitmap(), m, p);
            lanes[i].stepSprite();
            if(pntTouchTest.x > 0 && pntTouchTest.y > 0){
                if(lanes[i].DetectTouch(pntTouchTest.x, pntTouchTest.y)){
                    pntTouchTest = new Point(-100, -100);
                    boolean blnHit = session.Shoot(lanes[i].getId());
                    if(blnHit){
                        lanes[i].setSprite(1);
                        intLaneTimer[i] = 6;
                    }
                    else{
                        lanes[i].setSprite(2);
                        intLaneTimer[i] = 6;
                    }
                }
            }
            if(intLaneTimer[i] > 0){
                intLaneTimer[i]--;
            }
            else{
                lanes[i].setSprite(0);
            }
        }
        //process and draw any bullets that are in play
        for(int b = 0; b < session.getBulletCount(); b++){
            Point pntBullet = new Point(session.getBulletX(b) - (bullet.getBitmap().getWidth() / 2), session.getBulletY(b) - (bullet.getBitmap().getHeight() / 2));
            m.reset();
            m.postTranslate(pntBullet.x, pntBullet.y);
            m.postRotate((float) session.getBulletAngle(b), session.getBulletX(b), session.getBulletY(b));
            canvas.drawBitmap(bullet.getBitmap(), m, p);
            bullet.step();
            if(session.getBulletId(b) > 0){
                int i = session.getBulletId(b) - 1;
                lanes[i].setSprite(3);
                intLaneTimer[i] = 6;
            }
        }
        canvas.drawText(String.valueOf(session.getScore()), session.getPlayerX(), (getHeight() * 3 / 16) + (p.getTextSize() / 3), p);
        canvas.drawText(strHiScore, session.getPlayerX(), (int) (getHeight() * 13 / 16) + (p.getTextSize() / 3), p);
        //handle any confirmed game losses
        if(blnGameLoss){
            canvas.drawBitmap(playerDead.getBitmap(), session. getPlayerX() - (playerDead.getBitmap().getWidth() / 2), session.getPlayerY() - (playerDead.getBitmap().getHeight() / 2), p);
            playerDead.step();
        }
        else{ 
            //if we haven't lost, draw the player as normal
            canvas.drawBitmap(playerIdle.getBitmap(), session. getPlayerX() - (playerIdle.getBitmap().getWidth() / 2), session.getPlayerY() - (playerIdle.getBitmap().getHeight() / 2), p);
            playerIdle.step();
        }
        //the game was initialized in this ondraw
        //so we wont need to re-initialize them
        blnInitialized = true;
        if(blnPaused){
            canvas.drawARGB(120, 0, 0, 0);
        }
    }

    public void PauseGame(){
        blnPaused = true;
        thread.setState(false);
    }

    public void ResumeGame(){
        blnPaused = false;
        thread.setState(true);
    }

    public void setHiScore(String score){
        strHiScore = score;
    }

    public int getScore(){
        try{
            return session.getScore();
        }
        catch (Exception NullPointerException){
            return 0;
        }
    }

    public boolean getLoss(){
        return blnGameLoss;
    }

    public void dump(){
        laneIdle.purge();
        laneAct.purge();
        laneTouched.purge();
        laneBroke.purge();

        bullet.purge();

        playerIdle.purge();
        playerDead.purge();

        blnInitialized = false;
        blnGameLoss = false;
        blnPaused = false;

        System.gc();
    }

    @Override
    public boolean onTouchEvent(MotionEvent event){
        if(!blnGameLoss){
            if(event.getAction() == MotionEvent.ACTION_DOWN){
                //find the point on the screen the user touched
                pntTouch.x = (int) event.getX();
                pntTouch.y = (int) event.getY();
            }
        }
        return true;
    }
}

code for animation class that i replaced the bitmaps in the surface view with:

package com.irksomesloth.botbreaker;

import android.graphics.Bitmap;

public class Animation {
    private Bitmap bmpSource;
    private int intWidth;
    private int intHeight;
    private int intFrames;
    private int intFrameCount = 0;
    private double dblFrameMod = 0.25;
    private int intMyFrame = 0;

    public Animation(Bitmap source, int width, int height, int frames){
        bmpSource = source;
        intWidth = width;
        intHeight = height;
        intFrames = frames;
    }

    public Bitmap getBitmap(){
        return Bitmap.createBitmap(bmpSource, intWidth * intMyFrame , intHeight * intMyFrame,
                intWidth * intMyFrame + intWidth, intHeight * intMyFrame + intHeight);
    }

    public void setFrame(int frame){
        intFrameCount = frame;
    }

    public int getFrame(){
        return intFrameCount;
    }

    public void step(){
        intMyFrame = (int) Math.floor(intFrameCount * dblFrameMod);
        intFrameCount++;
        if(intMyFrame == intFrames - 1){
            intFrameCount = 0;
        }
    }

    public void purge(){
        bmpSource.recycle();
    }
}

logcat generated on s3 v 4.2.2:

04-28 23:02:35.188: D/dalvikvm(1202): Late-enabling CheckJNI
04-28 23:02:35.284: E/Trace(1202): error opening trace file: No such file or directory (2)
04-28 23:02:35.308: D/dalvikvm(1202): GC_FOR_ALLOC freed 51K, 7% free 2396K/2564K, paused 3ms, total 8ms
04-28 23:02:35.312: I/dalvikvm-heap(1202): Grow heap (frag case) to 4.115MB for 1748012-byte allocation
04-28 23:02:35.316: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 4% free 4102K/4272K, paused 1ms+0ms, total 4ms
04-28 23:02:35.316: D/dalvikvm(1202): WAIT_FOR_CONCURRENT_GC blocked 2ms
04-28 23:02:35.320: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 4% free 4102K/4272K, paused 3ms, total 3ms
04-28 23:02:35.324: I/dalvikvm-heap(1202): Grow heap (frag case) to 4.855MB for 776400-byte allocation
04-28 23:02:35.328: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 4% free 4860K/5032K, paused 4ms, total 4ms
04-28 23:02:35.332: D/dalvikvm(1202): GC_CONCURRENT freed 0K, 4% free 4860K/5032K, paused 2ms+1ms, total 4ms
04-28 23:02:35.340: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 38% free 3153K/5032K, paused 2ms, total 2ms
04-28 23:02:35.340: I/dalvikvm-heap(1202): Grow heap (frag case) to 4.855MB for 1748012-byte allocation
04-28 23:02:35.344: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 4% free 4860K/5032K, paused 1ms+0ms, total 3ms
04-28 23:02:35.368: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 3% free 5618K/5792K, paused 18ms+0ms, total 22ms
04-28 23:02:35.444: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 33% free 3912K/5792K, paused 22ms, total 22ms
04-28 23:02:35.448: I/dalvikvm-heap(1202): Grow heap (frag case) to 5.595MB for 1748012-byte allocation
04-28 23:02:35.460: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 3% free 5619K/5792K, paused 3ms+0ms, total 10ms
04-28 23:02:35.496: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 29% free 4670K/6552K, paused 3ms, total 7ms
04-28 23:02:35.496: I/dalvikvm-heap(1202): Grow heap (frag case) to 6.336MB for 1748012-byte allocation
04-28 23:02:35.500: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 3% free 6377K/6552K, paused 1ms+0ms, total 4ms
04-28 23:02:35.596: D/dalvikvm(1202): GC_CONCURRENT freed 1951K, 28% free 5694K/7832K, paused 7ms+1ms, total 19ms
04-28 23:02:35.596: D/dalvikvm(1202): WAIT_FOR_CONCURRENT_GC blocked 12ms
04-28 23:02:35.632: D/libEGL(1202): loaded /system/lib/egl/libEGL_emulation.so
04-28 23:02:35.636: D/(1202): HostConnection::get() New Host Connection established 0xb8ef1b80, tid 1202
04-28 23:02:35.648: D/libEGL(1202): loaded /system/lib/egl/libGLESv1_CM_emulation.so
04-28 23:02:35.648: D/libEGL(1202): loaded /system/lib/egl/libGLESv2_emulation.so
04-28 23:02:35.740: W/EGL_emulation(1202): eglSurfaceAttrib not implemented
04-28 23:02:35.756: D/OpenGLRenderer(1202): Enabling debug mode 0
04-28 23:02:35.776: D/(1202): HostConnection::get() New Host Connection established 0xb8ed59c8, tid 1221
04-28 23:02:37.784: W/EGL_emulation(1202): eglSurfaceAttrib not implemented
04-28 23:02:46.972: D/dalvikvm(1202): GC_EXPLICIT freed 3755K, 67% free 2585K/7812K, paused 0ms+1ms, total 6ms
04-28 23:02:47.004: D/dalvikvm(1202): GC_FOR_ALLOC freed 176K, 69% free 2423K/7812K, paused 2ms, total 2ms
04-28 23:02:47.004: I/dalvikvm-heap(1202): Grow heap (frag case) to 4.143MB for 1748012-byte allocation
04-28 23:02:47.040: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 48% free 4130K/7812K, paused 37ms, total 37ms
04-28 23:02:47.044: D/dalvikvm(1202): GC_CONCURRENT freed 0K, 48% free 4130K/7812K, paused 2ms+0ms, total 4ms
04-28 23:02:47.056: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 48% free 4130K/7812K, paused 5ms, total 8ms
04-28 23:02:47.060: I/dalvikvm-heap(1202): Grow heap (frag case) to 4.884MB for 776400-byte allocation
04-28 23:02:47.060: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 38% free 4888K/7812K, paused 3ms, total 3ms
04-28 23:02:47.064: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 38% free 4888K/7812K, paused 1ms+1ms, total 3ms
04-28 23:02:47.084: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 60% free 3181K/7812K, paused 9ms, total 9ms
04-28 23:02:47.084: I/dalvikvm-heap(1202): Grow heap (frag case) to 4.884MB for 1748012-byte allocation
04-28 23:02:47.088: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 38% free 4888K/7812K, paused 1ms+0ms, total 5ms
04-28 23:02:47.096: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 28% free 5647K/7812K, paused 1ms+1ms, total 4ms
04-28 23:02:47.112: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 50% free 3940K/7812K, paused 10ms, total 11ms
04-28 23:02:47.112: I/dalvikvm-heap(1202): Grow heap (frag case) to 5.625MB for 1748012-byte allocation
04-28 23:02:47.116: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 28% free 5647K/7812K, paused 2ms+1ms, total 4ms
04-28 23:02:47.132: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 28% free 5647K/7812K, paused 13ms, total 13ms
04-28 23:02:47.132: I/dalvikvm-heap(1202): Grow heap (frag case) to 6.365MB for 776400-byte allocation
04-28 23:02:47.144: D/dalvikvm(1202): GC_FOR_ALLOC freed 0K, 26% free 6405K/8572K, paused 3ms, total 3ms
04-28 23:02:47.152: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 46% free 4698K/8572K, paused 4ms, total 4ms
04-28 23:02:47.152: I/dalvikvm-heap(1202): Grow heap (frag case) to 6.365MB for 1748012-byte allocation
04-28 23:02:47.156: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 26% free 6405K/8572K, paused 2ms+1ms, total 4ms
04-28 23:02:47.160: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 26% free 6405K/8572K, paused 2ms, total 2ms
04-28 23:02:47.168: I/dalvikvm-heap(1202): Grow heap (frag case) to 7.106MB for 776400-byte allocation
04-28 23:02:47.192: D/dalvikvm(1202): GC_FOR_ALLOC freed 0K, 24% free 7163K/9332K, paused 11ms, total 11ms
04-28 23:02:47.244: W/EGL_emulation(1202): eglSurfaceAttrib not implemented
04-28 23:02:47.256: D/(1202): HostConnection::get() New Host Connection established 0xb8ef1b68, tid 1224
04-28 23:02:47.588: W/EGL_emulation(1202): eglSurfaceAttrib not implemented
04-28 23:02:47.780: D/dalvikvm(1202): GC_EXPLICIT freed 2466K, 38% free 5816K/9332K, paused 1ms+0ms, total 4ms
04-28 23:02:47.788: D/dalvikvm(1202): GC_FOR_ALLOC freed 6K, 38% free 5822K/9332K, paused 1ms, total 4ms
04-28 23:02:47.788: I/dalvikvm-heap(1202): Grow heap (frag case) to 7.463MB for 1748012-byte allocation
04-28 23:02:47.792: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 20% free 7529K/9332K, paused 3ms, total 3ms
04-28 23:02:47.792: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 20% free 7529K/9332K, paused 0ms+0ms, total 2ms
04-28 23:02:47.804: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 20% free 7529K/9332K, paused 8ms, total 8ms
04-28 23:02:47.804: I/dalvikvm-heap(1202): Grow heap (frag case) to 8.204MB for 776400-byte allocation
04-28 23:02:47.820: D/dalvikvm(1202): GC_FOR_ALLOC freed 0K, 18% free 8288K/10092K, paused 6ms, total 6ms
04-28 23:02:47.828: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 35% free 6581K/10092K, paused 3ms, total 9ms
04-28 23:02:47.828: I/dalvikvm-heap(1202): Grow heap (frag case) to 8.204MB for 1748012-byte allocation
04-28 23:02:47.832: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 18% free 8288K/10092K, paused 2ms+1ms, total 4ms
04-28 23:02:47.848: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 18% free 8288K/10092K, paused 12ms, total 12ms
04-28 23:02:47.848: I/dalvikvm-heap(1202): Grow heap (frag case) to 8.945MB for 776400-byte allocation
04-28 23:02:47.868: D/dalvikvm(1202): GC_FOR_ALLOC freed 0K, 17% free 9046K/10852K, paused 11ms, total 11ms
04-28 23:02:47.872: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 33% free 7339K/10852K, paused 3ms, total 3ms
04-28 23:02:47.872: I/dalvikvm-heap(1202): Grow heap (frag case) to 8.945MB for 1748012-byte allocation
04-28 23:02:47.880: D/dalvikvm(1202): GC_CONCURRENT freed <1K, 17% free 9046K/10852K, paused 2ms+0ms, total 7ms
04-28 23:02:47.880: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 17% free 9046K/10852K, paused 2ms, total 2ms
04-28 23:02:47.884: I/dalvikvm-heap(1202): Grow heap (frag case) to 9.685MB for 776400-byte allocation
04-28 23:02:47.908: D/dalvikvm(1202): GC_FOR_ALLOC freed 0K, 16% free 9804K/11612K, paused 14ms, total 14ms
04-28 23:02:47.912: D/dalvikvm(1202): GC_FOR_ALLOC freed 1707K, 31% free 8097K/11612K, paused 3ms, total 3ms
04-28 23:02:47.924: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 16% free 9805K/11612K, paused 8ms, total 8ms
04-28 23:02:47.924: I/dalvikvm-heap(1202): Grow heap (frag case) to 10.425MB for 776400-byte allocation
04-28 23:02:47.924: D/dalvikvm(1202): GC_FOR_ALLOC freed <1K, 15% free 10563K/12372K, paused 3ms, total 3ms
04-28 23:02:47.976: W/EGL_emulation(1202): eglSurfaceAttrib not implemented
04-28 23:02:48.212: W/EGL_emulation(1202): eglSurfaceAttrib not implemented
Was it helpful?

Solution

setting my animation's width and height to source.getwidth() and source.getHeight() fixed it for some reason, even though the numerical values are exactly the same.

i guess it was reading it weird on s3 and s2?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top