Operations Beachball

2012-12-04 Thread Gerriet M. Denkmann
My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. I would expect that the app thus remains responsive, but sometimes it is not. A sure way to beach-ball my app is: start it with a few hundred operations (which will take about 20 seconds to

Re: Operations Beachball

2012-12-04 Thread Mike Abdullah
You have a performance problem. Thus you should use Instruments to see what is going on, rather than hope we can tell you from vague snippets of code. On 4 Dec 2012, at 10:29, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts

Re: Operations Beachball

2012-12-04 Thread Gerriet M. Denkmann
On 4 Dec 2012, at 17:49, Mike Abdullah cocoa...@mikeabdullah.net wrote: You have a performance problem. Thus you should use Instruments to see what is going on, rather than hope we can tell you from vague snippets of code. Maybe I should use Instruments, problem is: I cannot. I start

Re: Operations Beachball

2012-12-04 Thread Roland King
Can you not run Instruments from the 'Profile' button on Xcode? It should start the process and attach to it and go from there. On 4 Dec, 2012, at 7:02 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On 4 Dec 2012, at 17:49, Mike Abdullah cocoa...@mikeabdullah.net wrote: You have a

Re: Operations Beachball

2012-12-04 Thread jonat...@mugginsoft.com
On 4 Dec 2012, at 10:29, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. I would expect that the app thus remains responsive, but sometimes it is not. A sure way to beach-ball my app

Re: Operations Beachball

2012-12-04 Thread Gerriet M. Denkmann
On 4 Dec 2012, at 18:10, Roland King r...@rols.org wrote: Can you not run Instruments from the 'Profile' button on Xcode? It should start the process and attach to it and go from there. I got the Leaks Instrument to work this way (no Leaks) But all other Instruments just prompted

Re: Operations Beachball

2012-12-04 Thread Gerriet M. Denkmann
On 4 Dec 2012, at 18:31, jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: On 4 Dec 2012, at 10:29, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. I would expect that the

Re: Get the current displayed NSAlert

2012-12-04 Thread Brad O'Hearne
In general -- any alert that requires user attention (especially ones with multiple button alternatives) can be left on the screen indefinitely by a user. If you are monitoring environmental conditions (such as network, server, or Internet reachability) that arise, it is always possible that

Re: Get the current displayed NSAlert

2012-12-04 Thread Kyle Sluder
On Dec 4, 2012, at 7:49 AM, Brad O'Hearne br...@bighillsoftware.com wrote: In general -- any alert that requires user attention (especially ones with multiple button alternatives) can be left on the screen indefinitely by a user. If you are monitoring environmental conditions (such as

Re: Layers in NSCollectionView

2012-12-04 Thread Gordon Apple
Sorry for the delay. I¹ve been inaccessible for reasons I won¹t get into. I have tried it without setting any layers in IB. I think you may be correct about the copies. Another thing I don¹t know is if each cell simply uses the prototype to draw in the correct location, or it it does actually

Re: Operations Beachball

2012-12-04 Thread jonathan
On 4 Dec 2012, at 11:48, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On 4 Dec 2012, at 18:10, Roland King r...@rols.org wrote: Can you not run Instruments from the 'Profile' button on Xcode? It should start the process and attach to it and go from there. I got the Leaks

Beachballing 2

2012-12-04 Thread Gerriet M. Denkmann
My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. These operations do not do any I/O - they just use the Cpu. When I make some other app active and then try again to make my app active, my app beach-balls. When all my operations have finished,

NSOperation Efficiency

2012-12-04 Thread Gerriet M. Denkmann
I have an app which uses NSOperations inside an NSOperationQueue. These operations do not do any I/O - just Cpu. No swapping is taking place. When I set [ self.operationQueue setMaxConcurrentOperationCount: 1 ] each operation takes on average 200 msec., measured by NSDate. With 2 concurrent

Re: Beachballing 2

2012-12-04 Thread Alex Zavatone
WAG - the # of cores - 1? On Dec 4, 2012, at 12:54 PM, Gerriet M. Denkmann wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. These operations do not do any I/O - they just use the Cpu. When I make some other app active and then

Re: Operations Beachball

2012-12-04 Thread Jens Alfke
On Dec 4, 2012, at 3:48 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. I would expect that the app thus remains responsive, but sometimes it is not. Welcome to the joys of

Re: NSOperation Efficiency

2012-12-04 Thread Jens Alfke
On Dec 4, 2012, at 10:15 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: Is this to be expected? Or does my app has some hidden flaws? If so, where should I start looking? Instruments. This is exactly what CPU profiling is for. If you can’t get Instruments to work for you, that’s a

Re: Beachballing 2

2012-12-04 Thread Jens Alfke
On Dec 4, 2012, at 9:54 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. These operations do not do any I/O - they just use the Cpu. But in your earlier thread you showed a code snippet

Re: Operations Beachball

2012-12-04 Thread Charles Srstka
On Dec 4, 2012, at 4:29 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. I would expect that the app thus remains responsive, but sometimes it is not. A sure way to beach-ball my app

Re: NSOperation Efficiency

2012-12-04 Thread Mike Abdullah
If your operations are purely CPU-bound, the whole point of GCD is to manage this for you. With the default number of concurrent operations, NSOperationQueue does exactly that. Have you tried with that setting? On 4 Dec 2012, at 18:15, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I have an

Re: Beachballing 2

2012-12-04 Thread Gerriet M. Denkmann
On 5 Dec 2012, at 01:33, Jens Alfke j...@mooseyard.com wrote: On Dec 4, 2012, at 9:54 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. These operations do not do any I/O - they just

Re: Beachballing 2

2012-12-04 Thread Jens Alfke
On Dec 4, 2012, at 10:58 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: When an operation has finished, it sends a message to the app delegate. Every 20th time, the app delegate then does: self.aValue = ...some number ... @property (assign) NSUInteger aValue; // aValue is bound to some

Re: Beachballing 2

2012-12-04 Thread Chris Hanson
Please don't create lots of different message threads for a single issue/discussion. Sticking to a single thread makes it much easier to follow by keeping all of the context together. Thanks. -- Chris -- cocoa-dev's other moderator ___

Re: NSOperation Efficiency

2012-12-04 Thread Gerriet M. Denkmann
On 5 Dec 2012, at 01:55, Mike Abdullah cocoa...@mikeabdullah.net wrote: If your operations are purely CPU-bound, the whole point of GCD is to manage this for you. With the default number of concurrent operations, NSOperationQueue does exactly that. Have you tried with that setting? I have,

Re: NSOperation Efficiency

2012-12-04 Thread Kyle Sluder
On Tue, Dec 4, 2012, at 10:15 AM, Gerriet M. Denkmann wrote: I have an app which uses NSOperations inside an NSOperationQueue. These operations do not do any I/O - just Cpu. No swapping is taking place. When I set [ self.operationQueue setMaxConcurrentOperationCount: 1 ] each operation takes

Re: NSOperation Efficiency

2012-12-04 Thread Sean McBride
On Wed, 5 Dec 2012 01:15:11 +0700, Gerriet M. Denkmann said: I have an app which uses NSOperations inside an NSOperationQueue. These operations do not do any I/O - just Cpu. No swapping is taking place. Do your operations use a lot of memory? Even though you're not swapping, maybe you're

Re: Dangling reference to an invalid object

2012-12-04 Thread Mike Abdullah
On 3 Dec 2012, at 18:13, Nick Zitzmann n...@chronosnet.com wrote: On Dec 1, 2012, at 10:33 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote: I've been trying to hunt down a problem where Core Data will occasionally refuse to save with the error Dangling reference to an invalid object.

Plug-In failure on OS X 10.8.2 after updating to Oracle Java SE7

2012-12-04 Thread Hariharan Muthu
Hi, I have developed sample ***COCOA-64 bit*** application using Webkit Framework with all plug In settings enabled (setJavaEnabled:YES setPlugInsEnable:YES). I have tried to load Juniper SSL webvpn url which in turn uses Java applet plug-In to launch VPN connection in the webview. This

Objective C blogs?

2012-12-04 Thread tshanno
Hi, I'm relatively new to objective C and Cocoa but not to C and not to object-orented programming. I've found with other languages that browsing blogs which address different aspects of the language with some occasional code can be useful in terms of learning the ins and outs of the

How to capture a video stream

2012-12-04 Thread gary . gardner
I have been digging for a couple of weeks now and I have progressed to the point where I have the AVCaptureDevice and the session. Here's what I need help/guidance/assistance on: I want to capture the video images from which ever camera device I select and using those images, real time, take the

NSImage issue in 10.6

2012-12-04 Thread Amy Gibbs
I have the following code that generates images. It works perfectly in 10.5 but doesn't in 10.6. in 10.6 the images are laid on in the right place, - (IBAction)generateKitImages:(id)sender; { NSObject *kit; kit = [[kits selectedObjects] objectAtIndex:0];

Re: Objective C blogs?

2012-12-04 Thread Jens Alfke
On Nov 29, 2012, at 3:09 AM, tshanno tsha...@icloud.com wrote: I've done an Internet search but most of the blogs I've found are out of date and/or don't have regular postings. Anyone have any suggestions for some blogs I might check out? NSBlog: http://www.mikeash.com/pyblog/ NSHipster:

Re: Objective C blogs?

2012-12-04 Thread Geoffrey Goutallier
Hello, I know about 2 that are great and updated regularly : http://www.mikeash.com/pyblog/ http://nshipster.com Not oriented towards your interests tho, but very great ! Hope they will please you, ++GG On Nov 29, 2012, at 12:09, tshanno tsha...@icloud.com wrote: Hi, I'm relatively

Re: How to capture a video stream

2012-12-04 Thread jonat...@mugginsoft.com
On 3 Dec 2012, at 06:02, gary.gard...@brokensoftware.com wrote: I have been digging for a couple of weeks now and I have progressed to the point where I have the AVCaptureDevice and the session. Here's what I need help/guidance/assistance on: I want to capture the video images from

Re: How to capture a video stream

2012-12-04 Thread Quincey Morris
On Dec 2, 2012, at 22:02 , gary.gard...@brokensoftware.com wrote: Can anyone tell me what the next steps are? Any snippets of code that I can look at? I'm sure I'm not the first to try to do this. Have you looked here?

Re: How to capture a video stream

2012-12-04 Thread gary . gardner
On 3 Dec 2012, at 06:02, gary.gard...@brokensoftware.com wrote: I have been digging for a couple of weeks now and I have progressed to the point where I have the AVCaptureDevice and the session. Here's what I need help/guidance/assistance on: I want to capture the video images from

Re: How to capture a video stream

2012-12-04 Thread gary . gardner
On Dec 2, 2012, at 22:02 , gary.gard...@brokensoftware.com wrote: Can anyone tell me what the next steps are? Any snippets of code that I can look at? I'm sure I'm not the first to try to do this. Have you looked here?

Document Types, imported and exported uti's

2012-12-04 Thread Koko
The iOS programming guide says to use the items in the subject line to tell iOS the docs your app can open. I haven done this and installed my app in an iPad. I have DropBox on the iPad and expected to have DropBox recognize my app for opening a file in the box of my type. But it does not

Re: NSOperation Efficiency

2012-12-04 Thread Mike Abdullah
On 4 Dec 2012, at 19:01, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On 5 Dec 2012, at 01:55, Mike Abdullah cocoa...@mikeabdullah.net wrote: If your operations are purely CPU-bound, the whole point of GCD is to manage this for you. With the default number of concurrent operations,

Re: How to capture a video stream

2012-12-04 Thread Quincey Morris
On Dec 4, 2012, at 16:50 , gary.gard...@brokensoftware.com wrote: The setSampleBufferDelegate:self queue:queue gives a warning in XCode that says Sending 'my object name here' to parameter of incompatible type 'id'AVCaptureVideoDataOutputSampleBufferDelegate' You need to declare the class of

Re: How to capture a video stream

2012-12-04 Thread gary . gardner
On Dec 2, 2012, at 22:02 , gary.gard...@brokensoftware.com wrote: Can anyone tell me what the next steps are? Any snippets of code that I can look at? I'm sure I'm not the first to try to do this. Have you looked here?

Re: NSOperation Efficiency

2012-12-04 Thread Gerriet M. Denkmann
On 5 Dec 2012, at 02:58, Kyle Sluder k...@ksluder.com wrote: On Tue, Dec 4, 2012, at 10:15 AM, Gerriet M. Denkmann wrote: I have an app which uses NSOperations inside an NSOperationQueue. These operations do not do any I/O - just Cpu. No swapping is taking place. When I set [

Re: NSOperation Efficiency

2012-12-04 Thread Kyle Sluder
On Tue, Dec 4, 2012, at 05:02 PM, Gerriet M. Denkmann wrote: On 5 Dec 2012, at 02:58, Kyle Sluder k...@ksluder.com wrote: On Tue, Dec 4, 2012, at 10:15 AM, Gerriet M. Denkmann wrote: I have an app which uses NSOperations inside an NSOperationQueue. These operations do not do any I/O -

Re: NSOperation Efficiency

2012-12-04 Thread Jens Alfke
On Dec 4, 2012, at 7:33 PM, Kyle Sluder k...@ksluder.com wrote: Yeah, it sounds like you're saturating the thread pool due to non-CPU-bound operations. NSOpQ is going to spend its entire time spawning and switching to threads while you append more and more operations to the queue.

Re: NSOperation Efficiency

2012-12-04 Thread Kyle Sluder
On Dec 4, 2012, at 8:00 PM, Jens Alfke [1]j...@mooseyard.com wrote: On Dec 4, 2012, at 7:33 PM, Kyle Sluder [2]k...@ksluder.com wrote: Yeah, it sounds like you're saturating the thread pool due to non-CPU-bound operations. NSOpQ is going to spend its entire time spawning and switching

Arc and **

2012-12-04 Thread Gerriet M. Denkmann
I have (using Arc) a method which works fine: NSString *explanation; [ self doSomeThingAndExplain: explanation ]; Now I decided that sometimes I don't need this explanation. So I changed it to: NSString **explanatioP = urgent ? NULL : explanation; // -- no explicit ownership... [ self

Re: Arc and **

2012-12-04 Thread Roland King
NSString *explanation; [ self doSomeThingAndExplain:( urgent ? NULL : explanation ) ]; I tried some REALLY ugly casts putting __autoreleasing and __strong here and there around the *s in the explainP but got nowhere, so that's the best I can come up with apart from writing

Re: Arc and **

2012-12-04 Thread Greg Parker
On Dec 4, 2012, at 8:56 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I have (using Arc) a method which works fine: NSString *explanation; [ self doSomeThingAndExplain: explanation ]; Now I decided that sometimes I don't need this explanation. So I changed it to: NSString

Re: Arc and **

2012-12-04 Thread Gerriet M. Denkmann
On 5 Dec 2012, at 12:59, Greg Parker gpar...@apple.com wrote: On Dec 4, 2012, at 8:56 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I have (using Arc) a method which works fine: NSString *explanation; [ self doSomeThingAndExplain: explanation ]; Now I decided that sometimes I don't

Re: NSOperation Efficiency

2012-12-04 Thread Gerriet M. Denkmann
On 5 Dec 2012, at 11:41, Kyle Sluder k...@ksluder.com wrote: On Dec 4, 2012, at 8:00 PM, Jens Alfke j...@mooseyard.com wrote: On Dec 4, 2012, at 7:33 PM, Kyle Sluder k...@ksluder.com wrote: Yeah, it sounds like you're saturating the thread pool due to non-CPU-bound operations.

Re: Operations Beachball

2012-12-04 Thread Gerriet M. Denkmann
On 5 Dec 2012, at 01:29, Jens Alfke j...@mooseyard.com wrote: On Dec 4, 2012, at 3:48 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: My app creates lots of MyOperations (subclass of NSOperation) and puts them into an NSOperationQueue. I would expect that the app thus remains