Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Throws unexpected "Graphic is diposed" exception
Throws unexpected "Graphic is diposed" exception [message #988253] Thu, 29 November 2012 06:37 Go to next message
ocean xue is currently offline ocean xueFriend
Messages: 107
Registered: November 2011
Senior Member
Project use WAR Product Configuration deploy to tomcat6, not fixed Throws unexpected "Graphic is diposed" exception
Re: Throws unexpected "Graphic is diposed" exception [message #988255 is a reply to message #988253] Thu, 29 November 2012 06:49 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
in order to help at least RAP version and the stack trace of the
exception is needed.
Best,
Ivan

On 11/29/2012 8:37 AM, ocean xue wrote:
> Project use WAR Product Configuration deploy to tomcat6, not fixed
> Throws unexpected "Graphic is diposed" exception

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Throws unexpected "Graphic is diposed" exception [message #988272 is a reply to message #988255] Thu, 29 November 2012 09:14 Go to previous messageGo to next message
ocean xue is currently offline ocean xueFriend
Messages: 107
Registered: November 2011
Senior Member
RAP version: RAP2.0M1

exception reference attachment.

thanks a lot.
  • Attachment: stack.png
    (Size: 999.51KB, Downloaded 222 times)

[Updated on: Thu, 29 November 2012 09:17]

Report message to a moderator

Re: Throws unexpected "Graphic is diposed" exception [message #988443 is a reply to message #988272] Thu, 29 November 2012 22:00 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
This can happen if the same image is used in two sessions and gets disposed in one of the sessions. Check you're creating new images for each session when setting the column header image.
Re: Throws unexpected "Graphic is diposed" exception [message #988460 is a reply to message #988443] Fri, 30 November 2012 00:29 Go to previous messageGo to next message
ocean xue is currently offline ocean xueFriend
Messages: 107
Registered: November 2011
Senior Member
action and control icons is used the image tools class set

Snippet:
-------------------------------------------------------------
public class ImageUtil {
private static ImageRegistry registry = new ImageRegistry();

/**
* get image
*
* @param fileName file path
* @return
*/
public static Image getImage(String fileName) {
Image image = registry.get(fileName);
if (image == null) {
image = Activator.getImageDescriptor(fileName).createImage();
registry.put(fileName, Activator.getImageDescriptor(fileName));
}
return image;
}
}
Re: Throws unexpected "Graphic is diposed" exception [message #988492 is a reply to message #988460] Fri, 30 November 2012 08:52 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
That's the problem. Your ImageRegistry is stored in a static variable, so it, and all the images inside it are shared between sessions.
Re: Throws unexpected "Graphic is diposed" exception [message #988517 is a reply to message #988492] Fri, 30 November 2012 10:41 Go to previous messageGo to next message
ocean xue is currently offline ocean xueFriend
Messages: 107
Registered: November 2011
Senior Member
Modified create the image, but also Throws unexpected "Graphic is diposed" exception.
What other methods?

Snippet:
-------------------------------------------------------------
public class ImageUtil {

/**
* get image
*
* @param fileName
* @return
*/
public static Image getImage(String fileName) {
return Activator.getImageDescriptor(fileName).createImage();
}

/**
* get ImageDescriptor
*
* @param fileName
* @return
*/
public static ImageDescriptor getImageDescriptor(String fileName) {
return Activator.getImageDescriptor(fileName);
}
}

[Updated on: Thu, 06 December 2012 05:34]

Report message to a moderator

Re: Throws unexpected "Graphic is diposed" exception [message #989402 is a reply to message #988517] Thu, 06 December 2012 05:38 Go to previous message
ocean xue is currently offline ocean xueFriend
Messages: 107
Registered: November 2011
Senior Member
Different client access.
This is what is the reason? What solutions?

thanks
Previous Topic:Themes in RAP 2.0 M3
Next Topic:Hide Empty Submenus
Goto Forum:
  


Current Time: Thu Mar 28 23:45:59 GMT 2024

Powered by FUDForum. Page generated in 0.03211 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top