Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble finding source of PBM error problem



Thanks Paul,

I little too rambley on the previous message, here's what i've got:

- PrintJobMgr doesn't crash (it was due to bug in my PM, which caused -1
error when using usb PBM, but i fixed that, anyway with my PBM it never
gets there)

- PMB is loading, my UI works fine.

- it looks like my PM's CreatePrinterBrowserModuleInfo function isnt
getting called when my PBM opens, has its info dict been cached?

- after clicking the Add button, i get the -1 error *before* the PM is
called to get its tickets and PDE paths! could it be the because of the
selected printer array returned from my PBM?

my debug log:

(opened my PBM here)

LPR IOMGetConnectionInfo
-->LPR PBM Prologue
<--LPR PBM Prologue: result = 0
-->LPR PBM Terminate
<--LPR PBM Terminate
-->LPR PBM Prologue
<--LPR PBM Prologue: result = 0
-->LPR PBM Initialize
<--LPR PBM Initialize: result = 0
-->LPR PBM WorksetPrinters
<--LPR PBM WorksetPrinters: result = 0

(pressed Add button here)

-->LPR PBM GetSelectedPrinters
LPR PBM LPRBrowserView::GetSelectedPrinters
address dict:
==
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Address</key>
<string>10.1.2.4</string>
<key>Connection</key>
<string>Generic LPR</string>
<key>Host</key>
<string>10.1.2.4</string>
<key>Model</key>
<string>Stylus Photo 750</string>
<key>Printer URI</key>
<string>lpd://10.1.2.4</string>
<key>Queue</key>
<string></string>
</dict>
</plist>
==
dict to return from GetSelectedPrinters (after adding lookupref
and putting in a CFArray):
==
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PrBrowser Selection Address</key>
<data>
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHBs
aXN0IFBVQkxJQyAiLS8vQXBwbGUgQ29tcHV0ZXIvL0RURCBQTElTVCAxLjAvL0VOIiAi
aHR0cDovL3d3dy5hcHBsZS5jb20vRFREcy9Qcm9wZXJ0eUxpc3QtMS4wLmR0ZCI+Cjxw
bGlzdCB2ZXJzaW9uPSIxLjAiPgo8ZGljdD4KCTxrZXk+QWRkcmVzczwva2V5PgoJPHN0
cmluZz4xMC4xLjIuNDwvc3RyaW5nPgoJPGtleT5Db25uZWN0aW9uPC9rZXk+Cgk8c3Ry
aW5nPkdlbmVyaWMgTFBSPC9zdHJpbmc+Cgk8a2V5Pkhvc3Q8L2tleT4KCTxzdHJpbmc+
MTAuMS4yLjQ8L3N0cmluZz4KCTxrZXk+TW9kZWw8L2tleT4KCTxzdHJpbmc+U3R5bHVz
IFBob3RvIDc1MDwvc3RyaW5nPgoJPGtleT5QcmludGVyIFVSSTwva2V5PgoJPHN0cmlu
Zz5scGQ6Ly8xMC4xLjIuNDwvc3RyaW5nPgoJPGtleT5RdWV1ZTwva2V5PgoJPHN0cmlu
Zz48L3N0cmluZz4KPC9kaWN0Pgo8L3BsaXN0Pgo=
</data>
<key>PrBrowser Selection Kind</key>
<string>lpr host</string>
<key>PrBrowser Selection Name</key>
<string>10.1.2.4</string>
</dict>
</plist>
==
LPR PBM LPRBrowserView::GetSelectedPrinters: result = 0
<--LPR PBM GetSelectedPrinters: result = 0
---------------------------------
-->CreatePrinterBrowserModuleInfo
kNonPSLPRConnection is supported for
model 0, BrowserInfoKey value: Stylus Photo 750, BrowserKindKey
value: PrintMagic Epson Stylus 750
<--CreatePrinterBrowserModuleInfo: result = 0

(got -1 error alert here)

-->LPR PBM WorksetPrinters
<--LPR PBM WorksetPrinters: result = 0


Any clue here? Could it be something wrong with what i'm returning from
GetSelectedPrinters?

Thanks so much. Have a good WWDC Paul, I wish I could be there this year.

-Pierre


On Fri, 20 Jun 2003 09:32:47 -0700, Paul Danbold <email@hidden> said:

>Pierre,
>
>It would help to see your PrintJobMgr crash log. Either send it to me
>directly or cc the printing list if you think others will benefit.
>First of all we need to find out if your IOM is being loaded and is
>correctly identifying the location of your PBM. Next, is your PBM
>being loaded successfully? After that PrintJobMgr calls your PM's
>CreatePrinterBrowserModuleInfo and hopefully it identifies itself as
>supporting your IOM. Later on, your PBM's GetSelectedPrinters finds
>your printer and when you click the Add button in PrintCenter, we call
>your PM to get its tickets and PDE paths. As you can see, there are
>quite a few steps in queue creation, that's why the crash log will help.
>
>-Paul
>
>
>On Thursday, June 19, 2003, at 12:43 PM, Pierre Houston (by way of
>Pierre Houston <email@hidden>) wrote:
>
>> Thanks Paul,
>>
>> Yes this is Jaguar. I don't think I have printf's in the PBM, except
>> for
>> some fprintf's that go to a log file.
>>
>> I've since seen your 2 messages to this list from February that talk
>> specifically about the -1 error. Sorry for not searching the archives
>> first (or just searching my saved mail, duh).
>>
>> Anyway, I found that my PM was failing with a -1 error for any I/O. Its
>> CreatePrinterTickets function was crashing PrintJobMgr. (I knew I
>> needed
>> to debug that code). So it looks like another cause of the -1 error is
>> a
>> PrintJobMgr crash.
>>
>> Correcting my PM code avoids the -1 error when using say the USB PBM,
>> but
>> my PBM still gets it. My PM's CreatePrinterTickets function isn't
>> getting
>> called, neither is its Initialize function, and Console doesn't report
>> that PrintJobMgr has crashed.
>>
>> Is there a way to tell what PrintJobMgr is doing? Can I invoke it
>> manually under the similar conditions? Is this what the "PrintJobMgr
>> queue-name" usage is for? I tried renaming the executables in its
>> bundle
>> so PrintJobMgr_debug got used instead during a run of Print Center,
>> hoping to see a clue sent to Console. No dice.
>>
>> Or perhaps its hasn't even gotten to PrintJobMgr yet and its not to
>> blame? Ah, top says differently. In my own logs, the only thing that I
>> can see happening at that time is a call to my PM's
>> CreatePrinterBrowserModuleInfo function. I'm confused, shouldn't this
>> have instead been called while initializing the PBM to gather the
>> lookup
>> specs of the supported PMs? %:-p
>>
>> Thanks for your help.
>>
>> -Pierre
>>
>> P.S your message was dated Jan 3, 1970. Hey, why do we get 1970 now
>> instead of 1904? I like 1904 better, maybe I'll file a bug :-)
>
>No need. I had some hardware problems earlier in the week.
>
>>
>> On Sat, 3 Jan 1970 03:51:59 -0800, Paul Danbold <email@hidden>
>> said:
>>
>>> Pierre,
>>>
>>> -1 usually means something other than the PrinterInfo ticket, the
>>> JobTemplate and the PDE paths are being written to stdout during queue
>>> creation. Have you checked there are no printf statements in your
>>> PBM?
>>> BTW I assume you are seeing this on Jaguar.
>>>
>>> -Paul
>>>
>>>
>>> On Tuesday, June 17, 2003, at 12:32 PM, Pierre Houston wrote:
>>>
>>>> Hi Bob,
>>>>
>>>> On Tue, 17 Jun 2003 10:10:59 -0400, email@hidden
>>>> <email@hidden> said:
>>>>
>>>>> Pierre,
>>>>>
>>>>> I saw this problem when I first began working on my PBM. While I
>>>>> don't
>>>>> remember for sure what caused this, I think it was because a had
>>>>> written a PBM but not an IOM (since I planned on getting the PBM
>>>>> part
>>>>> working before doing the IOM). The IOM's GetConnectionInfo routine
>>>>> must
>>>>> return the path of the PBM relative the the IOM path.
>>>>>
>>>>> Hope this helps.
>>>>>
>>>>> Bob Maggi
>>>>
>>>> Thanks Bob, but actually no, it doesn't :-) Yes I've already found
>>>> out
>>>> about the relative path to the PBM. And I found it somewhat
>>>> confusing,
>>>> but perhaps that's just me. I think this is how it goes:
>>>>
>>>> - If IOM and PBM are siblings in the same parent directory, the
>>>> browser
>>>> path should be "../PBM.plugin"
>>>>
>>>> - If the PBM is to be within the IOM's bundle (which seems
>>>> appropriate
>>>> to
>>>> me), say within a plugins directory, the browser path should be
>>>> "Contents/PlugIns/PBM.plugin"
>>>>
>>>> - If the IOM is within in the PBM's bundle (which i originally
>>>> thought
>>>> made sense then changed my mind), say within contents/plugins or
>>>> something, I believe the browser path should be just "../../.."!
>>>>
>>>> I believe these situations are all allowed, someone please correct me
>>>> if
>>>> I'm wrong.
>>>>
>>>> I wasn't clear, but the error -1 I get is upon clicking the Add
>>>> pushbutton in the browser sheet while my PBM is showing, not Print
>>>> Center's Add button in toolbar. This is what I'm referring to when I
>>>> ask
>>>> "What exactly happens after the Add button is pressed?"
>>>>
>>>> So can anyone give me a rundown of the calls made to PBM, IOM & PM
>>>> after
>>>> the browser sheet's Add button is pressed? Or anything in the print
>>>> system itself that would cause Print Center to report error -1?
>>>>
>>>> Thanks,
>>>> Pierre
>>>>
>>>>
>>>>>> Hi printing list,
>>>>>>
>>>>>> I'm once again working on a PBM. The LPR & USB samples from DTS are
>>>>>> very
>>>>>> useful, thanks Apple.
>>>>>>
>>>>>> Anyway, Print Center generates an error alert, error code -1,
>>>>>> after I
>>>>>> press the Add button with my PBM (in fact, after a long delay after
>>>>>> pressing the Add button). I don't doubt the -1 comes from my code,
>>>>>> but
>>>>>> I'm having trouble finding it. I probably not looking at all the
>>>>>> entry
>>>>>> point functions called by Print Center, in either PBM, IOM or PM.
>>>>>> What
>>>>>> exactly happens after the Add button is pressed?
>>>>>>
>>>>>> Or could possibly the -1 be coming from Print Center itself?? If so
>>>>>> what
>>>>>> might that mean?
>>>>>>
>>>>>> Thanks a bunch.
>>>>>>
>>>>>> --
>>>>>> Pierre Houston <mailto:email@hidden>
>>>>>> Senior Software Engineer Direct Ph: (604) 296-3635
>>>>>> Strydent Software, Inc. <http://www.strydent.com>
>>>>>> Suite 488 - 2608 Granville St. Office Ph: (604) 296-3600
>>>>>> Vancouver, BC, Canada V6H 3V3 Fax: (604) 296-3699
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Trouble finding source of PBM error problem (From: Paul Danbold <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.