Atelier-Shiori / malupdaterosx-cocoa

Native MyAnimeList Scrobbler for macOS
https://malupdaterosx.moe/malupdaterosx/
BSD 3-Clause "New" or "Revised" License
24 stars 3 forks source link

stripHTML crash #12

Closed moyitpro closed 9 years ago

moyitpro commented 9 years ago
2015/09/04 15:48:18.239 MAL Updater OS X[67825]: -[NSNull stripHtml]: unrecognized selector sent to instance 0x7fff72e4d240
2015/09/04 15:48:18.240 MAL Updater OS X[67825]: An uncaught exception was raised
2015/09/04 15:48:18.240 MAL Updater OS X[67825]: -[NSNull stripHtml]: unrecognized selector sent to instance 0x7fff72e4d240
2015/09/04 15:48:18.240 MAL Updater OS X[67825]: (
    0   CoreFoundation                      0x00007fff8d9a625c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff8623ee75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8d9a912d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00007fff8d904272 ___forwarding___ + 1010
    4   CoreFoundation                      0x00007fff8d903df8 _CF_forwarding_prep_0 + 120
    5   MAL Updater OS X                    0x000000010e95bb4e MAL Updater OS X + 31566
    6   MAL Updater OS X                    0x000000010e959749 MAL Updater OS X + 22345
    7   libdispatch.dylib                   0x00007fff83c231bb _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007fff83c2028d _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007fff83c27ef0 _dispatch_main_queue_callback_4CF + 333
    10  CoreFoundation                      0x00007fff8d90d4f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    11  CoreFoundation                      0x00007fff8d8c8714 __CFRunLoopRun + 1636
    12  CoreFoundation                      0x00007fff8d8c7e75 CFRunLoopRunSpecific + 309
    13  HIToolbox                           0x00007fff83d5fa0d RunCurrentEventLoopInMode + 226
    14  HIToolbox                           0x00007fff83d5f7b7 ReceiveNextEventCommon + 479
    15  HIToolbox                           0x00007fff83d5f5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
    16  AppKit                              0x00007fff80e6524e _DPSNextEvent + 1434
    17  AppKit                              0x00007fff80e6489b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
    18  AppKit                              0x00007fff80e5899c -[NSApplication run] + 553
    19  AppKit                              0x00007fff80e43783 NSApplicationMain + 940
    20  libdyld.dylib                       0x00007fff86f1e5fd start + 1
    21  ???                                 0x0000000000000001 0x0 + 1
)
2015/09/04 15:48:18.241 MAL Updater OS X[67825]: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull stripHtml]: unrecognized selector sent to instance 0x7fff72e4d240'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8d9a625c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff8623ee75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8d9a912d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00007fff8d904272 ___forwarding___ + 1010
    4   CoreFoundation                      0x00007fff8d903df8 _CF_forwarding_prep_0 + 120
    5   MAL Updater OS X                    0x000000010e95bb4e MAL Updater OS X + 31566
    6   MAL Updater OS X                    0x000000010e959749 MAL Updater OS X + 22345
    7   libdispatch.dylib                   0x00007fff83c231bb _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007fff83c2028d _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007fff83c27ef0 _dispatch_main_queue_callback_4CF + 333
    10  CoreFoundation                      0x00007fff8d90d4f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    11  CoreFoundation                      0x00007fff8d8c8714 __CFRunLoopRun + 1636
    12  CoreFoundation                      0x00007fff8d8c7e75 CFRunLoopRunSpecific + 309
    13  HIToolbox                           0x00007fff83d5fa0d RunCurrentEventLoopInMode + 226
    14  HIToolbox                           0x00007fff83d5f7b7 ReceiveNextEventCommon + 479
    15  HIToolbox                           0x00007fff83d5f5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
    16  AppKit                              0x00007fff80e6524e _DPSNextEvent + 1434
    17  AppKit                              0x00007fff80e6489b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
    18  AppKit                              0x00007fff80e5899c -[NSApplication run] + 553
    19  AppKit                              0x00007fff80e43783 NSApplicationMain + 940
    20  libdyld.dylib                       0x00007fff86f1e5fd start + 1
    21  ???                                 0x0000000000000001 0x0 + 1
)

Need to add a check to make sure not to perform stripHTML with a null instance.

vgerak commented 9 years ago

Having the same issue. Seems to happen every time an episode is successfully scrobbled, crashing the app.

moyitpro commented 9 years ago

Seems that I'm not the only one... I will fix it once I return from Labor Day weekend since my development environment is at home.

moyitpro commented 9 years ago

Looks like an issue with the API no longer outputing the synopsis. I will file a bug report with Atarashii api.

I will issue a fix tomorrow evening in the meantime.

{ "rank": 2014, "sequels": [ ], "watched_status": null, "status": "currently airing", "title": "The iDOLM@STER Cinderella Girls 2nd Season", "side_stories": [ ], "tags": [ ], "members_score": 7.3499999999999996, "synopsis": null, "members_count": 7560, "end_date": null, "spin_offs": [ ], "summaries": [ ], "score": null, "listed_anime_id": null, "character_anime": [ ], "other_titles": { "english": [ "THE IDOLM@STER CINDERELLA GIRLS 2nd SEASON" ], "japanese": [ "アイドルマスター シンデレラガールズ 2ndシーズン" ], "synonyms": [ "The Idolmaster Cinderella Girls Second Season" ] }, "popularity_rank": 2696, "manga_adaptations": [ ], "type": "TV", "parent_story": null, "id": 30344, "episodes": 0, "prequels": [ ], "alternative_versions": [ ], "watched_episodes": null, "genres": [ "Comedy", "Drama", "Music" ], "start_date": "Sat Jul 18 12:00:00 -0400 2015", "classification": "PG-13 - Teens 13 or older", "favorited_count": 17, "image_url": "http://cdn.myanimelist.net/images/anime/9/75120.jpg" }

moyitpro commented 9 years ago

Seems that the newer version of Atarashii-API fixed it. It seems that some changes with MyAnimeList site has broken it.

No fix will be issued since the API is now fixed. I will figure out a way to keep it updated automatically.