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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:46:41+00:00 2026-06-09T06:46:41+00:00

I’ve found a bug in my application (SymSteam) which I’m having a particularly hard

  • 0

I’ve found a bug in my application (SymSteam) which I’m having a particularly hard time fixing. It seems that whenever my application is launched as a login item it launches successfully but then crashes just a few seconds later. If the application is launched by the user (i.e. via Finder), it runs normally and doesn’t crash.

Checking Console immediately after logging in, I see the following:

04/08/2012 18:51:47.437 SymSteam[187]: SteamApps exists & SteamAppsSymb exists, suggesting everything is A-OK.
04/08/2012 18:51:47.451 SymSteam[187]: Succesfully started observing everything I need to
04/08/2012 18:51:52.623 com.apple.launchd.peruser.501[124]: ([0x0-0x16016].com.simplecode.SymSteam[187]) Job appears to have crashed: Segmentation fault: 11

The first two lines indicate that the my application started up fine and was able to register for the notifications it needed from NSWorkspace’s notification centre. I can’t figure out what’s causing the segmentation fault though afterwards.

There’s also a crash report too. Here’s an excerpt of it:

OS Version:      Mac OS X 10.8 (12A269)
Report Version:  10

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x00007fff80902278 _cache_getImp + 4
1   libobjc.A.dylib                 0x00007fff80903f51 lookUpMethod + 41
2   libobjc.A.dylib                 0x00007fff80905d5e class_respondsToSelector + 31
3   com.apple.CoreFoundation        0x00007fff82adb7ab objectIsKindOfClass + 43
4   com.apple.CoreFoundation        0x00007fff82adb812 __exceptionMatch + 18
5   libobjc.A.dylib                 0x00007fff8090d1d4 _objc_exception_do_catch(objc_typeinfo*, objc_typeinfo*, void**, unsigned int) + 144
6   libc++abi.dylib                 0x00007fff81621807 get_adjusted_ptr(std::type_info const*, std::type_info const*, void**) + 71
7   libc++abi.dylib                 0x00007fff81621439 __gxx_personality_v0 + 889
8   libunwind.dylib                 0x00007fff8b678c22 _Unwind_RaiseException + 158
9   libc++abi.dylib                 0x00007fff81621baa __cxa_rethrow + 72
10  libobjc.A.dylib                 0x00007fff8090d5f5 objc_exception_rethrow + 40
11  com.apple.CoreFoundation        0x00007fff82a7ce36 CFRunLoopRunSpecific + 390
12  com.apple.HIToolbox             0x00007fff8c855774 RunCurrentEventLoopInMode + 209
13  com.apple.HIToolbox             0x00007fff8c855512 ReceiveNextEventCommon + 356
14  com.apple.HIToolbox             0x00007fff8c8553a3 BlockUntilNextEventMatchingListInMode + 62
15  com.apple.AppKit                0x00007fff87afefa3 _DPSNextEvent + 685
16  com.apple.AppKit                0x00007fff87afe862 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
17  com.apple.AppKit                0x00007fff87af5c03 -[NSApplication run] + 517
18  com.apple.AppKit                0x00007fff87a9a656 NSApplicationMain + 869
19  com.simplecode.SymSteam         0x0000000108df4d54 start + 52

Thread 1:
0   libsystem_kernel.dylib          0x00007fff82dad6d6 __workq_kernreturn + 10
1   libsystem_c.dylib               0x00007fff84c27f2c _pthread_workq_return + 25
2   libsystem_c.dylib               0x00007fff84c27cf3 _pthread_wqthread + 412
3   libsystem_c.dylib               0x00007fff84c121b1 start_wqthread + 13

Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib          0x00007fff82dadd16 kevent + 10
1   libdispatch.dylib               0x00007fff81bafe26 _dispatch_mgr_invoke + 883
2   libdispatch.dylib               0x00007fff81bafa2a _dispatch_mgr_thread + 54

Thread 3:
0   libsystem_kernel.dylib          0x00007fff82dad6d6 __workq_kernreturn + 10
1   libsystem_c.dylib               0x00007fff84c27f2c _pthread_workq_return + 25
2   libsystem_c.dylib               0x00007fff84c27cf3 _pthread_wqthread + 412
3   libsystem_c.dylib               0x00007fff84c121b1 start_wqthread + 13

Thread 4:
0   libsystem_kernel.dylib          0x00007fff82dad6d6 __workq_kernreturn + 10
1   libsystem_c.dylib               0x00007fff84c27f2c _pthread_workq_return + 25
2   libsystem_c.dylib               0x00007fff84c27cf3 _pthread_wqthread + 412
3   libsystem_c.dylib               0x00007fff84c121b1 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x1000000000000000  rbx: 0x00007fff70bf5810  rcx: 0x0000000000000001  rdx: 0x0000000000000000
  rdi: 0x1000000000000000  rsi: 0x00007fff88323f93  rbp: 0x00007fff56e0b910  rsp: 0x00007fff56e0b8d0
   r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x00000000510558d1  r11: 0x1000000000000000
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x1000000000000000  r15: 0x00007fff88323f93
  rip: 0x00007fff80902278  rfl: 0x0000000000010202  cr2: 0x00007fff88424000
Logical CPU: 0

I’m baffled as to what’s causing the problem since the application doesn’t crash when not launched at login and even when launched at login, it launches but then crashes a few seconds later. I don’t know how to go about debugging this bug either as I can’t set breakpoints or use Instruments on the program since the bug only happens on login.

Any advice on how to go about debugging this is greatly appreciated!

For what it’s worth, my application is a background application (so it doesn’t have a dock icon or main window), it uses the Growl & Sparkle frameworks and it registers for notifications from NSWorkspace when it’s launched.

Update:

Here’s the code that’s executed when my application is launched (some irrelevant code in the applicationDidFinishLaunching: method has been omitted). As I said above, this all gets executed before the crash.

applicationDidFinishLaunching method:

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
    [self.appController performInitialDriveScan];
    [self.appController startWatchingDrives];
}

performInitialDriveScan: simply uses NSFileManager a few times to see if certain directories exist. I won’t post it here since it’s quite long. I’m pretty confident it isn’t the source of the crash.

startWatchingDrives:

- (void)startWatchingDrives{
    [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self.saController selector:@selector(didMountDrive:) name:NSWorkspaceDidMountNotification object:nil];
    [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self.saController selector:@selector(didUnMountDrive:) name:NSWorkspaceDidUnmountNotification object:nil];
    NSLog(@"Succesfully started observing everything I need to");
}

This just adds an observer to NSWorkspace’s notification centre that watches for drives being mounted/unmounted.

That’s everything that gets executed during the application’s startup. The crash happens after the startWatchingDrives method is called and, as said above, only happens when the application is launched on login. It happens when my application isn’t actually doing anything.

  • 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-06-09T06:46:46+00:00Added an answer on June 9, 2026 at 6:46 am

    I’ve done a little more debugging and managed to solve my own question. The overall cause of the crash is pretty uninteresting but here it is:

    The application is starting up normally when the user logs in and it’s registering for notifications of drive mounts/unmounts from NSWorkspace. Almost immediately after registering for notifications, it receives two notifications for the mounting of /home and /net during login. The didMountDrive: selector is performed by the notification and within the didMountDrive: method, I’m trying to get the 3rd path component of the drive that’s just mounted’s URL (since, if it was an external drive being mounted, this would be the name of the drive). That’s where the program crashes since the /home and /net URLs only have two path components, so I’m trying to access an index out of the bounds of the URL’s pathComponents array.

    The fix was simply to check that there’s at least 3 path components in the URL for the drive that was just mounted.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I have a French site that I want to parse, but am running into

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.