callzhang / WokeAlarm

Your everyday alarm clock app, now socialized.
http://wokealarm.com
0 stars 0 forks source link

-[EWMedia objectForKeyedSubscript:]: unrecognized selector sent to instance 0x7f9896c33c00 #81

Closed callzhang closed 9 years ago

callzhang commented 9 years ago

image 2015-03-06 00:30:31.082 Woke[51158:21274940] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[EWMedia objectForKeyedSubscript:]: unrecognized selector sent to instance 0x7f9896c33c00' * First throw call stack: ( 0 CoreFoundation 0x0000000109ee3f35 exceptionPreprocess + 165 1 libobjc.A.dylib 0x00000001097cdbb7 objc_exception_throw + 45 2 CoreFoundation 0x0000000109eeb04d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x0000000109e4327c __forwarding + 988 4 CoreFoundation 0x0000000109e42e18 _CF_forwarding_prep_0 + 120 5 Woke 0x0000000104873748 -[EWReceivedVoiceChildViewController tableView:didSelectRowAtIndexPath:] + 136 6 UIKit 0x000000010835e393 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1293 7 UIKit 0x000000010835e4d4 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219 8 UIKit 0x0000000108299331 _applyBlockToCFArrayCopiedToStack + 314 9 UIKit 0x00000001082991ab _afterCACommitHandler + 516 10 CoreFoundation 0x0000000109e18dc7 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 11 CoreFoundation 0x0000000109e18d20 CFRunLoopDoObservers + 368 12 CoreFoundation 0x0000000109e0eb53 CFRunLoopRun + 1123 13 CoreFoundation 0x0000000109e0e486 CFRunLoopRunSpecific + 470 14 GraphicsServices 0x000000010b2189f0 GSEventRunModal + 161 15 UIKit 0x0000000108276420 UIApplicationMain + 1282 16 Woke 0x000000010488a103 main + 115 17 libdyld.dylib 0x000000010a58a145 start + 1 18 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

caoer commented 9 years ago

this crash is likely in EWSentVoiceCHildViewController. due to the data structural change. I've made an example change in https://github.com/callzhang/WokeAlarm/commit/736c22c59b79a6f80f38ca59cf14221d8635826d

however, the call to get sent voice is still incorrect. assigning the future fix to @callzhang as you have better understanding about the sent/received voice api call.

callzhang commented 9 years ago

Sent voices are in [EWPerson me].sentMedias. What is incorrect?

caoer commented 9 years ago

receivedMedia is attached to EWAcitiviy, right? how about sent media? will it going to follow the same design?

callzhang commented 9 years ago

received: from [EWPerson myActivities] -> medias sent medias: [EWPerson me].sentMedias

caoer commented 9 years ago

what do you mean? did you get what I mean??

why [EWPerson me].sentMedias is different from getting received medias? since getting received medias is get from EWAcivity? if sent medias is designed differently, will it face the same design issue?

callzhang commented 9 years ago

EWActivity is the log of daily wake up activity. For received medias, we segregate it by day it is received and listened. For that reason, we use the activity->medias as the unit (section) to display medias. For sent medias, it's not related to wake up activity. Therefore we don't segregate the media into sections. Thus we can simply get it from sentMedias. @justfinish let us know if you think differently.

caoer commented 9 years ago

are we going to organize the sent medias by day as well? like in Sent Voice View. I'm worrying aggregating sent medias in one collection will lose data integration. also I don't see the reason for designing them to be differently.

callzhang commented 9 years ago

@caoer is this fixed?