Redex: RuntimeError: redex-all crashed with exit code -6!

Created on 30 Aug 2019  路  4Comments  路  Source: facebook/redex

libc++abi.dylib: terminating with uncaught exception of type Json::LogicError: Value is not convertible to bool.
0   redex-all                           0x000000010ebdf1e2 _Z23crash_backtrace_handleri + 50
1   libsystem_platform.dylib            0x00007fff73273b5d _sigtramp + 29
2   libc++abi.dylib                     0x00007fff70316998 GCC_except_table51 + 216
3   libsystem_c.dylib                   0x00007fff7312d6a6 abort + 127
4   libc++abi.dylib                     0x00007fff70309641 __cxa_bad_cast + 0
5   libc++abi.dylib                     0x00007fff703097c7 _ZL25default_terminate_handlerv + 243
6   libobjc.A.dylib                     0x00007fff718bceeb _ZL15_objc_terminatev + 105
7   libc++abi.dylib                     0x00007fff7031519e _ZSt11__terminatePFvvE + 8
8   libc++abi.dylib                     0x00007fff70314f86 __cxa_get_exception_ptr + 0
9   libc++abi.dylib                     0x00007fff70307f99 __cxa_get_globals + 0
10  libjsoncpp.21.dylib                 0x000000010fd57c40 _ZN4Json15throwLogicErrorERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 56
11  libjsoncpp.21.dylib                 0x000000010fd5a973 _ZNK4Json5Value6asBoolEv + 275
12  redex-all                           0x000000010ea96619 _ZN18StripDebugInfoPass11bind_configEv + 1641
13  redex-all                           0x000000010ebb544f _ZN12Configurable12parse_configERK11JsonWrapper + 207
14  redex-all                           0x000000010eca019c _ZN11PassManager13activate_passEPKcRKN4Json5ValueE + 876
15  redex-all                           0x000000010ec9f44e _ZN11PassManager4initERKN4Json5ValueE + 254
16  redex-all                           0x000000010ec9ea57 _ZN11PassManagerC2ERKNSt3__16vectorIP4PassNS0_9allocatorIS3_EEEENS0_10unique_ptrIN5redex21ProguardConfigurationENS0_14default_deleteISB_EEEERKN4Json5ValueERK12RedexOptions + 583
17  redex-all                           0x000000010eb9361a main + 8074
18  libdyld.dylib                       0x00007fff730883d5 start + 1
Traceback (most recent call last):
  File "/tmp/redex.Km0WjV/redex.py", line 929, in <module>
    run_redex(args)
  File "/tmp/redex.Km0WjV/redex.py", line 906, in run_redex
    run_redex_binary(state)
  File "/tmp/redex.Km0WjV/redex.py", line 246, in run_redex_binary
    % script_filenames
RuntimeError: redex-all crashed with exit code -6! You can re-run it under gdb by running /tmp/redex.Km0WjV/redex-gdb-QHSwNO.sh or under lldb by running /tmp/redex.Km0WjV/redex-lldb-FBh8hI.sh

Most helpful comment

before:

{
  "redex" : {
    "passes" : [
      "StripDebugInfoPass"
    ]
  },
  "StripDebugInfoPass" : {
    "drop_all_dbg_info" : "0",
    "drop_local_variables" : "1",
    "drop_line_numbers" : "0",
    "drop_src_files" : "0",
    "use_whitelist" : "0",
    "cls_whitelist" : [],
    "method_whitelist" : [],
    "drop_prologue_end" : "1",
    "drop_epilogue_begin" : "1",
    "drop_all_dbg_info_if_empty" : "1"
  }

}

after:

{
  "redex" : {
    "passes" : [
      "StripDebugInfoPass"
    ]
  },
  "StripDebugInfoPass" : {
    "drop_all_dbg_info" : false,
    "drop_local_variables" : true,
    "drop_line_numbers" : false,
    "drop_src_files" : false,
    "use_whitelist" : false,
    "cls_whitelist" : [],
    "method_whitelist" : [],
    "drop_prologue_end" : true,
    "drop_epilogue_begin" : true,
    "drop_all_dbg_info_if_empty" : true
  }

}

it works.thank you!

All 4 comments

Could you show the config you are using? Looks like some value is being used as boolean value.

redex --sign -s ReDexSample/keystore/debug.keystore -a androiddebugkey -p android -c redex-test/stripdebuginfo.config -P ReDexSample/proguard-rules.pro -o redex-test/strip_output.apk ReDexSample/build/outputs/apk/debug/ReDexSample-debug.apk

Could you show your stripdebuginfo.config? We made some config binding logic changes recently, so that using 0/1 or "0"/"1" as false/true won't work now. If you have 0/1 or "0"/"1" serving as false/true in your config, can you try changing them accordingly and see if this resolve your issue?

before:

{
  "redex" : {
    "passes" : [
      "StripDebugInfoPass"
    ]
  },
  "StripDebugInfoPass" : {
    "drop_all_dbg_info" : "0",
    "drop_local_variables" : "1",
    "drop_line_numbers" : "0",
    "drop_src_files" : "0",
    "use_whitelist" : "0",
    "cls_whitelist" : [],
    "method_whitelist" : [],
    "drop_prologue_end" : "1",
    "drop_epilogue_begin" : "1",
    "drop_all_dbg_info_if_empty" : "1"
  }

}

after:

{
  "redex" : {
    "passes" : [
      "StripDebugInfoPass"
    ]
  },
  "StripDebugInfoPass" : {
    "drop_all_dbg_info" : false,
    "drop_local_variables" : true,
    "drop_line_numbers" : false,
    "drop_src_files" : false,
    "use_whitelist" : false,
    "cls_whitelist" : [],
    "method_whitelist" : [],
    "drop_prologue_end" : true,
    "drop_epilogue_begin" : true,
    "drop_all_dbg_info_if_empty" : true
  }

}

it works.thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benjamin-bader picture benjamin-bader  路  7Comments

pawelkw picture pawelkw  路  6Comments

hljwang3874149 picture hljwang3874149  路  4Comments

MaTriXy picture MaTriXy  路  7Comments

lukef picture lukef  路  3Comments