Sunset Lake Software - Comments for "Crash when external screen is disconnected while app in background" http://www.sunsetlakesoftware.com/forum/crash-when-external-screen-disconnected-while-app-background Comments for "Crash when external screen is disconnected while app in background" en I may well be the same person http://www.sunsetlakesoftware.com/forum/crash-when-external-screen-disconnected-while-app-background#comment-1390 <p>I may well be the same person you’re thinking of; I decided to move my questions to this forum because they would be more likely helpful to others using the framework in the future than if I kept them on the course mailing list. But yes, if I find any actual issues, I will certainly file them. And if I add anything that might be useful as part of the framework I will let you know and perhaps submit a pull request, if I can figure out that side of git. Like another forum user, I might end up finding a use for looped video sources. And I have a glimmer in my eye about animated sprite overlays… Someday. But things are working great for now, and I am excited and having fun!</p> pubDate Tue, 15 May 2012 16:05:13 +0000 dc:creator brunchboy guid false comment 1390 at http://www.sunsetlakesoftware.com Cool. Good to hear that you http://www.sunsetlakesoftware.com/forum/crash-when-external-screen-disconnected-while-app-background#comment-1388 <p>Cool. Good to hear that you were able to get to the bottom of it. I know someone else here who was also trying to filter video to an AirPlay output, so if there was a bug with that they'd want to know about it too.</p> <p>If you do run into any bugs with the framework when doing this (I haven't done much testing yet with the external screen outputs), please file them on the Issues tracker on the project GitHub page. That's worked pretty well as a to-do list for fixing the issues people are running into in the wild.</p> pubDate Tue, 15 May 2012 04:22:32 +0000 dc:creator Brad Larson guid false comment 1388 at http://www.sunsetlakesoftware.com Ah hah. It was my own fault, http://www.sunsetlakesoftware.com/forum/crash-when-external-screen-disconnected-while-app-background#comment-1387 <p>Ah hah. It was my own fault, of course. I put some breakpoints in GPUImageOutput’s addTarget: and removeTarget: methods and watched what was going on, and discovered that I had been careless, and two different notifications would cause a window to be allocated to the external screen and added as a target for the filtered video, and both were unexpectedly being received, so I was ending up with an extra window in the pipeline, and only getting rid of one of them when the application was suspended later.</p> <p>So I will tighten up my code, and expect everything will work just fine. It will also be doing half as much work, with only the one window being rendered to.</p> <p>Having the source for the library is so helpful, and this exercise helped me learn a bit more about how it actually works.</p> pubDate Tue, 15 May 2012 04:17:56 +0000 dc:creator brunchboy guid false comment 1387 at http://www.sunsetlakesoftware.com Right, since posting this I http://www.sunsetlakesoftware.com/forum/crash-when-external-screen-disconnected-while-app-background#comment-1386 <p>Right, since posting this I discovered that the crash does not occur if I don’t re-enable camera capture when the app returns from the background (but of course that means the app stops being useful so it is not a solution). This makes me wonder if somehow that GPUImageView is not successfully being removed from the pipeline. Is there an easy way to test that?</p> pubDate Tue, 15 May 2012 00:13:07 +0000 dc:creator brunchboy guid false comment 1386 at http://www.sunsetlakesoftware.com That framebuffer failure http://www.sunsetlakesoftware.com/forum/crash-when-external-screen-disconnected-while-app-background#comment-1385 <p>That framebuffer failure crash generally occurs when you try to create a framebuffer of an illegal size, usually (0,0). Something here must be causing the pipeline to try to recreate the framebuffer at a null size, but I'm not sure what's triggering that. I would think that you should be safe by disabling the camera capture when this goes to the background, so that it won't send any frames into the pipeline when you come back, but that doesn't seem to be working.</p> <p>Looking at it, the assertion is in your GPUImageView, and I see that I recreate the display framebuffer on a resizing of the view. I wonder if you logged the view's size in the -observeValueForKeyPath:ofObject:change:context: method there if you'd see the size go to zero when the external display is disconnected. If so, you might be able to work around this by altering GPUImageView to not destroy and recreate the framebuffer if the view size is set to 0,0.</p> pubDate Mon, 14 May 2012 23:15:21 +0000 dc:creator Brad Larson guid false comment 1385 at http://www.sunsetlakesoftware.com