Bug 35891 - Printing - Eclipse crashes my machine
Summary: Printing - Eclipse crashes my machine
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P2 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-31 16:12 EST by Silvain Piree CLA
Modified: 2005-06-23 13:03 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silvain Piree CLA 2003-03-31 16:12:07 EST
Printing in GEF crashes my machine, i.e. causes the "blue screen of death".

The problem appears to be caused by SWT. 

Based on suggestions from Randy Hudson, author of GEF, I was able to bring
the problem back to following small SWT program:

import org.eclipse.swt.graphics.*;
import org.eclipse.swt.printing.*;

public class Test {

    public static void main(String[] args) {
        Printer p = new Printer();
        p.startJob("");
        GC gc = new GC(p);
        gc.drawLine(10,20,30,40);
        p.endPage();
        p.endJob();
    }
}

This program crashes my machine, causing a "blue screen of death",
followed by a reboot. The program crashes on the drawLine call.
(Other methods like drawPolygon or drawOval do not cause a crash.)

Eclipse version: 2.1
Printer version: HP Laserjet 3100
Windows version: Windows 2000 Pro English

This is the only program that causes my machine to crash. Other
graphical programs, like Visio, do not cause any problems.
Comment 1 Veronika Irvine CLA 2003-03-31 16:53:07 EST
Felipe, you can borrow my Windows 2000 laptop to test this.  Silenio to advise.
Comment 2 Felipe Heidrich CLA 2003-04-28 15:39:58 EDT
Silvain, I can't get a blue screen of death but I get segmentation fault in the 
application, after that my default system printer disappear and I need to 
reboot my windows to get my printer back.

Anyway, if I replace the line p.startJob(""); by p.startJob("test"); the 
problem doesn't happen, is that true for you too ?
Comment 3 Silvain Piree CLA 2003-04-28 16:51:24 EDT
Felipe, I tried your suggestion of using p.startJob("test") but my machine 
still crashes .... 

If it doesn't crash for you, then it must have something to do with the
specific printer I'm using (HP Laserjet 3100) or the printer drivers.
(Although Eclipse is the only program that causes my machine to crash
on printing; no other drawing program ever caused a crash)
Comment 4 Andreas Kuckartz CLA 2003-05-18 13:12:50 EDT
Certain operations in Eclipse 2.1 - unrelated to printing - lead to a BSD (Blue 
Screen of Death). The BSD says: "DRIVER_IRQL_NOT_LESS_OR_EQUAL".

Upgrading from W2K Service Pack 0 (no service pack) to Service Pack 3 did not 
remove these effects.

When not using Eclipse I have a very stable Windows 2000 system. 
Comment 5 Andreas Kuckartz CLA 2003-05-18 13:20:35 EDT
My "Blue Screen of Death"-problem seems to be related to Bug 21276.
Comment 6 Andreas Kuckartz CLA 2004-06-16 16:57:50 EDT
Bug 21276 was resolved as a duplicate of bug 37204 which was resolved as a 
duplicate of bug 38430 which was fixed.

I tried to reproduce this crash with 3.0RC2 and the system did not crash!

My suggestion is to resolved this bug as a duplicate of bug 38430.
Comment 7 Felipe Heidrich CLA 2004-06-17 11:09:42 EDT
38430 was a problem with network, this is about printing! Are you sure they are 
duplicated ? Both are specific to a certain type of hardware, that is the only 
similarity I see.
Comment 8 Andreas Kuckartz CLA 2004-06-17 11:19:10 EDT
No, I am not sure.

Maybe it makes sense to have a look in the changes which resolved bug 38430. Or 
Silvain Piree (the reporter of this bug) can test if this bug occurs with 
3.0RC2.
Comment 9 Silvain Piree CLA 2004-06-17 13:08:31 EDT
I just tested with RC2 and the problem still occurs ...  :-(
Comment 10 Felipe Heidrich CLA 2004-06-29 15:00:16 EDT
Does a normal printing program fails on your machine as well ? Try:

import org.eclipse.swt.graphics.*;
import org.eclipse.swt.printing.*;

public class Test {
public static void main(String[] args) {
    Printer p = new Printer();
    GC gc = new GC(p);
    p.startJob("test");
    p.startPage();
    gc.drawLine(10,20,30,40);
    p.endPage();
    p.endJob();
    gc.dispose();
    p.dispose();
}
}
Comment 11 Silvain Piree CLA 2004-06-29 16:06:08 EDT
Yes. It also crashes my machine.
Comment 12 Carolyn MacLeod CLA 2004-06-29 16:27:01 EDT
I have a few more questions, Sylvain, if you don't mind:
- have you tried any other printer, other than the HP Laserjet 3100?
- is your HP Laserjet 3100 connected to your computer or to a network?
- have you tried upgrading your printer driver (long shot):
   go to this page: http://www.hp.com/sbso/bussupport.html
   and type in "HP Laserjet 3100" and select your model, and Windows 2000.

I will try running your little piece of code, plus Felipe's code that creates 
the print job with a name, and creates the gc before startPage, then I'll 
report back whether I have any problems with several different printers (I 
have access to 4 printers, but they are all on a network - I don't have a 
local printer). I'll try this on Windows XP and Windows 2000.
Comment 13 Carolyn MacLeod CLA 2004-06-29 17:45:58 EDT
No problem with small snippet on 4 printers, from Windows XP:
- HP LaserJet IIISi
- IBM Infoprint Color 1220
- IBM Infoprint 1140
- HP LaserJet 5Si Mopier

I have to reboot to try from Win2K - I will do that tomorrow.
Comment 14 Felipe Heidrich CLA 2005-06-23 13:03:19 EDT
Silvain, did you try Carolyn MacLeod's suggestion ?
I believe the problem is in the printer driver you were using. 

Closing problem report. Please, reopen it if you can reproduce this problem 
using different printers. Thanks.