Resource Menu Exception Encountered #158

Closed
RobertBColton opened this Issue Oct 28, 2014 · 6 comments

Comments

Projects
None yet
3 participants
@RobertBColton
Collaborator

RobertBColton commented Oct 28, 2014

User encountered an exception while working with the code editor after a couple of hours.

Original topic: http://enigma-dev.org/forums/index.php?topic=2229.msg23513;boardseen#new
Look and Feel: Nimbus
Stack trace: http://pastie.org/9681029

Exception originated at https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/components/visual/ImageToolTip.java#L46
Image tooltip is only used in the following class https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/components/ResourceMenu.java#L163

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Oct 28, 2014

Collaborator

I was now able to reproduce the issue. It only exists under the nimbus look and feel.

Steps to reproduce:

  1. Open a new project
  2. Create a new object
  3. Hover the mouse over the iconified area of either the parent resource menu or the sprite menu
  4. Exception will occur when attempting to paint ToolTipUI with Nimbus look and feel.

I did extensive searching through the code and I really see nothing wrong with our implementation, if you comment out calling the paint method of the tooltip parent the exception goes away and the tooltip paints the image as it does under all other look and feels. This seems to be an actual bug in the Nimbus look and feel.
http://j6a.ru/_synth_tool_tip_u_i_8java_source.html

Collaborator

RobertBColton commented Oct 28, 2014

I was now able to reproduce the issue. It only exists under the nimbus look and feel.

Steps to reproduce:

  1. Open a new project
  2. Create a new object
  3. Hover the mouse over the iconified area of either the parent resource menu or the sprite menu
  4. Exception will occur when attempting to paint ToolTipUI with Nimbus look and feel.

I did extensive searching through the code and I really see nothing wrong with our implementation, if you comment out calling the paint method of the tooltip parent the exception goes away and the tooltip paints the image as it does under all other look and feels. This seems to be an actual bug in the Nimbus look and feel.
http://j6a.ru/_synth_tool_tip_u_i_8java_source.html

@RobertBColton RobertBColton changed the title from Exception Encountered to Resource Menu Exception Encountered Oct 28, 2014

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Oct 31, 2014

Collaborator

Josh was able to reproduce this on Linux with the Swing look and feel.
http://pastebin.com/sRZ4ywzR

I have patched this in c5565f3 and I believe the issue is fully resolved.

@IsmAvatar Would you like to weigh in before I close this ticket?

Collaborator

RobertBColton commented Oct 31, 2014

Josh was able to reproduce this on Linux with the Swing look and feel.
http://pastebin.com/sRZ4ywzR

I have patched this in c5565f3 and I believe the issue is fully resolved.

@IsmAvatar Would you like to weigh in before I close this ticket?

@IsmAvatar

This comment has been minimized.

Show comment
Hide comment
@IsmAvatar

IsmAvatar Oct 31, 2014

Owner

Wonder why I was holding onto the ui to paint to it rather than super painting in the first place.

Could you please test around a bit - anything that has an image tooltip and a scrollbar, for instance (if that's a thing) to make sure it's getting rendered in the right place. Also probably try a couple look and feels.

Once you're satisfied with testing, I'd recommend just refactoring out the ttui property since it doesn't look like it's used anymore.

Owner

IsmAvatar commented Oct 31, 2014

Wonder why I was holding onto the ui to paint to it rather than super painting in the first place.

Could you please test around a bit - anything that has an image tooltip and a scrollbar, for instance (if that's a thing) to make sure it's getting rendered in the right place. Also probably try a couple look and feels.

Once you're satisfied with testing, I'd recommend just refactoring out the ttui property since it doesn't look like it's used anymore.

@JoshDreamland

This comment has been minimized.

Show comment
Hide comment
@JoshDreamland

JoshDreamland Nov 1, 2014

Seems to be fixed.

Seems to be fixed.

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Nov 1, 2014

Collaborator

@IsmAvatar I tested around a bit more with literally all look and feels, even the non installed ones. Everything seems to work with just calling the super method, and not only does it work, the render is consistent with the look and feel. I further cleaned up the code in 4006d66 but I am just waiting for @JoshDreamland or anybody to confirm that it also works on Linux.

Collaborator

RobertBColton commented Nov 1, 2014

@IsmAvatar I tested around a bit more with literally all look and feels, even the non installed ones. Everything seems to work with just calling the super method, and not only does it work, the render is consistent with the look and feel. I further cleaned up the code in 4006d66 but I am just waiting for @JoshDreamland or anybody to confirm that it also works on Linux.

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Nov 1, 2014

Collaborator

@JoshDreamland thank you, this issue is now resolved.

Collaborator

RobertBColton commented Nov 1, 2014

@JoshDreamland thank you, this issue is now resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment