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 911021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:08:02+00:00 2026-05-15T17:08:02+00:00

I get a abort() which I am not able to ‘catch’ in my code.

  • 0

I get a abort() which I am not able to ‘catch’ in my code.
Perhaps I am missing some understanding; can you give me some insight or perhaps help me with the abort() ?

Please note; the code works fine for thousands of users I have; but a very few (two now) have reported this crash.

First the code (simplified):

244: -(void)openBSDSocket:(NSString*)hostname useSSL:(bool)useSSL {
245:     // Look up host 
246:     if ( (remoteHost = gethostbyname([hostName cStringUsingEncoding:NSUTF8StringEncoding])) == NULL ) {
247:        [NSException raise:SOCKET_EX_HOST_NOT_FOUND format:SOCKET_EX_HOST_NOT_FOUND_F, strerror(errno)];
248: }

Caused this crash (dump)

Thread 34 Crashed:
0   libSystem.B.dylib               0x00007fff8550fb6e __semwait_signal_nocancel + 10
1   libSystem.B.dylib               0x00007fff8550fa70 nanosleep$NOCANCEL + 129
2   libSystem.B.dylib               0x00007fff8556c3c6 usleep$NOCANCEL + 57
3   libSystem.B.dylib               0x00007fff8558b97c abort + 93
4   libSystem.B.dylib               0x00007fff854a3615 free + 128
5   libSystem.B.dylib               0x00007fff854f409b _mdns_search + 1469
6   libSystem.B.dylib               0x00007fff854f8564 _mdns_hostbyname + 287
7   libSystem.B.dylib               0x00007fff854f826d search_host_byname + 139
8   libSystem.B.dylib               0x00007fff854f8186 gethostbyname + 98
9   com.NZBVortex.NZBVortex         0x0000000100021346 -[CFNetworkStream openBSDSocket::] + 246

All the openBSDSocket’s are correctly wrapped with exception catched, which of course doesn’t catch the abort()

Can you help me give some insight here?

  • 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-15T17:08:02+00:00Added an answer on May 15, 2026 at 5:08 pm

    Your heap is getting corrupted. gethostbyname() is calling free() to free some memory it allocated. free() has some internal consistency checks in it: if it detects that the heap has been corrupted, then it calls abort() to terminate the program — once your heap is corrupted you pretty much can’t recover from it, so the best thing to do is to fail as soon as you’ve detected that.

    Unfortunately, figuring out exactly where your heap is getting corrupted is not easy. There are some Malloc Debug Environment Variables you can set to help track this down.

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

Sidebar

Related Questions

Is there a way in which I can get some information about the mounts
I want to get triples about cities, which are from certain country. How can
I replied to a question earlier about thread safety which did not get a
I am not able to find a way (even with Mango SDK) in which
Can anyone help me with this? I have not been able to find anything
it looks like I am not able to succesfully move my WCF proxy code
I have a blog which i get about 1200 visits a month lets say
I have a Java program which is using WMIC to get certain information about
I get a compile error, which I'm slightly confused about. This is on VS2003.
Where can I get info about implementing my own methods that have the ellipsis

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.