Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#199 closed defect (fixed)

No menu in ImageJ

Reported by: Joop Owned by:
Priority: major Milestone: GA5
Component: general Version: 1.6.0 Build 27 GA4
Severity: medium Keywords:
Cc:

Description (last modified by Silvan Scherrer)

Installed latest Odin 0.8.8 and Java 1.60 GA4. Changed the command file to point to the right directions. ImageJ starts, but again without main menu.

Attachments (1)

ImageJ with Java 160 GA4.jpg (11.4 KB) - added by Joop 11 years ago.
Screen capture of main menu, clearly the above bar is totally empty.

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by Joop

Screen capture of main menu, clearly the above bar is totally empty.

comment:1 Changed 11 years ago by Silvan Scherrer

please don't open several tickets for the same issue. this is useless and leads to nothing.

comment:2 Changed 11 years ago by Joop

I open as many tickets as I want, because if I open only one ticket you think its only one program and don't want to investigate time in solving the bug.
I found more programs with same behavior, no menu, seems to be something that is introduced in the GA2 release. The GA release shows the menu, however, if used with latest Odin versions sometimes the open and save files dialogs won't work, ie you can sometimes read a file, but not save because the directory structure is absent and alike, difficult bug because I can't pinpoint it to or Java or Odin. Seems to be the interaction between the two. Sorry.

comment:3 Changed 11 years ago by Silvan Scherrer

Description: modified (diff)
Summary: No menu in ImageJ after installing Java GA4No menu in ImageJ

it's so easy to change the header.

comment:4 Changed 11 years ago by dmik

Milestone: EnhancedGA5

comment:5 Changed 11 years ago by dmik

I can confirm that GA works well, but not GA2 and above. I've tried quickly comparing changes but no luck so far.

Testing it on a simple test case.

comment:6 Changed 11 years ago by dmik

Crap. While doing svn checkins back and forth my Java build broke. It complains that sun.nio.ch.WindowsSelectorImpl?.FdMap? has no definition of SerialVersionUID and it fails since -Werror is specified (which turns warnings into errors). I have NO IDEA how it could build before -- both the -Werror and the FdMap? class are there since ever (r2 to be exact). Miracle...

comment:7 Changed 11 years ago by dmik

I fixed it by adding @SuppressWarnings?("serial") but this still doesn't explain how it could be EVER built before.

comment:8 Changed 11 years ago by dmik

Ok, the method of rolling back is a nightmare. Each milestone requires its own environment (compiler/linker/odin) which is too much work given that my build environment evolves together with java. I will have to just find the regression using logic rather than the trial approach.

comment:9 Changed 11 years ago by dmik

Okay, the build problem is solved -- it turned out that there was a bad mixture of revisions here; doing a clean checkout (looong) and the full rebuild made everything work.

Version 0, edited 11 years ago by dmik (next)

comment:10 Changed 11 years ago by dmik

BTW, while working on this, I found that AWT needs RICHED20.DLL or RICHED32.DLL for some of its classes (in particular, TextArea?). The lack of this DLL may explain various issues with repainting some widgets (like the text area widget in my simple test case). I'm not yet sure if it's related to the menu problem. Will find it out.

comment:11 Changed 11 years ago by dmik

The TextArea? problem has been fixed within #202. WRT the rest, I see that something is wrong in the menu code, it throws exceptions when trying to access non-existing menu items but I don't see why yet. Decoding the program logic.

comment:12 Changed 11 years ago by dmik

Ok, much clearer now. All menu items are owner drawn in AWT but for the items in the main menu bar the WM_DRAWITEM message is either not delivered or not correctly processed -- at least AwtMenu::DrawItem?() is never called for them.

comment:13 Changed 11 years ago by dmik

Resolution: fixed
Status: newclosed

The original problem is fixed in r412. Turned out that when doing r333 I changed the signature of one virtual method in AwtMenu? (GetItem?()) without respectively changing its declaration in AwtMenuBar?. This de-virtualize this method in AwtMenuBar? and therefore it was not called from AwtMenu::DrawItems?() (the AwtMenu? version was called instead which operates on a different array of items).

For the file open dialog, I created a new Odin ticket, http://svn.netlabs.org/odin32/ticket/95. Joop please always do the same: i.e. exactly ONE ticket per problem.

comment:14 Changed 11 years ago by dmik

Joop, sorry, I now see that you have already created http://svn.netlabs.org/odin32/ticket/93. Good.

Note: See TracTickets for help on using tickets.