Hi

I've got a problem that's outside my experience and need advice.

I've got a MIDlet which logs data to a server over HTTP and parses what 
comes back. The method concerned is:

        /**
         * attempt to parse zones from the input stream
         *
         * @param in the input stream, presumed to be generated by
         *                
uk.co.weft.fisherman.fieldkithandler.HandleInspectorBadge
         *
         * @see uk.co.weft.fisherman.fieldkithandler.HandleInspectorBadge
         */
        public void parseResult( InputStream in )
        {
                StringBuffer buffy = new StringBuffer(  );
                boolean done = false;

                while ( !done )
                {
                        int c = -1;

                        try
                        {
                                c = in.read(  );
                        }
                        catch ( IOException e1 )
                        {
                                /* ignore. c will pass through as -1, which 
will set done
                                 * to true and tidy up the last line read if 
possible */
                        }

                        switch ( c )
                        {
                                case -1:
                                case 0:
                                        done = true;
                                /* note: deliberately no break */
                                case '\n':

                                        try
                                        {
                                                if ( buffy.toString(  ).trim(  
).length(  ) > 0 )
                                                {
                                                        new Zone( 
buffy.toString(  ) );
                                                }
                                        }
                                        catch ( Exception e )
                                        {
                                                fieldkit.showMessage( 
AbstractFieldKit.MESSAGETYPEERROR,
                                                        e.getClass(  ).getName( 
 ) +
                                                        " while reading zone" );
                                        }

                                        buffy = new StringBuffer(  );

                                        break;

                                default:
                                        buffy.append( (char) c );

                                        break;
                        }
                }
        }

The while loop procedes normally until the end of the first line of 
input. However, when it gets to the line

                                                        new Zone( 
buffy.toString(  ) );

the emulator goes down hard with the following error message logged to 
the Eclipse console:

Running with storage root DefaultColorPhone
Method............: 
b7914df8 'uk/co/weft/fisherman/fieldkit/InspectorQueueable.parseResult 
(virtual)' 
ALERT: java/lang/ClassFormatError: Bad stack map.
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4ce4
Current IP........: b7914c57 = b7914c08 + offset 79
Previous Frame....: b78a4cb4
Previous IP.......: b791670a (offset 94)
Frame size........: 6 (2 arguments, 4 local variables)
Argument[0].......: b78a7a68
Argument[1].......: b78a7cf4
Local[2]..........: b78a9a98
Local[3]..........: 0
Local[4]..........: a
Local[5]..........: b78a4b70

Method............: 
b79167e4 
'uk/co/weft/fisherman/fieldkit/AbstractFieldKit$PersistentQueue.sendQueueable 
(virtual)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4cb4
Current IP........: b791670a = b79166ac + offset 94
Previous Frame....: b78a4c80
Previous IP.......: b7916763 (offset 19)
Frame size........: 7 (2 arguments, 5 local variables)
Argument[0].......: b78a6bd8
Argument[1].......: b78a7a68
Local[2]..........: 0
Local[3]..........: b78a8188
Local[4]..........: b78a7cf4
Local[5]..........: b78a79c0
Local[6]..........: c8

Method............: 
b79167c4 'uk/co/weft/fisherman/fieldkit/AbstractFieldKit$PersistentQueue.run 
(virtual)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4c80
Current IP........: b7916763 = b7916750 + offset 19
Previous Frame....: b78a4c60
Previous IP.......: b791679c (offset 24)
Frame size........: 2 (1 arguments, 1 local variables)
Argument[0].......: b78a6bd8
Local[1]..........: b78a7a68

Method............: 
b79167a4 'uk/co/weft/fisherman/fieldkit/AbstractFieldKit$PersistentQueue.<init> 
(virtual)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4c60
Current IP........: b791679c = b7916784 + offset 24
Previous Frame....: b78a4c30
Previous IP.......: b7918f9c (offset 12)
Frame size........: 4 (4 arguments, 0 local variables)
Argument[0].......: b78a6bd8
Argument[1].......: b78a740c
Argument[2].......: b78a740c
Argument[3].......: b7919ef8

Method............: 
b7918fec 'uk/co/weft/fisherman/fieldkit/AbstractFieldKit.start 
(virtual)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4c30
Current IP........: b7918f9c = b7918f90 + offset 12
Previous Frame....: b78a4c14
Previous IP.......: b7917578 (offset 4)
Frame size........: 1 (1 arguments, 0 local variables)
Argument[0].......: b78a740c
Operand[1]........: b78a740c
Operand[2]........: b78a6bd8

Method............: 
b7917cf4 
'uk/co/weft/fisherman/fieldkit/midlet/FieldKitMidlet2$AbstractFieldKitWrapper.start
 
(virtual)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4c14
Current IP........: b7917578 = b7917574 + offset 4
Previous Frame....: b78a4bf8
Previous IP.......: b791a64b (offset 19)
Frame size........: 1 (1 arguments, 0 local variables)
Argument[0].......: b78a740c

Method............: 
b791a964 'uk/co/weft/fisherman/fieldkit/midlet/FieldKitMidlet2.startApp 
(virtual)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4bf8
Current IP........: b791a64b = b791a638 + offset 19
Previous Frame....: b78a4bdc
Previous IP.......: b7da3596 (offset 7)
Frame size........: 1 (1 arguments, 0 local variables)
Argument[0].......: b78a6860

Method............: 
b7d276b4 'javax/microedition/midlet/MIDletProxy.startApp (virtual)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4bdc
Current IP........: b7da3596 = b7da358f + offset 7
Previous Frame....: b78a4bc0
Previous IP.......: b7d83f5e (offset 270)
Frame size........: 1 (1 arguments, 0 local variables)
Argument[0].......: b78a682c

Method............: b7d122d0 'com/sun/midp/midlet/Scheduler.schedule 
(virtual)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4bc0
Current IP........: b7d83f5e = b7d83e50 + offset 270
Previous Frame....: b78a4b8c
Previous IP.......: b7d8ea45 (offset 28)
Frame size........: 7 (2 arguments, 5 local variables)
Argument[0].......: b78a4568
Argument[1].......: b78a3cac
Local[2]..........: b78a682c
Local[3]..........: 2
Local[4]..........: b78a455c
Local[5]..........: b791b15c
Local[6]..........: b7d121f0

Method............: b7d19fc4 'com/sun/midp/main/Main.runLocalClass 
(static)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4b8c
Current IP........: b7d8ea45 = b7d8ea29 + offset 28
Previous Frame....: b78a4b68
Previous IP.......: b7d8e4bc (offset 116)
Frame size........: 3 (1 arguments, 2 local variables)
Argument[0].......: b78a4a10
Local[1]..........: b78a3cac
Local[2]..........: b791b124

Method............: b7d19f24 'com/sun/midp/main/Main.main (static)' 
Stack Chunk.......: b78a4b54
Frame Pointer.....: b78a4b68
Current IP........: b7d8e4bc = b7d8e448 + offset 116
Previous Frame....: 0
Previous IP.......: 1
Frame size........: 3 (1 arguments, 2 local variables)
Argument[0].......: b78a4e40
Local[1]..........: b78a4a10
Local[2]..........: b78a4378

VM status:
Instruction pointer.: b7914c57 (offset within invoking method: 79)
Next instruction....: 0xbb
Frame pointer.......: b78a4ce4
Local pointer.......: b78a4ccc
Stack size..........: 128; sp: b78a4cf8; ranges: b78a4b5c-b78a4d5c;
Contents of the current stack frame:
    b78a4ccc: b78a7a68 (lp)
    b78a4cd0: b78a7cf4
    b78a4cd4: b78a9a98
    b78a4cd8: 0
    b78a4cdc: a
    b78a4ce0: b78a4b70
    b78a4ce4: b78a4cb4 (fp)
    b78a4ce8: b791670a
    b78a4cec: b78a4cc8
    b78a4cf0: b7914df8
    b78a4cf4: b78a4b54
    b78a4cf8: 0 (end of frame) (sp)
Execution stack contains 416 items: 
b78a4e40  
b78a4a10  
b78a4378  
0  
1  
b791b114  
b7d19f24  
b78a4b54  
0  
b78a4a10  
b78a3cac  
b791b124  
b78a4b68  
b7d8e4bc  
b78a4b7c  
b7d19fc4  
b78a4b54  
0  
b78a4568  
b78a3cac  
b78a682c  
2  
b78a455c  
b791b15c  
b7d121f0  
b78a4b8c  
b7d8ea45  
b78a4ba0  
b7d122d0  
b78a4b54  
0  
b78a682c  
b78a4bc0  
b7d83f5e  
b78a4bd4  
b7d276b4  
b78a4b54  
0  
b78a6860  
b78a4bdc  
b7da3596  
b78a4bf0  
b791a964  
b78a4b54  
0  
b78a740c  
b78a4bf8  
b791a64b  
b78a4c0c  
b7917cf4  
b78a4b54  
0  
b78a740c  
b78a4c14  
b7917578  
b78a4c28  
b7918fec  
b78a4b54  
0  
b78a740c  
b78a6bd8  
b78a6bd8  
b78a740c  
b78a740c  
b7919ef8  
b78a4c30  
b7918f9c  
b78a4c4c  
b79167a4  
b78a4b54  
0  
b78a6bd8  
b78a7a68  
b78a4c60  
b791679c  
b78a4c74  
b79167c4  
b78a4b54  
0  
b78a6bd8  
b78a7a68  
0  
b78a8188  
b78a7cf4  
b78a79c0  
c8  
b78a4c80  
b7916763  
b78a4c94  
b79167e4  
b78a4b54  
0  
b78a7a68  
b78a7cf4  
b78a9a98  
0  
a  
b78a4b70  
b78a4cb4  
b791670a  
b78a4cc8  
b7914df8  
b78a4b54  
0  

Execution completed.
9738732 bytecodes executed
232 thread switches
762 classes in the system (including system classes)
37580 dynamic objects allocated (1966916 bytes)
21 garbage collections (1932636 bytes collected)
Execution completed.
9738732 bytecodes executed
232 thread switches
762 classes in the system (including system classes)
37580 dynamic objects allocated (1966916 bytes)
21 garbage collections (1932636 bytes collected)


It goes down identically hard whether I use Sun Java 1.4.2 or IBM Java 
1.5 To run Eclipse.

The only thing I've found about this on the web is this post on the sun 
Java forum where the guy is also developing on Linux using EclipseME 
1.5.5:

http://forum.java.sun.com/thread.jspa?threadID=761056&messageID=4345708

and this thread where the guy says he's using Eclipse but does not say 
what version of Eclipse ME he's using (although I assume he is because 
he talks about preverifying his MIDlet in Eclipse).

Is this an Eclipse ME problem and if so is there a workaround?

Cheers

Simon

-- 
Simon Brooke    ::      [EMAIL PROTECTED]       ::      http://www.weft.co.uk/

        Simon Brooke trading as The Web Engineering Factory and Toolworks.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Eclipseme-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/eclipseme-users

Reply via email to