Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

ATMHud crashes when i set build configuration to Release #7

Open
mapedd opened this issue Jun 2, 2011 · 3 comments
Open

ATMHud crashes when i set build configuration to Release #7

mapedd opened this issue Jun 2, 2011 · 3 comments

Comments

@mapedd
Copy link

mapedd commented Jun 2, 2011

with such a console error:

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 0; 4.07206e-10 nan]'

it's getting SIGABRT in line 418 in ATMHudView.m :

imageLayer.bounds = CGRectMake(0, 0, imageRect.size.width, imageRect.size.height);

@mapedd
Copy link
Author

mapedd commented Jun 2, 2011

i think i've solved it, i've added this in line 222:

if (image.size.width>0.0f && image.size.height>0.0f) {
imageRect.size = image.size;
}

@avalanched
Copy link

worked for me to!

@cramhead
Copy link

With the pre-release of xcode I get following error:
The receiver of message 'size' is nil and returns a value of type 'CGSize' that will be garbage
I expect that it's related to the same thing

I ended up wrapping the whole switch statement with
if (image && (image.size.width>0.0f && image.size.height>0.0f)) {
//switch
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants