Hi All,
Sorry, I have to turn this around.
The problem turned out not to be the static objects at all, though I can't
explain why for a short while, the crash was gone after removing them.
The actual cause is the dictionary definition itself: I used a constant
that is only available for
You nailed it, Kevin. Thanks so much!
It is due to the static C++ wrapper object.
After I moved it to the heap, the crash was fixed.
Thanks,
Beinan
On Thu, Oct 23, 2014 at 12:50 PM, Kevin Meaney k...@yvs.eu.com wrote:
Personally I'd try and not call any objective-c code from a C++ static
I'd like to thank everyone for your input.
I learned a lot from this thread.
BTW, simply changing the offending dictionary syntax to using the old API
instead of the literals didn't help.
I really had to abandon the singleton idea for the C++ wrapper object.
Correct me if I'm wrong, please. I
On Oct 24, 2014, at 11:44 AM, Beinan Li li.bei...@gmail.com wrote:
BTW, simply changing the offending dictionary syntax to using the old API
instead of the literals didn't help.
I really had to abandon the singleton idea for the C++ wrapper object.
Static objects -- of any kind -- can lead
On 23 Oct 2014, at 00:34, Beinan Li li.bei...@gmail.com wrote:
Oh! I did actually.
The method I posted belongs to an ObjC object which is wrapped by a C++
object.
That C++ object is a singleton (static).
How is this going to affect ARC and why it didn't down-right crash a week ago
Thank you Kevin!
I didn't know this before. This might be it because I did at some point
change the dictionary creation from the old API-based syntax to literals.
Maybe I should move back to the API calls. I'll try that today.
Thanks,
Beinan
On Thu, Oct 23, 2014 at 5:18 AM, Kevin Meaney
Personally I'd try and not call any objective-c code from a C++ static object.
If it did look the appropriate solution then I'd make sure I was comfortable
with my knowledge of the objective-c runtime and the order in which things are
called before main is called.
Kevin
On 23 Oct 2014, at
On Oct 23, 2014, at 2:18 AM, Kevin Meaney k...@yvs.eu.com wrote:
From what I understand any code that is executed before main is called is
done so before the objective-c runtime is fully setup which means you have no
guarantees about what will work. In objective-c++ where you can create
On Thu, Oct 23, 2014, at 05:06 PM, Greg Parker wrote:
On Oct 23, 2014, at 2:18 AM, Kevin Meaney k...@yvs.eu.com wrote:
From what I understand any code that is executed before main is called is
done so before the objective-c runtime is fully setup which means you have
no guarantees
On Oct 23, 2014, at 15:26, Kyle Sluder k...@ksluder.com wrote:
On Thu, Oct 23, 2014, at 05:06 PM, Greg Parker wrote:
On Oct 23, 2014, at 2:18 AM, Kevin Meaney k...@yvs.eu.com wrote:
From what I understand any code that is executed before main is called is
done so before the
On Oct 23, 2014, at 3:26 PM, Kyle Sluder k...@ksluder.com wrote:
On Thu, Oct 23, 2014, at 05:06 PM, Greg Parker wrote:
The initialization order is generally like this:
1. Everything in libraries you link to is initialized.
2. Your classes' +load methods run. Each class runs +load before
On Oct 23, 2014, at 10:50 AM, Kevin Meaney k...@yvs.eu.com wrote:
Personally I'd try and not call any objective-c code from a C++ static
object. If it did look the appropriate solution then I'd make sure I was
comfortable with my knowledge of the objective-c runtime and the order in
which
Hi CocoaDev,
Not sure if it's the right list to post to.
My iOS app is coded in Obj-C++ with the ObjC part using ARC.
It seemed to work well with Xcode 6.0.x and iOS 8.0 SDK.
However, on Xcode 6.1 and iOS 8.1 SDK it starts to crash right away.
And it stops crashing if I turn off ARC.
I wonder
How is your application crashing?
On Oct 22, 2014, at 2:10 PM, Beinan Li li.bei...@gmail.com wrote:
Hi CocoaDev,
Not sure if it's the right list to post to.
My iOS app is coded in Obj-C++ with the ObjC part using ARC.
It seemed to work well with Xcode 6.0.x and iOS 8.0 SDK.
However,
On 22 Oct 2014, at 22:10, Beinan Li li.bei...@gmail.com wrote:
However, on Xcode 6.1 and iOS 8.1 SDK it starts to crash right away.
And it stops crashing if I turn off ARC.
I reckon we need to see the crash details. Can you post them?
Jonathan
You can add an exception breakpoint and on the bottom of the debug Navigator,
drag the little slider all the way to the right to see the code execution path
that is causing your crash.
A exception breakpoint isn't added to any line in code, but traps when any NS
exception is thrown. You
It is quite unpredictable.
At first it crashes at a dictionary creation line in a .mm implementation
like this:
- (NSString*) getAVAudioSessionMode:(myAudioSessionMode)modeKey {
NSDictionary* modeDict = @{ // Here it crashes
@(myAudioSessionModeDefault): AVAudioSessionModeDefault,
Note, the initial crashing function is merely translating a C++ enum to the
AVFoundation builtin constants.
Thanks,
Beinan
On Wed, Oct 22, 2014 at 5:45 PM, Beinan Li li.bei...@gmail.com wrote:
It is quite unpredictable.
At first it crashes at a dictionary creation line in a .mm
On Oct 22, 2014, at 3:45 PM, Beinan Li li.bei...@gmail.com wrote:
stop reason = signal SIGABRT
When there's a SIGABRT, there's usually an error logged. You should look for
that, because it might give a good clue.
--
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303)
Your not creating a static C++ object anywhere are you? One that creates the
dictionary before main gets called by any chance?
Kevin
Sent from my iPhone
On 22 Oct 2014, at 22:45, Beinan Li li.bei...@gmail.com wrote:
Note, the initial crashing function is merely translating a C++ enum to
On Oct 22, 2014, at 14:10 , Beinan Li li.bei...@gmail.com wrote:
And it stops crashing if I turn off ARC.
I don’t understand this. How do you turn off ARC? Are you just changing the
build setting that controls ARC?
It sounds like there are no source code changes. Unless you’ve done something
Sorry, I didn't make it clearer. My code used to manage memory without ARC.
Then I converted everything to using ARC. The conversion was done
automatically via Xcode, with only a few hand edits. It worked without
issues with Xcode 6.0.x.
By turning off ARC, I meant that I reverted to the revision
Oh! I did actually.
The method I posted belongs to an ObjC object which is wrapped by a C++
object.
That C++ object is a singleton (static).
How is this going to affect ARC and why it didn't down-right crash a week
ago before I upgraded Xcode?
Thanks,
Beinan
On Wed, Oct 22, 2014 at 7:00 PM,
23 matches
Mail list logo