farhan678 / adwhirl

Automatically exported from code.google.com/p/adwhirl
0 stars 0 forks source link

Crash on reachability change #259

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Place an AdWhirlView on a UIView using addSubview
2. Remove the AdWhirlView when unloading the parent view
3. Change connectivity

What is the expected output? What do you see instead?
Expected = nothing.  Instead = crash as follows:

#0  0x367de4b0 in ___forwarding___ ()
#1  0x36755180 in __forwarding_prep_0___ ()
#2  0x000bf578 in -[AWNetworkReachabilityWrapper gotCallback:flags:] 
(self=0xb123b00, _cmd=0x1256ae, reachability=0xb1232a0, flags=2) at 
AWNetworkReachabilityWrapper.m:159
#3  0x000bf610 in reachabilityCallback (reachability=0xb1232a0, flags=2, 
data=0xb123b00) at AWNetworkReachabilityWrapper.m:169
#4  0x35cbfe36 in rlsPerform ()
#5  0x367b2a78 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#6  0x367b475e in __CFRunLoopDoSources0 ()
#7  0x367b54ea in __CFRunLoopRun ()
#8  0x36745ec2 in CFRunLoopRunSpecific ()
#9  0x36745dca in CFRunLoopRunInMode ()
#10 0x35eff41e in GSEventRunModal ()
#11 0x35eff4ca in GSEventRun ()
#12 0x355efd68 in -[UIApplication _run] ()
#13 0x355ed806 in UIApplicationMain ()
#14 0x000035f2 in main (argc=1, argv=0x2fdff31c) at main.m:14

What version of the product are you using? On what operating system?
SDK 3.0.0

Please provide any additional information below.

Here's the line in the AWNetworkReachabilityWrapper where the error took place:

  // notify delegate that host just got reachable
  if (self.delegate != nil && [self.delegate respondsToSelector:
                                    @selector(reachabilityBecameReachable:)]) {
    [self.delegate reachabilityBecameReachable:self];
  }
}

2011-10-02 16:03:38.136 Xingo[21227:707] *** -[AdWhirlView 
respondsToSelector:]: message sent to deallocated instance 0xb1ca430

I'm guessing the notification request isn't being canceled when the view is 
unloaded.

Original issue reported on code.google.com by sso...@transcriptix.com on 2 Oct 2011 at 9:15

GoogleCodeExporter commented 9 years ago
I have the same problem. We need to fix this.

Original comment by kangmo....@thankyousoft.com on 1 Nov 2011 at 4:35

GoogleCodeExporter commented 9 years ago

Original comment by wesgood...@google.com on 8 Nov 2011 at 2:25