This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 100860 - Disappearing Image Item on NB Startup, MVD
Summary: Disappearing Image Item on NB Startup, MVD
Status: VERIFIED WONTFIX
Alias: None
Product: javame
Classification: Unclassified
Component: Visual Designer (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Martin Brehovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-12 23:04 UTC by shamatt
Modified: 2007-07-12 09:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Hello form as it should appear--and does appear after close and reload. (6.40 KB, image/png)
2007-04-12 23:06 UTC, shamatt
Details
Hello form as it appears on NB startup. Note the missing ImageItem even though it is listed in the Inspector pane. (6.23 KB, image/png)
2007-04-12 23:08 UTC, shamatt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description shamatt 2007-04-12 23:04:00 UTC
This is a spinoff and clarification of Issue #91704.  That issue was closed by
myself for containing too much naivete.

The first ImageItem on a form will not display in the Mobile Visual Designer
upon NetBeans startup.

The workarounds are easy: (1) close the project and reopen it; or (2) move some 
items around on the form and all objects will appear.

Steps to reproduce:

0. Close all open projects.
1. Start a new mobile app with the hello midlet and default settings.
2. Copy a PNG file to your new src/hello folder (or anywhere).  I used
netbeans.png from C:\Program Files\netbeans-5.5\nb5.5\.
3. Add an ImageItem to the form in Screen Design mode.
4. Add an Image resource to the ImageItem and point it to the PNG file.
5. Save the project.  (click the Save All button twice)
6. Exit NetBeans.  (do not close the hello project)
7. Launch NetBeans.  (NetBeans must be launched so that this new project is 
the one that automatically loads in the IDE upon launch.)
8. You will find that the image item is not displayed in the Screen Designer.

NOTES:
a. This only applies to the first ImageItem on the form.
b. This only applies if the ImageItem is connected to a valid Image resource.
c. It does not matter where the ImageItem is placed on the form.
d. This only applies the project automatically opened by NetBeans at startup.
Comment 1 shamatt 2007-04-12 23:06:43 UTC
Created attachment 40864 [details]
Hello form as it should appear--and does appear after close and reload.
Comment 2 shamatt 2007-04-12 23:08:48 UTC
Created attachment 40865 [details]
Hello form as it appears on NB startup.  Note the missing ImageItem even though it is listed in the Inspector pane.
Comment 3 shamatt 2007-04-12 23:32:28 UTC
I perhaps should have mentioned that I am using NetBeans 5.5 with JDK 1.6.0
(and, later, JDK 1.6.0_01) for however that may affect things... or not.

Also, if you startup NetBeans with two or more projects automatically opened,
this bug only applies to the project that is on top at the time of startup.
Comment 4 David Kaspar 2007-04-13 08:17:03 UTC
I have tried it several times in NetBeans Mobility Pack 5.5 and 6.0 Milestone 8
with JDK 5 and JDK 6 on Linux platform and it works correctly.

Currently I think that it is caused by revalidation - means: the imageItem is
validated with [0,0] size on the screen and therefore it is not visible. You can
check it. When you are moving your mouse cursor over hypothetical place of the
image item and the "blue rectangle" appears, then it is a repaint problem only.
Otherwise it is the revalidation problem where the size is [0,0] and therefore
you cannot point it with a mouse (but you should be able to focus it by
selecting the "helloStringItem" and pressing Tab-key).

Unfortunately even if I would know how to fix it, the problem is that I cannot
verify that the fix works - it is kind of race condition where the issue can be
affected by a small change of the code even not related to the issue. Therefore
I would rather not fix this issue.

Comment 5 shamatt 2007-04-13 23:00:47 UTC
Definitely not a repaint problem.  There is no blue rectangle during hover or
with click.  In fact, if you have other items on the form they will have shifted
into the ImageItems' space.  To the user it actually appears that the item was
deleted.

Does not appear to be revalidation either.  There is no method to select the
item.  Tabbing only takes you to the exitCommand box.  Look at the screenshots
closely.  You will see that I attempted to select the item with the Structure
Inspector but there is no [0,0] type selection on the form.

Will someone running Windows XP (or any Windows) please verify?
Comment 6 shamatt 2007-04-13 23:08:16 UTC
Remember, the bug only exists at NB startup.  Compare the startup Open Project
code with the menu Open Project code.  They probably the share the same routine
but somehow run it differently.  Or, too early at startup before ImageItem or
Item resources have had time to initialize.

Also, remember the second workaround.  Move some items around and it magically
re-appears during the redraw.
Comment 7 shamatt 2007-04-13 23:20:38 UTC
More notes after fiddling some more:

Switching the MVD from Screen Design View to Source View or Flow Design View and
back does not make the ImageItem reappear.

Starting NB with the MVD set to open in one of the other views has no affect
either.  The ImageItem is still not loaded even if the first view is Source or
Flow Design.

Closing the MVD tab for the form and then reopening it DOES work as one more
workaround.

Updated workarounds: (1) close the project and reopen it; (2) close the MVD tab
for the affected form and reopen it; or (3) move some items around on the form
and all objects will appear.
Comment 8 Lukas Hasik 2007-04-16 14:19:30 UTC
I cannot reproduce on WinXP SP2, neither with jdk 1.5.0_11 nor with 1.6. There
must be something that I missed in the steps to reproduce or the issue is
specific to configuration.
Comment 9 shamatt 2007-04-17 21:23:47 UTC
Bugger.  Thanks for checking lhasik.

Perhaps it is related to my installation.  I will try to test that theory in the
next few weeks during or after my current project.  I will install nb onto my
laptop and see what happens.  (Right now I'm neck deep in debugging an Oracle
HTTP Server install that has my machine begging for mercy.)

I do get an error at every nb startup that started after installing Nokia's
Carbide.j.  I installed Carbide.j pretty quickly after nb so there is no way I
can know how this might relate.  That is reported in Issue #77255.

It could be that you have to generate an IllegalStateException during startup to
get this bug.  (Why the -bleep- didn't I say this sooner?)  Or, not.

I won't be installing Carbide.j on my laptop anytime soon.
Comment 10 David Kaspar 2007-07-10 16:38:08 UTC
Designer 1 has been removed from NB 6.0 therefore resolving issue as WONTFIX. Designer 2 does not have this issue.
Comment 11 Lukas Hasik 2007-07-12 09:11:59 UTC
setting up the target milestone.