nasa / HyperCP

Other
41 stars 22 forks source link

Credential prompt causes python to quit unexpectedly #281

Closed doizuc closed 1 day ago

doizuc commented 1 week ago

@juanchossn I tried to use the credential prompt to test the ECMWF model from your recent PR #278 but as soon as HyperCP tries to open the pop-up window for the user to input their credentials HyperCP quit and leaves me with "python quit unexpectedly" (log below). I'm testing the code on macOS 15.0.1 on an Intel mac.

Reset NASA Earth Data credentials
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSApplication macOSVersion]: unrecognized selector sent to instance 0x7fb232894160'
  *** First throw call stack:
  (
      0   CoreFoundation                      0x00007ff81bc566d6 __exceptionPreprocess + 242
      1   libobjc.A.dylib                     0x00007ff81b73dc00 objc_exception_throw + 62
      2   CoreFoundation                      0x00007ff81bcfe15f -[NSObject(NSObject) __retain_OA] + 0
      3   CoreFoundation                      0x00007ff81bbc5edf ___forwarding___ + 1379
      4   CoreFoundation                      0x00007ff81bbc58e8 _CF_forwarding_prep_0 + 120
      5   libtk8.6.dylib                      0x0000000125322d02 GetRGBA + 50
      6   libtk8.6.dylib                      0x0000000125322bf4 TkpGetColor + 484
      7   libtk8.6.dylib                      0x000000012525a629 Tk_GetColor + 153
      8   libtk8.6.dylib                      0x0000000125249c66 Tk_Get3DBorder + 134
      9   libtk8.6.dylib                      0x0000000125249acf Tk_Alloc3DBorderFromObj + 127
      10  libtk8.6.dylib                      0x000000012525bb81 DoObjConfig + 1009
      11  libtk8.6.dylib                      0x000000012525b675 Tk_InitOptions + 357
      12  libtk8.6.dylib                      0x000000012525b555 Tk_InitOptions + 69
      13  libtk8.6.dylib                      0x000000012528c7d5 CreateFrame + 1605
      14  libtk8.6.dylib                      0x000000012528cab7 TkListCreateFrame + 151
      15  libtk8.6.dylib                      0x00000001252845b8 Initialize + 2120
      16  _tkinter.cpython-311-darwin.so      0x000000011187b6fb Tcl_AppInit + 91
      17  _tkinter.cpython-311-darwin.so      0x000000011187b3e9 Tkapp_New + 585
      18  _tkinter.cpython-311-darwin.so      0x000000011187b18e _tkinter_create_impl + 222
      19  _tkinter.cpython-311-darwin.so      0x000000011187ad96 _tkinter_create + 182
      20  python3.11                          0x000000010acf0aad cfunction_vectorcall_FASTCALL + 93
      21  python3.11                          0x000000010ade4ef7 _PyEval_EvalFrameDefault + 238407
      22  python3.11                          0x000000010ac8b89f _PyFunction_Vectorcall + 511
      23  python3.11                          0x000000010ac8df30 _PyObject_Call_Prepend + 192
      24  python3.11                          0x000000010ad20777 slot_tp_init + 183
      25  python3.11                          0x000000010ad1469a type_call + 122
      26  python3.11                          0x000000010ade5095 _PyEval_EvalFrameDefault + 238821
      27  python3.11                          0x000000010ac8b89f _PyFunction_Vectorcall + 511
      28  python3.11                          0x000000010ac917d4 method_vectorcall + 452
      29  QtCore.abi3.so                      0x000000012415a1dd _ZNK8PyQtSlot4callEP7_objectS1_ + 125
      30  QtCore.abi3.so                      0x000000012415a08e _ZNK8PyQtSlot6invokeEPPvP7_objectS0_b + 398
      31  QtCore.abi3.so                      0x000000012415ac85 _ZN13PyQtSlotProxy7unislotEPPv + 85
      32  QtCore.abi3.so                      0x000000012415abfa _ZN13PyQtSlotProxy11qt_metacallEN11QMetaObject4CallEiPPv + 58
      33  libQt5Core.5.15.2.dylib             0x00000001248df903 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 2457
  )
  libc++abi: terminating due to uncaught exception of type NSException

  Process finished with exit code 134 (interrupted by signal 6:SIGABRT)
oceancolorcoder commented 1 week ago

I had the same experience as Nils on MacOS Sonoma M3. I then updated the hypercp environment to get cdsapi 0.7.4, and when clicking Edit in the Main window, the program crashed with the following error message:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSApplication macOSVersion]: unrecognized selector sent to instance 0x36af1be40'
*** First throw call stack:
(
        0   CoreFoundation                      0x000000018c6962cc __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x000000018c17a158 objc_exception_throw + 60
        2   CoreFoundation                      0x000000018c748568 -[NSObject(NSObject) __retain_OA] + 0
        3   CoreFoundation                      0x000000018c5fff1c ___forwarding___ + 1580
        4   CoreFoundation                      0x000000018c5ff830 _CF_forwarding_prep_0 + 96
        5   libtk8.6.dylib                      0x00000001100cd918 GetRGBA + 64
        6   libtk8.6.dylib                      0x00000001100cd714 TkpGetColor + 428
        7   libtk8.6.dylib                      0x00000001100177bc Tk_GetColor + 168
        8   libtk8.6.dylib                      0x0000000110008b7c Tk_Get3DBorder + 152
        9   libtk8.6.dylib                      0x00000001100089bc Tk_Alloc3DBorderFromObj + 144
        10  libtk8.6.dylib                      0x0000000110018e08 DoObjConfig + 1008
        11  libtk8.6.dylib                      0x0000000110018918 Tk_InitOptions + 372
        12  libtk8.6.dylib                      0x00000001100187fc Tk_InitOptions + 88
        13  libtk8.6.dylib                      0x00000001100460f8 CreateFrame + 1472
        14  libtk8.6.dylib                      0x0000000110046424 TkListCreateFrame + 172
        15  libtk8.6.dylib                      0x000000011003ecbc Initialize + 1888
        16  _tkinter.cpython-311-darwin.so      0x00000001047aa13c Tkapp_New + 876
        17  _tkinter.cpython-311-darwin.so      0x00000001047a9bb0 _tkinter_create + 648
        18  python3.11                          0x0000000102360ef4 cfunction_vectorcall_FASTCALL + 256
        19  python3.11                          0x0000000102309090 PyObject_Vectorcall + 76
        20  python3.11                          0x000000010240a930 _PyEval_EvalFrameDefault + 46152
        21  python3.11                          0x000000010240ef0c _PyEval_Vector + 184
        22  python3.11                          0x00000001023089f4 _PyObject_FastCallDictTstate + 320
        23  python3.11                          0x0000000102309884 _PyObject_Call_Prepend + 176
        24  python3.11                          0x00000001023848d8 slot_tp_init + 196
        25  python3.11                          0x000000010237ced0 type_call + 464
        26  python3.11                          0x0000000102308788 _PyObject_MakeTpCall + 332
        27  python3.11                          0x000000010240a930 _PyEval_EvalFrameDefault + 46152
        28  python3.11                          0x000000010240ef0c _PyEval_Vector + 184
        29  python3.11                          0x00000001023089f4 _PyObject_FastCallDictTstate + 320
        30  python3.11                          0x0000000102309884 _PyObject_Call_Prepend + 176
        31  python3.11                          0x00000001023848d8 slot_tp_init + 196
        32  python3.11                          0x000000010237ced0 type_call + 464
        33  python3.11                          0x0000000102308788 _PyObject_MakeTpCall + 332
        34  python3.11                          0x000000010240a930 _PyEval_EvalFrameDefault + 46152
        35  python3.11                          0x000000010240ef0c _PyEval_Vector + 184
        36  python3.11                          0x000000010230c2f4 method_vectorcall + 344
        37  QtCore.abi3.so                      0x0000000105c5be80 _ZNK8PyQtSlot4callEP7_objectS1_ + 152
        38  QtCore.abi3.so                      0x0000000105c5bcbc _ZNK8PyQtSlot6invokeEPPvP7_objectS0_b + 324
        39  QtCore.abi3.so                      0x0000000105c5ca5c _ZN13PyQtSlotProxy7unislotEPPv + 92
        40  QtCore.abi3.so                      0x0000000105c5c9cc _ZN13PyQtSlotProxy11qt_metacallEN11QMetaObject4CallEiPPv + 68
        41  libQt5Core.5.15.2.dylib             0x00000001063e7070 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 2332
        42  libQt5Widgets.5.15.2.dylib          0x0000000110ba2e28 _ZN7QWidget5eventEP6QEvent + 104
        43  libQt5Widgets.5.15.2.dylib          0x0000000110b7d1f4 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 232
        44  libQt5Core.5.15.2.dylib             0x00000001063ca710 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 176
        45  libQt5Core.5.15.2.dylib             0x00000001063ca710 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 176
        46  CoreFoundation                      0x000000018c62144c __CFRunLoopDoSource0 + 176
        47  CoreFoundation                      0x000000018c6211bc __CFRunLoopDoSources0 + 244
        48  CoreFoundation                      0x000000018c61fda8 __CFRunLoopRun + 828
        49  CoreFoundation                      0x000000018c61f414 CFRunLoopRunSpecific + 608
        50  HIToolbox                           0x0000000196dca19c RunCurrentEventLoopInMode + 292
        51  HIToolbox                           0x0000000196dc9e2c ReceiveNextEventCommon + 220
        52  HIToolbox                           0x0000000196dc9d30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
        53  AppKit                              0x000000018fe7ecc8 _DPSNextEvent + 660
        54  AppKit                              0x00000001906754d0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
        55  AppKit                              0x000000018fe71ffc -[NSApplication run] + 476
        56  libqcocoa.dylib                     0x000000036b384aec qt_plugin_instance + 142324
        57  python3.11                          0x000000010236011c cfunction_call + 284
        58  python3.11                          0x0000000102308788 _PyObject_MakeTpCall + 332
        59  python3.11                          0x000000010240a930 _PyEval_EvalFrameDefault + 46152
        60  python3.11                          0x00000001023fe518 PyEval_EvalCode + 220
        61  python3.11                          0x00000001023fa2d0 builtin_exec + 1156
        62  python3.11                          0x0000000102360d98 cfunction_vectorcall_FASTCALL_KEYWORDS + 168
        63  python3.11                          0x0000000102309090 PyObject_Vectorcall + 76
        64  python3.11                          0x000000010240a930 _PyEval_EvalFrameDefault + 46152
        65  python3.11                          0x00000001023fe518 PyEval_EvalCode + 220
        66  python3.11                          0x00000001023fa2d0 builtin_exec + 1156
        67  python3.11                          0x0000000102360d98 cfunction_vectorcall_FASTCALL_KEYWORDS + 168
        68  python3.11                          0x0000000102309090 PyObject_Vectorcall + 76
        69  python3.11                          0x000000010240a930 _PyEval_EvalFrameDefault + 46152
        70  python3.11                          0x000000010240ef0c _PyEval_Vector + 184
        71  python3.11                          0x0000000102489ec0 pymain_run_module + 272
        72  python3.11                          0x00000001024898c0 Py_RunMain + 2476
        73  python3.11                          0x000000010248a988 pymain_main + 1252
        74  python3.11                          0x00000001022ab958 main + 56
        75  dyld                                0x000000018c1b7154 start + 2476
)
libc++abi: terminating due to uncaught exception of type NSException

I then deleted the hypercp environment completely and reinstalled it from scratch with the same result.

PR rolled back on dev.

oceancolorcoder commented 1 day ago

Resolved in v1.2.10