0

I was working on a tweak and everything was going fine, but suddenly the app I was hooking into started giving a ton of __NSAutoreleaseNoPool() errors and crashing. Ive removed the tweak, deleted and reinstalled the app, and restarted the device, but I keep getting the same error. Anyone know how to fix this?

This is the code: #import

@interface JMOutlineViewController : UIViewController
@end
@interface PostsViewController : JMOutlineViewController
-(void)hideAll;
@end

%hook PostsViewController

-(void)hideAll {
    if ([self.title isEqual:@"Hidden"]) {
        NSLog(@"we are in the hidden tab");
    } else {
       %orig;
    }
}
%end

Here it is on pastebin

user2272641
  • 131
  • 1
  • 3
  • 16

1 Answers1

0
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

Insert that code after -(void}hideAll {
Then at the end of your method do [pool release]

Hope this helped

  • But that code isnt being executed anymore. I removed the tweak, as well as reinstalled the app. There is nothing modifying the apps code, yet it is still crashing – user2272641 Jun 20 '13 at 15:31
  • Have you tried reinstalling MobileSubstrate? It could be a problem with "the app" you are trying to modify as well? –  Jun 22 '13 at 08:50
  • Reinstalling MobileSubstrate didnt help. And the app worked fine before, and works on all my other devices – user2272641 Jun 22 '13 at 10:00