qdrzwd / dexmaker

Automatically exported from code.google.com/p/dexmaker
0 stars 0 forks source link

DexMaker.generateAndLoad hangs forever on some Android devices #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make a simple JUnit test with a mock(...) in the setUp (which calls into 
DexMaker.generateAndLoad)
2. Run on some devices (Does repo on DROID RAZR Android 4.0.4. Does not repo on 
Galaxy S3 Android 4.1.1)
3. Half the time the test will hang forever on DexFile.openDexFile.

What is the expected output? What do you see instead?
That calls into DexMaker.generateAndLoad will eventually return.

What version of the product are you using? On what operating system?
[mockito-all-1.9.5.jar, javassist-3.16.1-GA.jar, dexmaker-mockito-1.0.jar, 
dexmaker-1.0.jar]
DROID RAZR 6.16.211.XT912.Verizon.en.US (Android 4.0.4) 

Please provide any additional information below.

I found this Android bug, not sure if it relates.
http://code.google.com/p/android/issues/detail?id=14962

Here is a thread dump of the InstrumentationTestRunner thread that is stuck.

11    13448    vmwait    3364    776    Instr: 
android.test.InstrumentationTestRunner    
====
dalvik.system.DexFile    openDexFile    DexFile.java    -2    true    
dalvik.system.DexFile    <init>    DexFile.java    93    false    
dalvik.system.DexFile    loadDex    DexFile.java    133    false    
dalvik.system.DexPathList    loadDexFile    DexPathList.java    261    false    
dalvik.system.DexPathList    makeDexElements    DexPathList.java    229    
false    
dalvik.system.DexPathList    <init>    DexPathList.java    96    false    
dalvik.system.BaseDexClassLoader    <init>    BaseDexClassLoader.java    52    
false    
dalvik.system.DexClassLoader    <init>    DexClassLoader.java    57    false    
java.lang.reflect.Constructor    constructNative    Constructor.java    -2    
true    
java.lang.reflect.Constructor    newInstance    Constructor.java    417    
false    
com.google.dexmaker.DexMaker    generateAndLoad    DexMaker.java    382    
false    
com.google.dexmaker.stock.ProxyBuilder    buildProxyClass    ProxyBuilder.java  
  252    false    
com.google.dexmaker.mockito.DexmakerMockMaker    createMock    
DexmakerMockMaker.java    56    false    
org.mockito.internal.util.MockUtil    createMock    MockUtil.java    26    
false    
org.mockito.internal.MockitoCore    mock    MockitoCore.java    51    false    
org.mockito.Mockito    mock    Mockito.java    1243    false    
org.mockito.Mockito    mock    Mockito.java    1120    false    
com.mystuff.android.SomeTest    setUp    SomeTest.java    30    false    
junit.framework.TestCase    runBare    TestCase.java    125    false    
junit.framework.TestResult$1    protect    TestResult.java    106    false    
junit.framework.TestResult    runProtected    TestResult.java    124    false   

junit.framework.TestResult    run    TestResult.java    109    false    
junit.framework.TestCase    run    TestCase.java    118    false    
android.test.AndroidTestRunner    runTest    AndroidTestRunner.java    169    
false    
android.test.AndroidTestRunner    runTest    AndroidTestRunner.java    154    
false    
android.test.InstrumentationTestRunner    onStart    
InstrumentationTestRunner.java    545    false    
android.app.Instrumentation$InstrumentationThread    run    
Instrumentation.java    1551    false

Original issue reported on code.google.com by will.qu...@gmail.com on 30 Jan 2013 at 4:17

GoogleCodeExporter commented 8 years ago
Nothing we can do about this! Might be best to report this to AOSP.
https://code.google.com/p/android/issues/list

(If you post the issue number back here, I'll try to make sure it gets picked 
up.)

Original comment by limpbizkit on 10 Feb 2013 at 11:42