Bug 4784 - MIF Files sometime fail (1GI7H7V)
Summary: MIF Files sometime fail (1GI7H7V)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:22 EDT by Mike Wilson CLA
Modified: 2002-03-07 10:23 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Wilson CLA 2001-10-11 14:22:57 EDT
prefix        p
name          179698
reference     
abstract      mif thumbnail somtimes fails
duplicate     

state         open                        priority      2                   
severity      3                           target                            
age           28                          due                               
product                         hasApar                           

compName      wsa.web.oti                 answer                            
release                                   symptom       io                  
envName                                   phaseFound    dt                  
level                                     phaseInject                       

addDate       2001/07/12 20:38:23         assignDate    2001/08/09 04:47:38 
lastUpdate    2001/08/09 04:47:38         responseDate                      
endDate                                

ownerLogin    decandio                    originLogin   matsu               
ownerName     George DeCandio             originName    Matsumoto, Hirotaka 
ownerArea     9ZVA                        originArea    9ZUA                

apar                                      pmr                          
test                                                                                               

tracks: none.

verify: none.

history:
    addDate              action          userLogin (userName)
    -------------------- --------------- ----------------------------------
    2001/07/12 20:38:23  open            matsu (Matsumoto, Hirotaka)
    2001/07/12 20:38:36  assign          matsu (Matsumoto, Hirotaka)
    2001/07/13 02:22:30  modify          nabe (Watanabe, Takeshi)
    2001/07/27 07:29:58  modify          nabe (Watanabe, Takeshi)
    2001/08/09 04:47:39  assign          uchi (Uchida, Kenji)

duplicate defects: none.

duplicate features: none.

sizing: none.

notes:
    <Note by matsu (Matsumoto, Hirotaka), 2001/07/12 20:38:23, seq: 1 rel: 0  action: open>

Thumbnail view fails in showing mif images when it is opened at the first
time.

Here is how to:
1) Delete workspace directory, so that by default, no project is opened.
2) Run eclipse
3) File -> New -> Other -> Web -> Web Project to create Web Project. Wait
   for the wizard to be finished. Make sure desktop shows Web Perspective.
4) Click Thumbnail tab to bring it up to the foreground. Make sure that
   nothing is displayed there.
5) Click + icon next to WebArt on Gallery
6) Click Logo folder
7) some mif files' thumbnail are not displayed.

wsa-jdk-pkg-20010712_1300-R09-R09.zip.

    <Note by matsu (Matsumoto, Hirotaka), 2001/07/12 20:38:36, seq: 2 rel: 0  action: assign>
Old Owner: asahata
New Owner: uchi



    <Note by nabe (Watanabe, Takeshi), 2001/07/13 02:22:28, seq: 3 rel: 0  action: modify>
Old Priority:  
New Priority:  postbeta



    <Note by nabe (Watanabe, Takeshi), 2001/07/27 07:29:58, seq: 4 rel: 0  action: modify>
Old Priority:  postbeta
New Priority:  2



    <Note by uchi (Uchida, Kenji), 2001/08/09 04:47:39, seq: 5 rel: 0  action: assign>

class org.eclipse.swt.internal.image.PngChunk ...
static int[] crcTable;
int computeCRC() {
    if (crcTable == null) {
        crcTable = new int[256];
        for (int i = 0; i < 256; i++) {
            crcTable[i] = i;
            for (int j = 0; j < 8; j++) {
                if ((crcTable[i] & 0x1) == 0) {
                    crcTable[i] = (crcTable[i] >> 1) & 0x7FFFFFFF;
                } else {
                    crcTable[i] = 0xEDB88320 ^ ((crcTable[i] >> 1) & 0x7FFFFFFF);
                }
            }
        }       
    }
      :
}

The above part, which initializes crcTable, is not thread safe.

Thumbnail View calls MIF Loader to render the MIF image and MIF Loader calls 
PNG Loader implicitly because a MIF file consists of one or more png images. 
Not only MIF files but also PNG files are failed to render sometimes.
Old Component: wsa.web.pageediting
New Component: wsa.web.oti






NOTES:
Comment 1 DJ Houghton CLA 2001-10-29 16:38:22 EST
PRODUCT VERSION:
	R09, Win2000

Comment 2 Mike Wilson CLA 2001-12-10 14:18:49 EST
CM to fix the bogus code. See SN for details.
Comment 3 Carolyn MacLeod CLA 2001-12-10 17:38:58 EST
Moved the code that initializes the static into a static initializer.
We are unable to test the original problem because we do not have Websphere. 
Asked GdC to test at the next opportunity.
Comment 4 Carolyn MacLeod CLA 2001-12-12 14:02:45 EST
I recieved an email reply from Yamato lab that the fix appears to have 
corrected the problem they were seeing. The fix is available in 20011211.