2012-05-22 34 views
0

在應用程序:didFinishLaunchingWithOptions:方法期間,我收到「wait_fences:無法接收回復:10004003」。wait_fences:未能收到回覆:10004003 - 在應用程序中:didFinishLaunchingWithOptions:

我有子類UIWindow並重寫了引起錯誤的drawRect方法。然而,我不知道錯誤是想告訴我什麼,它爲什麼發生以及如何解決它。

- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { 

     window_ = [[OoviumWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 
     [window_ makeKeyAndVisible]; 
     controller_ = [[AetherController alloc] init]; 
     [window_ setRootViewController:controller_]; 

     return YES; 
    } 



    @implementation OoviumWindow 

    - (id) initWithFrame:(CGRect)rect { 
     if (self = [super initWithFrame:rect]) { 
      _image = [[UIImage imageNamed:@"Default-Portrait.png"] retain]; 
     } 
     return self; 
    } 
    // UIWindow ====================================================================================== 
    - (void) drawRect:(CGRect)rect { 
     [_image drawInRect:_rect blendMode:kCGBlendModeNormal alpha:.05]; 
    } 

    @end 
+0

[「wait_fences:failed to receive reply:10004003」?](http://stackoverflow.com/questions/1371346/wait-fences-failed-to-receive-reply-10004003) – bbum

回答

0

這看起來是有效的"wait_fences: failed to receive reply: 10004003"?

你的症狀是在您使用application:didFinishLaunchingWithOptions:稍有不同的副本,但最終的結果是,你在應用程序生命週期爲時尚早觸發渲染操作。

+0

不幸的是,沒有的解決方案是相關的。考慮到我的代碼,我不清楚我是否觸發了任何渲染操作。很顯然,有些東西導致UIWindow呈現,但我不知道我能做些什麼,因爲它不是由我的代碼觸發的。 – aepryus

+0

@aepryus:'makeKeyAndVisible'會導致你的窗口被繪製 - 它會如何變得可見? –

+0

夠公平的。但是不是必須在應用程序中調用該方法:didFinishLaunchingWithOptions:? – aepryus

相關問題