I have been getting a new error message when my apps are running, which was never present before in Snow Lion and Xcode 3.2, and now they show up almost every time it is run, and occasionally got some crashes:
malloc: reference count underflow for 0x1923500, break on auto_refcount_underflow_error to debug.
I looked into it, searched for any occurrence of auto_refcount_underflow_error in the obj-c parts of my app, but I can’t find it.
Has anyone hit this bug before? Maybe a problem with coercing somewhere? Was SL being too kind and let it go, but Lion doesn’t accept it anymore maybe? Would be useful if it were to give more details in the log…
Thanks!
Model: MBPro8,2
Browser: Safari 534.48.3
Operating System: Mac OS X (10.7)
Nope, that’s the problem. I’m using Obj-C methods almost exclusively for this part, the rest is mostly coercions.
I can’t find the pattern, and it’s sporadic now. I changed today the method used to get the total size of folders from a terminal call to an Obj-C method, and it seems to have brought the number and frequency of errors down, but can’t be sure that’s it’s related.
Could it be when it tries to count an array perhaps?
Model: MBPro8,2
Browser: Safari 534.48.3
Operating System: Mac OS X (10.7)
Yep, already tracking down the method from which the error is being caused. The funny thing is it doesnt seem to be the AS code that generates the error, so I’ll have to put log statements everywhere to get to the faulty part… Lots of fun in the next few hours.
and the errors are logged exactly when I select (literally click on folders) in the Open Panel. Not before the panel is created or called, and not after it is dismissed and the selected folders are returned correctly by your method.
Maybe this is just an empty warning, but it might explain why the app crashed sometimes when the panel was being dismissed…
Any ideas? I don’t see anything wrong with your code, nor in mine, I triple checked if i called your method correctly… i’m at a loss.
Model: MBPro8,2
Browser: Safari 534.48.3
Operating System: Mac OS X (10.7)
Maybe I should send an bug report to Apple. My app didn’t crash in a while when the panel is open, so It might not be related, but still, it’s annoying.
Thanks!
Model: MBPro8,2
Browser: Safari 534.48.3
Operating System: Mac OS X (10.7)
Have you noticed that it only occurs when you are under GC. For me once I turned garbage collection off it seemed to solve all my problems. Did anyone else notice this?
i haven’t turned GC off because I was under the belief that it was much safer for ASOC apps, not mandatory, just safer.
So maybe something is off in Xcode 4 or it’s the combination of Lion & Xcode 4, who knows. I’ll send a bug report to apple, since it seems to be in the NSOpenPanel framework, at least this is as far as I was able to track the problem down to.
Browser: Safari 531.22.7
Operating System: Mac OS X (10.6)