Opened 6 years ago

Closed 6 years ago

#820 closed defect (wontfix)

sun.java2d.HeadlessGraphicsEnvironment cannot be cast to sun.awt.Win32GraphicsEnvironment

Reported by: Soap Owned by:
Priority: minor Milestone:
Component: apps/console Version: 0.9.4
Keywords: Cc:
Parent Tickets:

Description

At least from I2P version: 0.9.3-14 including 0.9.4-0

Multiple entries in Service (Wrapper) Logs

Exception in thread "AWT-EventQueue?-0" java.lang.ClassCastException?: sun.java2d.HeadlessGraphicsEnvironment? cannot be cast to sun.awt.Win32GraphicsEnvironment
at sun.awt.windows.WToolkit$3.run(Unknown Source)
at java.awt.event.InvocationEvent?.dispatch(Unknown Source)
at java.awt.EventQueue?.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue?.access$000(Unknown Source)
at java.awt.EventQueue?$1.run(Unknown Source)
at java.awt.EventQueue?$1.run(Unknown Source)
at java.security.AccessController?.doPrivileged(Native Method)
at java.security.AccessControlContext?$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue?.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread?.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread?.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread?.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread?.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread?.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread?.run(Unknown Source)

Subtickets

Change History (4)

comment:1 follow-up: Changed 6 years ago by zzz

Windows, right?

I believe you said it was related to displaying the graphs page in the console?

Do the graphs display correctly?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 6 years ago by Soap

Replying to zzz:

Windows, displaying console graphs, yep.
Graphics all looked fine, no problems apart from posted 'Exception'. Happened pretty regularly but can't say every time.

In any event, not seen with I2P version: 0.9.4-3

Java version: Sun Microsystems Inc. 1.6.0_33 (Java(TM) SE Runtime Environment 1.6.0_33-b05)
Wrapper version: 3.1.1
Server version: 6.1.26
Servlet version: Jasper JSP 2.1 Engine
Platform: Windows XP x86 5.1
Processor: Duron (athlon)
Jbigi: Locally optimized native BigInteger? library loaded from file
Encoding: Cp1252
Charset: windows-1252

Soap

comment:3 in reply to: ↑ 2 Changed 6 years ago by Soap

Spoke too soon...
Still in 0.9.4-3

Soap

comment:4 Changed 6 years ago by zzz

  • Component changed from unspecified to apps/console
  • Milestone 0.9.5 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This appears to be a harmless Windows-only Java bug.

Unfortunately there's nothing we can do to stop the logging, as it's coming from an AWT thread (see trace in OP).

Closing as wontfix since we can't do anything about it.


https://docs.palantir.com/metropolisdev/troubleshooting-and-known-issues.html

quote:

Exception when running a local server on Windows, and then changing display settings (or using Remote Desktop)

The server is run in Headless Mode, and there's a bug with java on Windows where a program running headless will throw this exception whenever there are display changes:

"java.lang.ClassCastException?: sun.java2d.HeadlessGraphicsEnvironment? cannot be cast to sun.awt.Win32GraphicsEnvironment"

This also includes remoting into a Windows machine with a local server running.

Workaround:

None. The exception is harmless. Solution is to wait for the bug to be fixed in java: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6607186

Note: See TracTickets for help on using tickets.