zdavatz / amiko-osx

AmiKo Desitin for AmiKo OS X
https://apps.apple.com/ch/app/amiko-desitin/id708142753?mt=12
GNU General Public License v3.0
3 stars 2 forks source link

Text Analysis crashes on latest macOS 13.4.1 #251

Closed zdavatz closed 1 year ago

zdavatz commented 1 year ago
  1. Start AmiKo OSX from Xcode
  2. Hit Apple+I
  3. Load the CSV file: chiara.csv
  4. App hangs with the following error:
    2023-07-06 11:47:48.414440+0200 AmiKo Desitin[1146:14793] Line 3778, rn: 57452 has chapter set: {(
    7
    )}
    2023-07-06 11:47:48.418773+0200 AmiKo Desitin[1146:14793] -[MLMainWindowController searchKeyword:inMedication:chapters:regnr:] 3532, chapters {(
    7
    )}
    2023-07-06 11:47:48.419908+0200 AmiKo Desitin[1146:14793] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSXMLDocument initWithXMLString:options:error:]: nil argument'
    *** First throw call stack:
    (
    0   CoreFoundation                      0x0000000180a6f154 __exceptionPreprocess + 176
    1   libobjc.A.dylib                     0x000000018058e4d4 objc_exception_throw + 60
    2   Foundation                          0x0000000181f043e8 -[NSXMLDocument initWithData:options:validExternalEntityURLs:error:] + 0
    3   AmiKo Desitin                       0x000000010027c334 -[MLMainWindowController searchKeyword:inMedication:chapters:regnr:] + 668
    4   AmiKo Desitin                       0x000000010027da98 -[MLMainWindowController csvProcessKeywords:] + 1512
    5   AmiKo Desitin                       0x000000010027e6b8 __54-[MLMainWindowController exportWordListSearchResults:]_block_invoke + 48
    6   libdispatch.dylib                   0x00000001007f0e30 _dispatch_call_block_and_release + 32
    7   libdispatch.dylib                   0x00000001007f299c _dispatch_client_callout + 20
    8   libdispatch.dylib                   0x00000001007f5960 _dispatch_queue_override_invoke + 1196
    9   libdispatch.dylib                   0x000000010080a908 _dispatch_root_queue_drain + 408
    10  libdispatch.dylib                   0x000000010080b52c _dispatch_worker_thread2 + 196
    11  libsystem_pthread.dylib             0x00000001003f7c8c _pthread_wqthread + 228
    12  libsystem_pthread.dylib             0x00000001003ffa6c start_wqthread + 8
    )
    2023-07-06 11:47:48.420043+0200 AmiKo Desitin[1146:14793] [General] An uncaught exception was raised
    2023-07-06 11:47:48.420069+0200 AmiKo Desitin[1146:14793] [General] *** -[NSXMLDocument initWithXMLString:options:error:]: nil argument
    2023-07-06 11:47:48.420101+0200 AmiKo Desitin[1146:14793] [General] (
    0   CoreFoundation                      0x0000000180a6f154 __exceptionPreprocess + 176
    1   libobjc.A.dylib                     0x000000018058e4d4 objc_exception_throw + 60
    2   Foundation                          0x0000000181f043e8 -[NSXMLDocument initWithData:options:validExternalEntityURLs:error:] + 0
    3   AmiKo Desitin                       0x000000010027c334 -[MLMainWindowController searchKeyword:inMedication:chapters:regnr:] + 668
    4   AmiKo Desitin                       0x000000010027da98 -[MLMainWindowController csvProcessKeywords:] + 1512
    5   AmiKo Desitin                       0x000000010027e6b8 __54-[MLMainWindowController exportWordListSearchResults:]_block_invoke + 48
    6   libdispatch.dylib                   0x00000001007f0e30 _dispatch_call_block_and_release + 32
    7   libdispatch.dylib                   0x00000001007f299c _dispatch_client_callout + 20
    8   libdispatch.dylib                   0x00000001007f5960 _dispatch_queue_override_invoke + 1196
    9   libdispatch.dylib                   0x000000010080a908 _dispatch_root_queue_drain + 408
    10  libdispatch.dylib                   0x000000010080b52c _dispatch_worker_thread2 + 196
    11  libsystem_pthread.dylib             0x00000001003f7c8c _pthread_wqthread + 228
    12  libsystem_pthread.dylib             0x00000001003ffa6c start_wqthread + 8
    )
    libc++abi: terminating due to uncaught exception of type NSException
    (lldb) 
zdavatz commented 1 year ago

If their is no entry in the amiko_db_full_idx_de.db' but their is an entry in 'amiko_frequency_de.db leave the line empty in the CSV export, where there is no data. Just put the 5 digit Swissmedic Number. Just put the data you have and do not abort the process.