Closed Bug 8321 Opened 27 years ago Closed 25 years ago

printing with MRJ plug-in hangs spooler

Categories

(Core Graveyard :: Java: OJI, defect, P3)

PowerPC
Mac System 8.5

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: dave_harper, Assigned: nezbo)

References

Details

(Keywords: platform-parity)

I've created an applet that needs to do some printing. Using Netscape 4.08+ with MRJ plug-in, when I submit a print job (first I get two dialogs, one that lets me set print preferences and a second to start the job -- they work correctly) the print spooler box shows up on the screen and then the spooler hangs. It will sit there forever if I don't do something. If I then click on my applet's title bar, then choose something else on the Mac desktop (usually my printer's icon), that somehow seems to fire the print job and everything works fine. I don't have this problem when using IE4 and MRJ 2.1. I've installed my applet's class files in the plug-in's class path (Macintosh HD/System/Extensions/MRJLibraries/MRJClasses) to avoid any applet security issues with printing.
Assignee: amusil → beard
Status: NEW → ASSIGNED
Target Milestone: M15
The MRJ plugin needs to implement printing.
Summary: printing with MRJ plug-in hangs spooler → [PP]printing with MRJ plug-in hangs spooler
Assignee: beard → mark.lin
Status: ASSIGNED → NEW
Reassigning bug to mark.lin@eng.sun.com Patrick added some code to try and get printing working, but there was some bug in the MRJ which prevented printing from working. I will try to investigate some more later. In the meanwhile, here's his original investigation report: I recently filed bug #2363664, which indicates that JMDrawFrameInPort is non-functional, and have had that confirmed by Pete. I'm trying to develop a workaround for now and am doing the following: 1. When my plugin gets called to print, I'm attempting to use JMSetFrameVisibility() with the current port, which is a printing port. 2. I am using JMGetAWTFrameJNIObject() to obtain the applet viewer's frame object who's print() method I want to call. 3. I pass the frame to a helper Java class that I call with JMExecJNIStaticMethodInContext() in the AWT context of the applet viewer. I then wait on a monitor that is notified when the method is done. 4. The helper class calls g = frame.getGraphics(), frame.print(g), and then the g.dispose() method, and then wakes up the calling thread. 5. I then restore the port back to the original when the main thread wakes up. Nothing appears on the printed page from the applet (I'm currently trying to print the bar chart example applet which does all of its own drawing). I'm assuming that this has something having to do with the graphics pipeline getting flushed sometime later, when I've already restored the port, or that QDGraphics can't draw to a printing port, or perhaps even subports not working with printing ports? I've even tried giving the VM an additional second of time using timed wait, and calling Toolkit.getDefaultToolkit().sync(), all of which had no effect. I'd appreciate any assistance you can provide. - Patric
Blocks: 11275
Status: NEW → ASSIGNED
I need to confirm this asap.
Keywords: pp
Summary: [PP]printing with MRJ plug-in hangs spooler → printing with MRJ plug-in hangs spooler
This bug has been sitting since September... so I'm guessing it is not going to block stability for an M15 branch. Pushing to M16
Target Milestone: M15 → M16
Mark Lin no longer works for Sun. Reassigning his bugs to George Drapeau
Assignee: mark.lin → drapeau
Status: ASSIGNED → NEW
I suspect this is blocked by apple mrj Bug ID # 2445405; i'll free george from this.. moved milestone per policy as well..
Assignee: drapeau → loki-sun
Target Milestone: M16 → M17
No milestone: no resources to work on Macintosh bugs right now.
Target Milestone: M17 → ---
Re-assinging bug to myself; Loki no longer works at Sun, much to my chagrin. Leaving target milestone as unspecified, as there are no resources to work on Macintosh OJI bugs, and no ETA on getting resources.
Assignee: loki-sun → drapeau
Terry can you please investigate this? Thanks, Ed
Assignee: drapeau → tnoyes
Updating QA Contact
QA Contact: paw → junruh
This seems to match bug #54194 and bug #27478, where the plug-in's ::print method isn't getting called (and it isn't in MRJPlugin) and a null root window (which I'm getting). I'll wait for the big guns to work things out.
Status: NEW → ASSIGNED
What's the status on this?
Terry, can you please post the status of this to the bug? Thanks, Ed
I believe I have. When bug #54194 and bug #27478 are fixed, this bug may go away.
Worksforme. I no longer crash when printing a page with java.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Verified worksforme.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.