ReactiveCocoa / ReactiveObjC

The 2.x ReactiveCocoa Objective-C API: Streams of values over time
MIT License
2.6k stars 496 forks source link

crash with RAC 2.5 #137

Open chdzq opened 6 years ago

chdzq commented 6 years ago

i can't find reasion:

#0Crashed: com.apple.main-threadEXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000b5b8 Raw Text
--
0  | libobjc.A.dylib | objc_msgSend + 16
1  | UIKit | -[UIImageView stopAnimating] + 52
2  | UIKit | -[UIImageView dealloc] + 88
3  | libobjc.A.dylib | (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
4  | UIKit | -[UIView dealloc] + 952
5  | UIKit | -[UIControl dealloc] + 68
6  | UIKit | -[UIButton dealloc] + 96
7  | MomoChat | NSObject+RACDeallocating.m line 50__swizzleDeallocIfNeeded_block_invoke
8  | MomoChat | MLBroadcastBottomBar.m line 59-[MLBroadcastBottomBar .cxx_destruct]
9  | libobjc.A.dylib | object_cxxDestructFromClass(objc_object*, objc_class*) + 148
10 | libobjc.A.dylib | objc_destructInstance + 68
11 | libobjc.A.dylib | object_dispose + 16
12 | UIKit | -[UIResponder dealloc] + 152
13 | UIKit | -[UIView dealloc] + 980
14 | MomoChat | MLBroadcastBottomBar.m line 74-[MLBroadcastBottomBar dealloc]
15 | libobjc.A.dylib | (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
16 | UIKit | -[UIView dealloc] + 952
17 | MomoChat | MLView.m line 21-[MLView dealloc]
18 | libobjc.A.dylib | (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
19 | UIKit | -[UIView dealloc] + 952
20 | MomoChat | MLView.m line 21-[MLView dealloc]
21 | CoreFoundation | -[__NSArrayM dealloc] + 140
22 | libobjc.A.dylib | (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
23 | UIKit | -[UIView dealloc] + 952
24 | MomoChat | MLView.m line 21-[MLView dealloc]
25 | libobjc.A.dylib | (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
26 | CoreFoundation | _CFAutoreleasePoolPop + 28
27 | CoreFoundation | __CFRunLoopRun + 2280
28 | CoreFoundation | CFRunLoopRunSpecific + 552
29 | GraphicsServices | GSEventRunModal + 100
30 | UIKit | UIApplicationMain + 236
31 | MomoChat | main.m line 29main
32 | libdyld.dylib | start + 4
mdiep commented 6 years ago

This looks like the UIImageView has a reference to an unowned or otherwise invalid object.

chdzq commented 6 years ago

i crazy this code:

#0Crashed: com.apple.main-threadEXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000b5b8 Raw Text
--
0  | libobjc.A.dylib | objc_msgSend + 16
1  | UIKit | -[UIImageView stopAnimating] + 52
2  | UIKit | -[UIImageView dealloc] + 88
3  | libobjc.A.dylib | (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 844
4  | UIKit | -[UIView dealloc] + 952
5  | UIKit | -[UIControl dealloc] + 68
6  | UIKit | -[UIButton dealloc] + 96

this crash between in [UIButton dealloc].

i dont know the UIImageView, is button.imageView?