Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9161733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:02:19+00:00 2026-06-17T14:02:19+00:00

My code workes fine when i run it as normal but when i run

  • 0

My code workes fine when i run it as normal but when i run this unit test this error is printed in the console. what i’m doing wrong with this unit test?

Test run failed: Instrumentation run failed due to ‘Process crashed.’

LogCat

01-13 03:52:12.560: I/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** 

*** *** ***
01-13 03:52:12.560: I/DEBUG(31): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
01-13 03:52:12.560: I/DEBUG(31): pid: 446, tid: 452  >>> com.frozendragon.Sceptrum <<<
01-13 03:52:12.560: I/DEBUG(31): signal 11 (SIGSEGV), fault addr 00000028
01-13 03:52:12.560: I/DEBUG(31):  r0 00000000  r1 0026148c  r2 00000000  r3 0026148c
01-13 03:52:12.560: I/DEBUG(31):  r4 00260bd8  r5 002614cc  r6 00000000  r7 00000000
01-13 03:52:12.560: I/DEBUG(31):  r8 00000001  r9 00000000  10 00000000  fp 00000000
01-13 03:52:12.560: I/DEBUG(31):  ip 00000000  sp 485c1b38  lr 00000000  pc ab166044  cpsr 60000010
01-13 03:52:12.606: I/DEBUG(31):          #00  pc 00066044  /system/lib/libskia.so
01-13 03:52:12.606: I/DEBUG(31):          #01  pc 00068bb4  /system/lib/libskia.so
01-13 03:52:12.606: I/DEBUG(31):          #02  pc 00064e68  /system/lib/libskia.so
01-13 03:52:12.606: I/DEBUG(31):          #03  pc 0004b1ea  /system/lib/libandroid_runtime.so
01-13 03:52:12.606: I/DEBUG(31):          #04  pc 00013974  /system/lib/libdvm.so
01-13 03:52:12.606: I/DEBUG(31):          #05  pc 0003ddb4  /system/lib/libdvm.so
01-13 03:52:12.606: I/DEBUG(31):          #06  pc 00037186  /system/lib/libdvm.so
01-13 03:52:12.606: I/DEBUG(31):          #07  pc 00018714  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #08  pc 0001e8c4  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #09  pc 0001d790  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #10  pc 0005408e  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #11  pc 0005bde2  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #12  pc 00018714  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #13  pc 0001e8c4  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #14  pc 0001d790  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #15  pc 00053eec  /system/lib/libdvm.so
01-13 03:52:12.616: I/DEBUG(31):          #16  pc 00054102  /system/lib/libdvm.so
01-13 03:52:12.626: I/DEBUG(31):          #17  pc 0004825a  /system/lib/libdvm.so
01-13 03:52:12.626: I/DEBUG(31):          #18  pc 0001103c  /system/lib/libc.so
01-13 03:52:12.626: I/DEBUG(31):          #19  pc 00010b20  /system/lib/libc.so
01-13 03:52:12.626: I/DEBUG(31): code around pc:
01-13 03:52:12.626: I/DEBUG(31): ab166024 e59d001c e3a01000 e5c010a8 eaffff95 
01-13 03:52:12.626: I/DEBUG(31): ab166034 e1d4e2f4 e1d472f6 e5946004 e197200e 
01-13 03:52:12.626: I/DEBUG(31): ab166044 e5969028 e596a024 0a00002e e59db00c 
01-13 03:52:12.626: I/DEBUG(31): ab166054 e2848028 e1a0c008 e8bb000f e8ac000f 
01-13 03:52:12.626: I/DEBUG(31): ab166064 e8bb000f e8ac000f e89b0003 e26eb000 
01-13 03:52:12.626: I/DEBUG(31): code around lr:
01-13 03:52:12.626: I/DEBUG(31): stack:
01-13 03:52:12.626: I/DEBUG(31):     485c1af8  43480000  /data/dalvik-cache/system@framework@framework.jar@classes.dex
01-13 03:52:12.626: I/DEBUG(31):     485c1afc  002613c8  [heap]
01-13 03:52:12.626: I/DEBUG(31):     485c1b00  485c1be8  
01-13 03:52:12.626: I/DEBUG(31):     485c1b04  00261020  [heap]
01-13 03:52:12.626: I/DEBUG(31):     485c1b08  485c1be8  
01-13 03:52:12.626: I/DEBUG(31):     485c1b0c  ab165be8  /system/lib/libskia.so
01-13 03:52:12.626: I/DEBUG(31):     485c1b10  00000001  
01-13 03:52:12.636: I/DEBUG(31):     485c1b14  00000007  
01-13 03:52:12.636: I/DEBUG(31):     485c1b18  420d1a98  /dev/ashmem/dalvik-LinearAlloc (deleted)
01-13 03:52:12.636: I/DEBUG(31):     485c1b1c  80846dad  /system/lib/libdvm.so
01-13 03:52:12.636: I/DEBUG(31):     485c1b20  00000024  
01-13 03:52:12.636: I/DEBUG(31):     485c1b24  00231b78  [heap]
01-13 03:52:12.636: I/DEBUG(31):     485c1b28  46002d90  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
01-13 03:52:12.636: I/DEBUG(31):     485c1b2c  8083d9b9  /system/lib/libdvm.so
01-13 03:52:12.636: I/DEBUG(31):     485c1b30  df002777  
01-13 03:52:12.636: I/DEBUG(31):     485c1b34  e3a070ad  
01-13 03:52:12.636: I/DEBUG(31): #00 485c1b38  46002d90  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
01-13 03:52:12.636: I/DEBUG(31):     485c1b3c  8082e5b3  /system/lib/libdvm.so
01-13 03:52:12.636: I/DEBUG(31):     485c1b40  00000000  
01-13 03:52:12.636: I/DEBUG(31):     485c1b44  002614a4  [heap]
01-13 03:52:12.636: I/DEBUG(31):     485c1b48  00004000  
01-13 03:52:12.636: I/DEBUG(31):     485c1b4c  ffffffff  
01-13 03:52:12.636: I/DEBUG(31):     485c1b50  00000000  
01-13 03:52:12.636: I/DEBUG(31):     485c1b54  00261020  [heap]
01-13 03:52:12.636: I/DEBUG(31):     485c1b58  485c1be8  
01-13 03:52:12.636: I/DEBUG(31):     485c1b5c  002316e8  [heap]
01-13 03:52:12.636: I/DEBUG(31):     485c1b60  46002d90  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
01-13 03:52:12.636: I/DEBUG(31):     485c1b64  ad32e451  /system/lib/libandroid_runtime.so
01-13 03:52:12.636: I/DEBUG(31):     485c1b68  ad374d50  /system/lib/libandroid_runtime.so
01-13 03:52:12.636: I/DEBUG(31):     485c1b6c  ad34bf0f  /system/lib/libandroid_runtime.so
01-13 03:52:12.636: I/DEBUG(31):     485c1b70  485c1f00  
01-13 03:52:12.636: I/DEBUG(31):     485c1b74  485c1be8  
01-13 03:52:12.646: I/DEBUG(31):     485c1b78  00261020  [heap]
01-13 03:52:12.646: I/DEBUG(31):     485c1b7c  ab165b68  /system/lib/libskia.so
01-13 03:52:12.646: I/DEBUG(31):     485c1b80  485c1be8  
01-13 03:52:12.646: I/DEBUG(31):     485c1b84  485c1c0c  
01-13 03:52:12.646: I/DEBUG(31):     485c1b88  485c1bb0  
01-13 03:52:12.646: I/DEBUG(31):     485c1b8c  00261020  [heap]
01-13 03:52:12.646: I/DEBUG(31):     485c1b90  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1b94  00000001  
01-13 03:52:12.646: I/DEBUG(31):     485c1b98  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1b9c  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1ba0  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1ba4  ab168bb8  /system/lib/libskia.so
01-13 03:52:12.646: I/DEBUG(31): #01 485c1ba8  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1bac  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1bb0  000013fc  
01-13 03:52:12.646: I/DEBUG(31):     485c1bb4  000001b8  
01-13 03:52:12.646: I/DEBUG(31):     485c1bb8  485c1c68  
01-13 03:52:12.646: I/DEBUG(31):     485c1bbc  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1bc0  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1bc4  00000000  
01-13 03:52:12.646: I/DEBUG(31):     485c1bc8  00261020  [heap]
01-13 03:52:12.646: I/DEBUG(31):     485c1bcc  433f6c68  /data/dalvik-cache/system@framework@framework.jar@classes.dex
01-13 03:52:12.646: I/DEBUG(31):     485c1bd0  8086caa4  /system/lib/libdvm.so
01-13 03:52:12.646: I/DEBUG(31):     485c1bd4  80870eea  /system/lib/libdvm.so
01-13 03:52:12.646: I/DEBUG(31):     485c1bd8  000013fc  
01-13 03:52:12.646: I/DEBUG(31):     485c1bdc  80887fc4  /system/lib/libdvm.so
01-13 03:52:12.646: I/DEBUG(31):     485c1be0  485c1f00  
01-13 03:52:12.656: I/DEBUG(31):     485c1be4  485c1c0c  
01-13 03:52:12.656: I/DEBUG(31):     485c1be8  00261020  [heap]
01-13 03:52:12.656: I/DEBUG(31):     485c1bec  00000003  
01-13 03:52:12.656: I/DEBUG(31):     485c1bf0  00000000  
01-13 03:52:12.656: I/DEBUG(31):     485c1bf4  485c1c68  
01-13 03:52:12.656: I/DEBUG(31):     485c1bf8  43957d20  
01-13 03:52:12.656: I/DEBUG(31):     485c1bfc  43957d0c  
01-13 03:52:12.656: I/DEBUG(31):     485c1c00  00231b78  [heap]
01-13 03:52:12.656: I/DEBUG(31):     485c1c04  ab164e6c  /system/lib/libskia.so
01-13 03:52:13.006: I/BootReceiver(73): Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
01-13 03:52:13.026: D/Zygote(33): Process 446 terminated by signal (11)
01-13 03:52:13.076: D/dalvikvm(73): GC_FOR_MALLOC freed 4012 objects / 829984 bytes in 66ms
01-13 03:52:13.076: I/ActivityManager(73): Process com.frozendragon.Sceptrum (pid 446) has died.
01-13 03:52:13.076: W/ActivityManager(73): Crash of app com.frozendragon.Sceptrum running instrumentation ComponentInfo{com.frozendragon.Sceptrum.test/android.test.InstrumentationTestRunner}
01-13 03:52:13.076: I/ActivityManager(73): Force stopping package com.frozendragon.Sceptrum uid=10028
01-13 03:52:13.087: D/AndroidRuntime(440): Shutting down VM
01-13 03:52:13.087: D/jdwp(440): Got wake-up signal, bailing out of select
01-13 03:52:13.087: D/dalvikvm(440): Debugger has detached; object registry had 1 entries
01-13 03:54:28.720: D/SntpClient(73): request time failed: java.net.SocketException: Address family not supported by protocol

Unit test code

Point ImagesPos, SheetSize, CurrentSprite, Size;
    protected void setUp() throws Exception {
        super.setUp();
        gameEngine = new GameEngine(400, 800);
        canvas = new Canvas();
        ImagesPos = new Point(200, 200);
        SheetSize = new Point(9, 9);
        CurrentSprite = new Point(2, 3);
        Size = new Point(200, 400);
        Context context = getContext();
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inScaled = true;
        animationbmp = BitmapFactory.decodeResource(context.getResources(), R.drawable.foot_animation_spritesheet9x9, options);
    }
    public void testDrawAnimationObjectCanvasBitmapIntIntPointPointFloat() {
        float rot = 45f;
        gameEngine.DrawAnimationObject(canvas, animationbmp, ImagesPos.x, ImagesPos.y, SheetSize, CurrentSprite, rot);
        animationbmp.recycle();
        gameEngine.DrawAnimationObject(canvas, animationbmp, ImagesPos.x, ImagesPos.y, SheetSize, CurrentSprite, rot);
        restorebmp();
    }
private void restorebmp()
{
    if(animationbmp.isRecycled() == false)
    {
        animationbmp.recycle();
    }
    Context context = getContext();
    BitmapFactory.Options options = new BitmapFactory.Options();
    options.inScaled = true;
    animationbmp = BitmapFactory.decodeResource(context.getResources(), R.drawable.foot_animation_spritesheet9x9, options);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:02:20+00:00Added an answer on June 17, 2026 at 2:02 pm

    It appears your code is recycling a bitmap and then immediately trying to use it again:

        gameEngine.DrawAnimationObject(canvas, animationbmp, ImagesPos.x, ImagesPos.y, SheetSize, CurrentSprite, rot);
        //////////////////////////////////////////////
        animationbmp.recycle(); //Offending line here/
        //////////////////////////////////////////////
        gameEngine.DrawAnimationObject(canvas, animationbmp, ImagesPos.x, ImagesPos.y, SheetSize, CurrentSprite, rot);
    

    You shouldn’t use a bitmap after its been recycled. You need to recreate that bitmap object again as the memory is now invalid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

the code below works fine but it takes an absolute age to run. How
This code works fine, but I'll want to handle exception if any thing goes
This code works fine to find an available room within certain date, but it
This code works fine in C#: Expression.Lambda(LambdaBody); But none of the methods for building
My code works fine when I call AA.sendRequest() from the console, but not when
I run this jquery code inside sharepoint webpart and got this error on the
This code works fine in Chrome. However, in Firefox, when it hits the GMxhr
this code works fine until I start scrolling: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
My code worked fine in JQuery 1.3.2, but in 1.4.2 it seems to be
The following test code segfaults for me on OSX 10.7.3, but not other machines:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.