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

  • Home
  • SEARCH
  • 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 6973125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:04:06+00:00 2026-05-27T17:04:06+00:00

I’m getting an error when trying to execute the performSegueWithIdentifier method inside a setCompletionBlock

  • 0

I’m getting an error when trying to execute the performSegueWithIdentifier method inside a setCompletionBlock of an ASIHTTPRequest request.

Here’s some code (certain portion were ommitted):

// Instantiate request object
ASIFormDataRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://[...]"]];

// Set request headers
[request addRequestHeader:@"Content-Type" value:@"application/json; charset=utf-8"];

// Format JSON request
NSString *json = [...]

// Set the post data
[request setPostBody:[[NSMutableData alloc] initWithData:[json dataUsingEncoding:NSASCIIStringEncoding]]];

__weak ASIFormDataRequest *_request = request;

// Handle success
[request setCompletionBlock:^{

    // Get the response
    NSDictionary *response = [[_request responseString] JSONValue];

    // Do some stuff with the response...

    // Show the title list
    [self performSegueWithIdentifier:@"ShowTitles" sender:self];

}];

[request startAsynchronous];

The exact error I’m getting is:

bool _WebTryThreadLock(bool), 0x7d70520: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
1   WebThreadLock
2   -[UITextRangeImpl isEmpty]
3   -[UITextRange(UITextSelectionAdditions) _isCaret]
4   -[UITextSelectionView setCaretBlinks:]
5   -[UIKeyboardImpl setCaretBlinks:]
6   -[UIKeyboardImpl setDelegate:force:]
7   -[UIKeyboardImpl setDelegate:]
8   -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:]
9   -[UIResponder _finishResignFirstResponder]
10  -[UIResponder resignFirstResponder]
11  -[UITextField resignFirstResponder]
12  -[UIView(UITextField) endEditing:]
13  -[UIWindowController _prepareKeyboardForTransition:fromView:]
14  -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:]
15  -[UIViewController presentViewController:withTransition:completion:]
16  -[UIViewController presentViewController:animated:completion:]
17  -[UIViewController presentModalViewController:animated:]
18  -[UIStoryboardModalSegue perform]
19  -[UIStoryboardSegueTemplate perform:]
20  -[UIViewController performSegueWithIdentifier:sender:]
21  -[BaseLoginViewController viewTitleList]
22  __39-[BaseLoginViewController getTitleList]_block_invoke_0
23  -[ASIHTTPRequest handleStreamComplete]
24  -[ASIHTTPRequest handleNetworkEvent:]
25  _signalEventSync
26  _cfstream_shared_signalEventSync
27  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
28  __CFRunLoopDoSources0
29  __CFRunLoopRun
30  CFRunLoopRunSpecific
31  CFRunLoopRun

From that error I’m assuming it has something to do with the fact that I’m trying to go to a new view controller while I’m still using the web thread or something. I’m still new to iOS dev so I’m not too sure. Any help would really be appreciated.

  • 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-27T17:04:06+00:00Added an answer on May 27, 2026 at 5:04 pm

    Indeed, you modify the UI from thread other than the UI (main) thread here:

    [self performSegueWithIdentifier:@"ShowTitles" sender:self];
    

    You need to execute it on the main thread. You can do it using performSelectorOnMainThread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.