Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7554179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:16:10+00:00 2026-05-30T11:16:10+00:00

I am having some problems with an app that keeps crashing intermittently. Code below

  • 0

I am having some problems with an app that keeps crashing intermittently. Code below is in a UIView with CATiledLayer as its backing layer:

- (UIBezierPath *)path
{
    if(_path == nil){

        _path = [UIBezierPath bezierPath];
        CGFloat lineWidth = 5;
        [_path setLineWidth:lineWidth];
        [_path setLineJoinStyle:kCGLineJoinRound];
        [_path setLineCapStyle:kCGLineCapRound];       

        [_path moveToPoint:CGPointMake(100, 100)];      
        [_path addLineToPoint:CGPointMake(200,200)];
        [_path addLineToPoint:CGPointMake(150,200)];
        [_path addLineToPoint:CGPointMake(50,400)];
        _path closePath];

        return _path;
    }    
return _path;
}

- (void)drawRect:(CGRect)rect
{  
    [[UIColor colorWithRed:0.1 green:0.1 blue:1 alpha:0.45] setStroke];//sets stroke color in current context
    [self.path stroke];
}

I get the following error code:

Single stepping until exit from function _ZN2CG4Path15apply_transformERK17CGAffineTransform, which has no line number information.

There doesn’t seem to be any pattern to when the error occurs. It can seems to occur at some point doing scrolling or zooming. Sometimes in crashes as soon as I zoom/scroll. Sometimes I can zoom and scroll for a while until it crashes.

I know before iOS4 the UIKit was not thread safe and could not be used with CATiledLayers. See tech note My problem (i think) seems to be a thread issue. Surely UIKit can’t be to blame?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:16:11+00:00Added an answer on May 30, 2026 at 11:16 am

    Try to make the path property atomic.

    Also, you should probably modify drawRect to the following:

    - (void)drawRect:(CGRect)rect
    {  
        [[UIColor colorWithRed:0.1 green:0.1 blue:1 alpha:0.45] setStroke];//sets stroke color in current context
        @synchronized(self) {
            [self.path stroke];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an audio app that is having some problems with the way iOS
I'm having some problems with a couple lines of code that are causing my
I am having some performance problems with my Delphi 2006 app. Can you Suggest
I'm creating a messaging web app in ASP.NET and are having some problems when
I'm having some problems using RemoteViews. Simply want to make a widget that shows
I am having some problems with the app django socialauth. I am receiving the
I'm having some really irritating problems with UILocalNotification . While finishing up an app
I'm having some problems with a Navigation controller in my app. Moving from the
I've been having some problems while trying to fix a simple video recording app*.
I'm having a problem running a VS 2005 app on some machines and not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.