Skip to content
This repository was archived by the owner on Jun 9, 2021. It is now read-only.
This repository was archived by the owner on Jun 9, 2021. It is now read-only.

Terminating app due to uncaught exception 'NSInvalidArgumentException' #50

Closed
@bezineb5

Description

@bezineb5

Hi,

I'm trying to use tensorflow for mac to train my model using the tensorforce library.
However, it crashes at model initialization with this stacktrace:

2020-12-03 19:06:42.765 Python[26957:1076199] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(
        0   CoreFoundation                      0x0000000185689320 __exceptionPreprocess + 240
        1   libobjc.A.dylib                     0x00000001853b7c04 objc_exception_throw + 60
        2   CoreFoundation                      0x0000000185750064 -[__NSCFString characterAtIndex:].cold.1 + 0
        3   CoreFoundation                      0x000000018574d5b4 -[__NSArrayM insertObject:atIndex:].cold.2 + 0
        4   CoreFoundation                      0x00000001855a8274 -[__NSArrayM insertObject:atIndex:] + 1020
        5   _pywrap_tensorflow_internal.so      0x0000000106f552e0 _ZN10tensorflow9mlcompute5eager15MLCGraphBuilder3AddINSt3__16__bindIMNS1_10MLCEagerOpIfEEKFNS_6StatusEPNS_15OpKernelContextEPKNS_6TensorEPU8__strongP9MLCTensorEJPNS1_14MLCEagerMatMulIfEERSA_RKNS4_12placeholders4__phILi1EEERKNSP_ILi2EEEEEEEES8_P8MLCLayerNS4_6vectorISD_NS4_9allocatorISD_EEEESD_T_ + 340
        6   _pywrap_tensorflow_internal.so      0x0000000106f54754 _ZN10tensorflow9mlcompute5eager15MLCGraphBuilder22RunGraphWithSingleNodeINSt3__16__bindIMNS1_14MLCEagerMatMulIfEEKFP22MLCFullyConnectedLayerPNS_15OpKernelContextERS2_EJPS7_RSB_RKNS4_12placeholders4__phILi1EEEEEEPKNS_6TensorENS4_6vectorIPvNS4_9allocatorISR_EEEENS5_IMNS1_10MLCEagerOpIfEEKFNS_6StatusESB_SP_PU8__strongP9MLCTensorEJSF_SG_SL_RKNSI_ILi2EEEEEEEESX_jRT_NSQ_ISP_NSS_ISP_EEEESP_NSQ_IPSN_NSS_IS1C_EEEET0_T1_P9MLCDeviceSB_T2_NS4_12basic_stringIcNS4_11char_traitsIcEENSS_IcEEEE + 1664
        7   _pywrap_tensorflow_internal.so      0x0000000106f53894 _ZN10tensorflow9mlcompute5eager15MLCGraphBuilder22RunGraphWithSingleNodeINSt3__16__bindIMNS1_14MLCEagerMatMulIfEEKFP22MLCFullyConnectedLayerPNS_15OpKernelContextERS2_EJPS7_RSB_RKNS4_12placeholders4__phILi1EEEEEEPKNS_6TensorENS4_6vectorIPvNS4_9allocatorISR_EEEENS5_IMNS1_10MLCEagerOpIfEEKFNS_6StatusESB_SP_PU8__strongP9MLCTensorEJSF_SG_SL_RKNSI_ILi2EEEEEEEESX_jRT_SP_SP_PSN_T0_T1_P9MLCDeviceSB_T2_NS4_12basic_stringIcNS4_11char_traitsIcEENSS_IcEEEE + 256
        8   _pywrap_tensorflow_internal.so      0x0000000106f51d9c _ZN10tensorflow9mlcompute5eager14MLCEagerMatMulIfE7ComputeEPNS_15OpKernelContextE + 1620
        9   libtensorflow_framework.2.dylib     0x00000001194d75ac _ZN10tensorflow12_GLOBAL__N_113ExecutorStateINS_21SimplePropagatorStateEE7ProcessENS2_10TaggedNodeEx + 2772
        10  libtensorflow_framework.2.dylib     0x000000011954a4b4 _ZN5Eigen15ThreadPoolTemplIN10tensorflow6thread16EigenEnvironmentEE10WorkerLoopEi + 552
        11  libtensorflow_framework.2.dylib     0x000000011954a18c _ZZN10tensorflow6thread16EigenEnvironment12CreateThreadENSt3__18functionIFvvEEEENKUlvE_clEv + 80
        12  libtensorflow_framework.2.dylib     0x000000011953ba74 _ZN10tensorflow12_GLOBAL__N_17PThread8ThreadFnEPv + 104
        13  libsystem_pthread.dylib             0x000000018551106c _pthread_start + 320
        14  libsystem_pthread.dylib             0x000000018550bda0 thread_start + 8
)
libc++abi.dylib: terminating with uncaught exception of type NSException

It crashes in tensorflow/python/eager/def_function.py line 724.
Unfortunately the example is way too complex to put in a github ticket.

Do you haave any hint at what can actually be null ?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions