[10.5] Print dialog fails the second time I run it. [@objc_msgSend | _nsnote_callback ]




9 years ago
8 years ago


(Reporter: jrmuizel, Assigned: smichaud)


({crash, topcrash, verified1.9.2})

crash, topcrash, verified1.9.2
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 final+, status1.9.2 .2-fixed, status1.9.1 .9-fixed)


(Whiteboard: [crashkill][#39 Firefox 3.6b4 topcrash], crash signature)


(1 attachment, 1 obsolete attachment)



9 years ago
The print dialog doesn't seem to be working very well for me on trunk:

Sometimes I get crashes, sometimes I get error messages and the print dialog dispears.

Here are the crashes:

One of them has the following notes:
App Notes  	
Obj-C Exception data:
NSInvalidArgumentException: *** -[NSCFString currentPrinter]: unrecognized selector sent to instance 0x3ab13b90
Obj-C Exception data:
NSInvalidArgumentException: *** -[NSCFString currentPrinter]: unrecognized selector sent to instance 0x3ab13b90

Comment 1

9 years ago
The error message in the dialog is:

Printer Error
An unknown error occured while printing.


9 years ago
Summary: Print dialog fails the second time I run it. → Print dialog fails the second time I run it. [@objc_msgSend | _nsnote_callback ]

Comment 2

9 years ago
Looking at the crash stats this seems to happen pretty often for people on 3.5.3 too.

Comment 3

9 years ago
Here's a stack for the case where the ErrorDialog is shown.

#0  0x02563fa6 in nsPrintEngine::ShowPrintErrorDialog ()
#1  0x0256afa3 in nsPrintEngine::CommonPrint ()
#2  0x0256b107 in nsPrintEngine::Print ()
#3  0x0207df24 in DocumentViewerImpl::Print ()
#4  0x029c2d38 in NS_InvokeByIndex_P ()
#5  0x01e955be in XPCWrappedNative::CallMethod ()
#6  0x01e9c31e in XPC_WN_CallMethod ()
#7  0x002103a5 in js_Invoke ()
#8  0x00210cfe in js_InternalInvoke ()
#9  0x001b698e in JS_CallFunctionValue ()

Comment 4

9 years ago
Here's some slightly more verbose info:

2009-11-02 11:21:20.764 firefox-bin[97909:813] 	ERROR
2009-11-02 11:21:20.939 firefox-bin[97909:813] *** -[NSCTFont currentPrinter]: unrecognized selector sent to instance 0x17b752c0
2009-11-02 11:21:20.947 firefox-bin[97909:813] Mozilla has caught an Obj-C exception [NSInvalidArgumentException: *** -[NSCTFont currentPrinter]: unrecognized selector sent to instance 0x17b752c0]


9 years ago
blocking2.0: --- → ?
Widget:Mac is dead (unless you're a XUL app on Gecko 1.8.x); long live Widget:Cocoa!
Component: Widget: Mac → Widget: Cocoa
QA Contact: mac → cocoa
Mozilla Crash Reports sent me to this bug:

I can reproduce it without difficulties on mozilla1.9.2 branch (I'm using a localized nightly build, tried also with a new clean profile): load a page (or even the blank page), open Print and press Esc to cancel. Do this more than 3-4 times and you get a crash or you have to stop the process with Activity Monitor.
Severity: normal → critical
Keywords: crash

Comment 7

9 years ago
I can't reproduce this on Mac OS X 10.5.8 with either 3.5.5 or 3.6b4. Any more tips on reproducing would be helpful.
Duplicate of this bug: 532528
Whiteboard: [crashkill]

Comment 10

9 years ago
see attachment in comment 9 for some test cases. (may contain private information in url query strings)
Created attachment 416777 [details]
GDB backtrace

I am able to reproduce this 100% in the lab connected to the HP 1300 printer, so Steven Michaud was kind enough to show me how to do GDB - information is attached.
I've found reliable STR for this bug.  But it's very strange -- in
order to see it, you need to print to a printer whose supply levels
Apple is able to query!

These crashes only happen on the trunk and the 1.9.2 branch.  They
happen on OS X 10.5.8 but not on 10.6.2.  I haven't yet had a chance
to test 10.4.11.

1) In the Print & Fax pref panel, set as Default Printer a printer
   which reports current supply levels when you do the following:

   a) Click the Options & Supplies button (in the Print & Fax pref

   b) Click the Supply Levels tab.

      This tab will either report the supply levels of toner and/or
      paper, or tell you "information not available".  The crashes
      don't happen if you see "information not available".

2) Select some text in a page.

3) Do File : Print or command-p to bring up as OS-provided modal print

4) Cancel out of the print dialog.

5) Open it again (as per step 3).

   You'll often crash at this point, or after repeating steps 4 and 5.

6) If not, try checking and unchecking "Print selection only" or
   "Shrink to fit page width", or make some other change in the modal
   Print dialog.

   This should trigger a crash.
Assignee: nobody → smichaud
As best I can tell, these crashes can happen with any printer driver, including the generic postscript printer driver.
Have not been able to reproduce this using 10.4.11 and printing the lab printer. Will try a local printer as well.
I should mention that you don't	always see a crash using the STR from
comment #12.  Sometimes	you see	a window with the following error

Printer	Error
An unknown error occurred while	printing.
Here are the regression ranges for this bug:

2009-10-01-03-mozilla-central (trunk)
2009-11-06-03-mozilla-1.9.2 (1.9.2 branch)

This implicates the patches for bug 456646 and bug 520494.
Blocks: 456646, 520494
And when you see the "unknown error" message, you also see "unrecognized selector" errors in the console, like

2009-12-10 17:21:47.788 firefox-bin[8601:10b]
  *** -[NSSecureTextField currentPrinter]:
  unrecognized selector sent to instance 0x1ef9da70


12/10/09 5:21:06 PM firefox-bin[8592]
  *** -[NSCFString currentPrinter]:
  unrecognized selector sent to instance 0x1eed8ad0

Clearly a currentPrinter selector is being sent to a deleted object.

I suspect this object was originally a PMPrintWindowController object.
Created attachment 417218 [details] [diff] [review]

A tryserver build will follow in a few hours.
Attachment #417218 - Flags: review?(joshmoz)
The tryservers seem to have had a major hiccup last night, so my Mac
build never finished.  I'll do another one on Monday.

As best I can tell, here's why the crashes happen:

A PMPrintWindowController object registers itself for
kInkCheckerNotification notifications, but doesn't unregister itself
on deletion.  This causes the OS to continue sending these
notifications, to a now deleted object -- which triggers the crashes.

(The PMPrintWindowController class is (like the PMInkChecker class)
implemented in the PrintCocoaUI bundle, which is a "plugin" of the
Print framework under the Carbon framework.)
Looking	only at the builds containing the patches mentioned in comment
#17 (3.6 beta2 and above), this	bug's crash is the #5 Mac topcrasher,
with 481 cases in the last week.
Keywords: topcrash
Thanks so much for looking into this, Steven!
Whiteboard: [crashkill] → [crashkill][#39 Firefox 3.6b4 topcrash]
> Thanks so much for looking into this, Steven!

You're most welcome, Markus!

Here, finally, is a tryserver build made with my patch from comment #19:
Comment on attachment 417218 [details] [diff] [review]

This bug may also be fixed by my patch for bug 396680, which I just
posted (attachment 417726 [details] [diff] [review]).  If so, it should probably replace my
current patch for this bug, since the former is more narrowly

> As best I can tell, here's why the crashes happen:
> A PMPrintWindowController object registers itself for
> kInkCheckerNotification notifications, but doesn't unregister itself
> on deletion.  This causes the OS to continue sending these
> notifications, to a now deleted object -- which triggers the
> crashes.

If my patch at bug 396680 comment #30 does also fix this bug, this
comment will turn out to have been incorrect.

Marcia, please test my patch for bug 396680 on this bug's STR.  I can
no longer do it myself, since I'm no longer at the MV office.
Attachment #417218 - Flags: review?(joshmoz)
Summary: Print dialog fails the second time I run it. [@objc_msgSend | _nsnote_callback ] → [10.5] Print dialog fails the second time I run it. [@objc_msgSend | _nsnote_callback ]
Steven: Sorry for the delay in testing I was preoccupied with B5 testing.

I have tested your STR in this bug on the latest trunk nightly -  Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20091218 Minefield/3.7a1pre and I have not yet been able to crash. I tried with the both the lab printer and at least one of the other printers in Comment 13. I also took the printer offine and did not see any crash (that was for the other bug).
Thanks, Marcia!

So this bug is fixed by my patch for bug 396680.
Last Resolved: 9 years ago
Depends on: 396680
Resolution: --- → FIXED
Attachment #417218 - Attachment is obsolete: true
Adding Mary to this bug since she was hitting this in Beta 5 with Wells Fargo. Mary if you test today's RC candidate to confirm this is fixed with your banking situation that would be great.
> test today's RC candidate

Please test today's Minefield nightly.  The fix for this bug has only landed on the trunk.
This looks to be the top crash on Mac for Firefox 3.6 ->http://tinyurl.com/yarok5a. I think we should consider this for a dot release.
status1.9.2: --- → ?
I've already requested 1.9.2-branch and 1.9.1-branch approval for my patch for bug 396680, which also fixes this bug.

You might want to repeat your comment at bug 396680.
blocking2.0: ? → final
This should now be fixed on the 1.9.2 and 1.9.1 branches by my patch for bug 396680.
status1.9.1: --- → .9-fixed
status1.9.2: ? → .2-fixed

Comment 32

9 years ago
The latest online build (Firefox 3.6 for Mac, March 3 2010, from getfirefox.com) still seems to have this problem. But of course I'm not sure if the latest build includes the fix.

<Crash Report>
Add-ons: {972ce4c6-7e08-4474-a285-3208198ce6fd}:3.6
BuildID: 20100115132715
CrashTime: 1267649199
EMCheckCompatibility: true
FramePoisonBase: 00000000f0dea000
FramePoisonSize: 4096
InstallTime: 1266609804
ProductName: Firefox
ReleaseChannel: release
SecondsSinceLastCrash: 3912
StartupTime: 1267645865
Theme: classic/1.0
Throttleable: 1
URL: http://losangeles.broadwayworld.com/printcolumn.cfm?id=103829
Vendor: Mozilla
Version: 3.6

This report also contains technical information about the state of the application when it crashed.
</Crash Report>


The date (March 3 2010) is when the crash happened, not the date of the build.

The report is of a crash in FF 3.6 (released in late January 2010) -- which of course doesn't yet have this bug's fix.

Comment 34

9 years ago
Thanks Steven,
               Any suggestions, where should i look for the latest build?

- Ritvik
Current Firefox nightly builds can be found at

1.9.2-branch builds are of Firefox 3.6.X.  1.9.1-branch builds are of
Firefox 3.5.X.  "mozilla-central" builds are on the "trunk".
Candidate builds for Firefox 3.6.2 can be found at ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/3.6.2-candidates/build3/.

Candidate builds for Firefox 3.5.9 can be found at ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/3.5.9-candidates/build1/.

Both of these contain what we think is the fix for this.
Verified fixed on the 1.9.2 branch using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20100316 Firefox/3.6.2. I verified using an office printer that reports supply levels. Adding keyword.
Keywords: verified1.9.2

Comment 38

9 years ago
no reports of this signature in early 3.6.2 crash data. #5 topcrash killed! whooohooo!
(In reply to comment #38)

Actually there are a couple:


And there've been a few of these on the trunk.

But they're a different bug:  The crashes only happen on OS X 10.6.X,
and the stacks are different.  Presumably this new bug is also an
Apple bug, and it may even be related to the old one (Apple may
somehow have "ported" the old bug to 10.6).  But fortunately it's much
less common.  And in any case we probably won't be able to do anything
about it until we can reproduce it.

Here's a recent stack of the current bug for reference:

Crash Signature: [@objc_msgSend | _nsnote_callback ]
You need to log in before you can comment on or make changes to this bug.