Open Bug 500470 Opened 15 years ago Updated 2 years ago

Analyze nsObjCExceptionLogAbort data for "unrecognized selector" and "selector not recognized" bugs

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: sspitzer, Unassigned)

Details

Attachments

(3 files)

crash [@ nsObjCExceptionLogAbort] [@ nsAppShell::ProcessGeckoEvents] 

see:

http://crash-stats.mozilla.com/report/list?product=Firefox&version=Firefox%3A3.0&version=Firefox%3A3.0.1&version=Firefox%3A3.0.10&version=Firefox%3A3.0.10pre&version=Firefox%3A3.0.11&version=Firefox%3A3.0.11pre&version=Firefox%3A3.0.12pre&version=Firefox%3A3.0.1pre&version=Firefox%3A3.0.2&version=Firefox%3A3.0.2pre&version=Firefox%3A3.0.3&version=Firefox%3A3.0.4&version=Firefox%3A3.0.4pre&version=Firefox%3A3.0.5&version=Firefox%3A3.0.5pre&version=Firefox%3A3.0.6&version=Firefox%3A3.0.6pre&version=Firefox%3A3.0.7&version=Firefox%3A3.0.7pre&version=Firefox%3A3.0.8&version=Firefox%3A3.0.8pre&version=Firefox%3A3.0.9&version=Firefox%3A3.0.9pre&version=Firefox%3A3.0b1&version=Firefox%3A3.0b2&version=Firefox%3A3.0b3&version=Firefox%3A3.0b4&version=Firefox%3A3.0b5&version=Firefox%3A3.0b5pre&version=Firefox%3A3.0pre&version=Firefox%3A3.1a1&version=Firefox%3A3.1a1pre&version=Firefox%3A3.1a2&version=Firefox%3A3.1a2pre&version=Firefox%3A3.1b1&version=Firefox%3A3.1b1pre&version=Firefox%3A3.1b2&version=Firefox%3A3.1b2pre&version=Firefox%3A3.1b3&version=Firefox%3A3.1b3pre&version=Firefox%3A3.1b4pre&version=Firefox%3A3.2a1pre&version=Firefox%3A3.5&version=Firefox%3A3.5b4&version=Firefox%3A3.5b4pre&version=Firefox%3A3.5b5pre&version=Firefox%3A3.5b99&version=Firefox%3A3.5pre&version=Firefox%3A3.6a1pre&platform=mac&query_search=signature&query_type=contains&query=nsObjCExceptionLogAbort&date=&range_value=4&range_unit=weeks&do_query=1&signature=nsObjCExceptionLogAbort%28NSException*%29%20|%20nsAppShell%3A%3AProcessGeckoEvents%28void*%29

There were many of these from fx 3.0.10 (and now 3.0.11) in the past 4 weeks.

In the "App Notes" section, there appears to be some useful info about the Objective-C exception that caused us to abort.

In nsAppShell::ProcessGeckoEvents()

    nsAppShell::ProcessGeckoEvents(void* aInfo)
    {
      NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
...
      NS_OBJC_END_TRY_ABORT_BLOCK;
    }

So the objective-c exception causes the abort.

I didn't look through all the reports, but for the several I did, this seemed to be more common:

Obj-C Exception data:
NSInternalInconsistencyException: Error (1000) creating CGSWindow

As was this:

Obj-C Exception data:
NSInvalidArgumentException: *** -[NSCFString stringByAppendingString:]: nil argument

Is there a way to query and get all the App Notes for all crashes with  [@ nsObjCExceptionLogAbort] [@ nsAppShell::ProcessGeckoEvents]?  There didn't seem to be (from the http://crash-stats.mozilla.com UI) but maybe someone can run a query to get that info for this bug.

Other exceptions I saw:

Obj-C Exception data:
Decryption error: Failed to decrypt object (-25293): MRB npt/AAD9B9D01BAF401EA5DBC77D1EC521B7

If it happens repeatedly, please restart your Mac in Safe Mode (press and hold Shift key at startup) and then run Help > Troubleshooting > Rebuild Keychain in 1Password

Obj-C Exception data:
NSInvalidArgumentException: *** -[ENMozillaClipper performSelectorInBackground:withObject:]: selector not recognized [self = 0xe916940

Obj-C Exception data:
NSInvalidArgumentException: *** -[PDFAnnotationPrivateVars setStringValue:]: unrecognized selector sent to instance 0x1e6da5e0

Obj-C Exception data:
NSInvalidArgumentException: launch path not accessible


Obj-C Exception data:
1Password extension not updated: To update the 1Password extension, please restart your web browser at your convenience.

Obj-C Exception data:
NSInvalidArgumentException: *** +[NSAutoreleasePool alloc]: unrecognized selector sent to class 0xa05f3a00

Obj-C Exception data:
Could Not Load 1Password File: Cannot find resource: '/var/folders/n0/n0kWLODbFdC3CMi5WGDbwU+++TI/-Tmp-/D9063D08-17AE-4143-95A5-9EC26EA1A123-700-00000B8C394C4DAE/1Password.app/Contents/Resources/English.lproj/BasicAuth.nib'

Please open 1Password application and reinstall browser extensions using 1Password > Preferences > Browsers menu. If that does not resolve the issue, your 1Password install is likely inconsistent and you need to download a new version from our site.

Obj-C Exception data:
NSInvalidArgumentException: +[NSColor nsColorSpaceNameFromCGColorSpace:]: unrecognized selector sent to class 0xa097d6d8
This might be "fixed" by bug 486574 on both 3.5 and 3.0.x.

fwiw, this is a better URL for Firefox crashes starting with nsObjCExceptionLogAbort (so you can see the nsAppShell::ProcessGeckoEvents crash in context).

http://crash-stats.mozilla.com/query/query?do_query=1&product=Firefox&platform=mac&date=&range_value=1&range_unit=weeks&query_search=signature&query_type=startswith&query=nsObjCExceptionLogAbort
This is the #3 topcrash in Camino 2.0b3, too, but as Sam says, it's essentially been removed by bug 486574 for Geckos 1.9.0.12 and later.
Component: General → Widget: Cocoa
Product: Firefox → Core
QA Contact: general → cocoa
Version: 3.0 Branch → unspecified
Er, sorry, the Camino crash is actually exceptions in nsAppShell::ProcessNextNativeEvent (#6 on the list from Sam's URL in comment 1); I mixed them up.
These are almost certainly many different, unrelated bugs.

nsAppShell::ProcessGeckoEvents() sends many different kinds of native events (NSEvents) to the OS for processing.  It's needed to prevent native event starvation while processing Gecko events.

Many, many, many different kinds of events go through here.
Sam and Smokey:  I was limiting this to just nsAppShell::ProcessGeckoEvents(), as I didn't seet that particular stack logged in bugzilla.

Steven:  I'm hoping we could get a query of all the App Notes for these crashers, find the most common ones, and investigate.
Some of these (the non-fatal ones) are "fixed" by bug 486564.

But others are real -- the "unrecognized selector" message usually indicates an attempt to access a deleted Objective-C object.  A separate bug should be opened for each of these on which we can find sufficient information.  That number may turn out to be "zero", though.
(In reply to comment #5)
> Steven:  I'm hoping we could get a query of all the App Notes for these
> crashers, find the most common ones, and investigate.

We can definitely do that.

Lars, can you get us a list of app notes for this stack across branches/products in the last 2 weeks (4 weeks if you can)? The list should only have the UUID and the app notes, nothing more.
(In reply to comment #7)
> Lars, can you get us a list of app notes for this stack across

s/stack/stack signature
sam/smokey/steven:  after reading bug #486574, I get it!

josh has made some of these exceptions non-fatal.

should this be a dup of that bug?

sam:  thanks for making the query request to lars.  Can I leave logging all the follow up bugs to you?
> should this be a dup of that bug?

No, I don't think so.

What actually would be most useful is to be able to search the app notes field for "unrecognized selector" and "selector not recognized", regardless of the stack.  This will catch a grab-bag of unrelated bugs, only some of which will have enough information (or enough of the right kind of information) for us to be able to pursue them.

But when the "unrecognized selector" and the stack are together enough for us to identify exactly where the crash takes place, we may actually be able to fix it.
> sam/smokey/steven:  after reading bug #486574, I get it!
>
> josh has made some of these exceptions non-fatal.

Actually, Josh's patch for bug 486574 made *all* Objective-C
exceptions non-fatal.  You could argue that exceptions containing the
strings "unrecognized selector" or "selector not recognized" should be
made fatal again.  So this bug is related to bug 486574.  But I don't
think it's a dup.
assuming that since the signatures [@ nsObjCExceptionLogAbort] and [@ nsAppShell::ProcessGeckoEvents] return 1 and 0 records respectively, the actual signature that you want is: nsObjCExceptionLogAbort(NSException*) | nsAppShell::ProcessGeckoEvents(void*) which returns 994 records.  They are attached...
Lars, if you don't mind, please also create a list of crash ids whose
app notes fields contain the strings "unrecognized selector" or
"selector not recognized".  These will (or should) all be on OS X.
Please cover the last month.
Attached file for the mac guys
I did a little post processing to find the common exceptions, here's the output.

notice that of the 955 reports, this exception from 1Password.app was the #1 with 248 exceptions

1Password extension not updated: To update the 1Password extension, please restart your web browser at your convenience.

here's how I came up with the output:

$ cat ~/Desktop/nsObj.txt | awk '{print $1 $2 $3 $4 $5 $6}' | sort | uniq -c |
sort -rn | grep -v "      1 "  > ~/Desktop/out.txt

That was to drop "one time" crashes, and ignore the pointer addresses and uuids.
1Password is a third-party utility
(http://agilewebsolutions.com/products/1Password).

> 1Password extension not updated: To update the 1Password extension,
> please restart your web browser at your convenience.

Sounds like whenever 1Password is updated, you need to restart your
browser :-)  This warning is clearly non-fatal -- we shouldn't crash
on it.  And we no longer do in distros that contain the patch for bug
486574.

I doubt 1Password is a Mozilla-specific "extension".  In any case it
doesn't appear to be open-source.
In regard to Comment #13 - should this new list be in the context of the aforementioned signature or without regard to signature?
> In regard to Comment #13 - should this new list be in the context of
> the aforementioned signature or without regard to signature?

Without regard to signature.

I'd just like a list of all the crash ids whose app notes (or more
specifically whose "Obj-C Exception data" in the app notes) contain
the strings "unrecognized selector" or "selector not recognized",
regardless of other search criteria.  Please display the data in two
columns, as you did with attachment 385204 [details].

I don't expect you'll get any non-OS-X crash ids.  But if you do,
please also filter on platform (only include OS X crashes).

Thanks a lot!
For the record, the sql that produced the "unrecognized.txt" attachment:

select 
  uuid, app_notes 
from reports
where 
  '2009-05-25' < date_processed
  and os_name = 'Mac OS X'
  and (app_notes like '%unrecognized selector%' 
       or app_notes like '%selector not recognized%')
Steven, I'm curious what you learned from the attachment in comment 18 :)
I haven't had time to take more than a brief look, I'm afraid.

And we're no longer collecting this kind of information (since the
patch for bug 486574 landed, which made all Objective-C exceptions
non-fatal).  So it will gradually become obsolete.

But I'm glad I asked Lars to collect it, and it may still prove useful
(especially in conjunction with other information).

I do notice lots of calls to [[whatever] setImage:] -- presumably
fallout from bug 499600 and friends.
I filed bug 511700 for making these specific ObjC exceptions fatal again.
Summary: crash [@ nsObjCExceptionLogAbort] [@ nsAppShell::ProcessGeckoEvents] → Analyze nsObjCExceptionLogAbort data for "unrecognized selector" and "selector not recognized" bugs
MXR seems to think that nsObjCExceptionLogAbort is now dead code.  Is that right?

http://mxr.mozilla.org/mozilla-central/search?string=nsObjCExceptionLogAbort
(In reply to comment #22)
> MXR seems to think that nsObjCExceptionLogAbort is now dead code.  Is that
> right?
> 
> http://mxr.mozilla.org/mozilla-central/search?string=nsObjCExceptionLogAbort

See bug 486574 (and bug 494008 and bug 511700).

Short version: making all exceptions fatal was creating hundreds of thousands of needless crashes, so now no exceptions are fatal, and everyone rejoiced and kept on browsing.  nsObjCExceptionLogAbort could/should be used again by a fix for bug 511700 or any other exceptions we wanted to make fatal.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: