Need some response to Memory Applet

after many, many problems im now able to give my applet free for testing.
it isnt finished yet (highscore, winning sequence etc) and im expecting some bugs. very important to me is to know if it runs on several browsers. ive tested it with netscape, mozilla firebird and ie. but apple seemed to load till the apocalypse.

[link]http://zeus.fh-brandenburg.de/~huellein/memory/Memory.htm[/link]

dont expect a firework, i know memory isnt the most exciting game on earth, but its a project for a local police station and a game for kids.

No problem with winXP Mozilla 1.6 Jre 1.4.2_03


java.util.zip.ZipException: invalid stored block lengths

      at java.util.zip.InflaterInputStream.read(Unknown Source)

      at java.io.BufferedInputStream.fill(Unknown Source)

      at java.io.BufferedInputStream.read1(Unknown Source)

      at java.io.BufferedInputStream.read(Unknown Source)

      at java.io.DataInputStream.readFully(Unknown Source)

      at com.sun.imageio.plugins.png.PNGImageReader.decodePass(Unknown Source)

      at com.sun.imageio.plugins.png.PNGImageReader.decodeImage(Unknown Source)

      at com.sun.imageio.plugins.png.PNGImageReader.readImage(Unknown Source)

      at com.sun.imageio.plugins.png.PNGImageReader.read(Unknown Source)

      at javax.imageio.ImageIO.read(Unknown Source)

      at javax.imageio.ImageIO.read(Unknown Source)

      at ImageLoader.<init>(ImageLoader.java:69)

      at Memory.init(Memory.java:45)

      at sun.applet.AppletPanel.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

An image file could not be read: 
javax.imageio.IIOException: Error reading PNG image data

java.lang.IndexOutOfBoundsException: Index: 39, Size: 37

      at java.util.ArrayList.RangeCheck(Unknown Source)

      at java.util.ArrayList.get(Unknown Source)

      at ImageLoader.getStrip(ImageLoader.java:217)

      at HighScoreMenu.<init>(HighScoreMenu.java:20)

      at Memory.init(Memory.java:46)

      at sun.applet.AppletPanel.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

WinXP, Internet Explorer, JRE 1.4.2_03

jepp, thats the error that gave me a headache yesterday. it seems that some editions of the 1.4 series have problems with png support. i had no further problems using 1.5

ava.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.get(ArrayList.java:326)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImageReader.java:329)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReader.java:420)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:536)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:869)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:853)
at javax.imageio.ImageIO.read(ImageIO.java:1384)
at javax.imageio.ImageIO.read(ImageIO.java:1348)
at ImageLoader.(ImageLoader.java:61)
at Memory.init(Memory.java:45)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)

Linux Mandrake 9.2, Xfree 3.3, JDK 1.4.2

As I mentioned in the other thread, it’s only a couple of extra lines of code to make it work on all 1.4 versions. And wouldnt it be nice if it could run on the latest non beta runtime :wink:

[quote]jepp, thats the error that gave me a headache yesterday. it seems that some editions of the 1.4 series have problems with png support. i had no further problems using 1.5
[/quote]
Sadly 1.5 is not available at the moment, so perhaps you should try to make your system work with 1.4. A beta 1.5 is available, and sun beta’s are so bad (note: nothing wrong with this! Sun themselves make it clear that no-one should use them as production systems) that no-one in their right mind uses them EXCEPT those who want to help Sun with debugging and/or are desperate to try out new features before the major release usually for the SOLE purpose of having a 1.5-ready version of their software ready for release earlier than they would otherwise (e.g. a version which uses new features, or a version which has already been compatability tested with the new JVM).

So. When releasing software, it’s the gold JVM’s that really matter. 1.5-beta is not an upgrade for 1.4.2, but 1.5 gold will be.

I haven’t had a single significant problem with 1.5 beta 1.

@swpalmer:

This depends on what you’re doing with it and of course which OS you use …

  • In Linux there is a nice bug that let it fail to load the native motif library (already known and fixed in beta2)

  • In WinXP I had recently a wonderful NotYetImplementedException or such … nice! :slight_smile:

and yes i’m bug-reporting.

before going completely of topic something different: Doing a Java 1.4 compatible build is very difficult these times as soon you got used to generics and all that nice stuff (foreach, autoboxing). Ever tried to invoke the compiler with that: javac -source 1.5 -target 1.4
:frowning:

Btw I can’t live without System.nanoTime() :smiley:

java.util.zip.ZipException: invalid stored block lengths

???

That’s the error we solved yesterday. The images need to be inside the jar otherwise you need to create a proper url.

[quote]The images need to be inside the jar
[/quote]
Can still cause a bug in ImageIO:
http://developer.java.sun.com/developer/bugParade/bugs/4764639.html

Nokromants bug seems to be similar.

after days of horror and bug hunting, i have thrown the image.io methods over board… now the applet should run fine and !! tada !! its made for 1.4.2 …

[link]http://zeus.fh-brandenburg.de/~huellein/memory/Memory.htm[/link]

please note that it isnt final yet, but i need to know if it runs on serveral machines and browsers …

Worked well and looks nice…
Windows 2k
Mozilla Firefox
1.5.0 plug-in

Works well under 1.4.2 / Windows XP. Looks good!

One minor suggestion regarding ‘game play’: The extra fun in computer memory (as opposed to conventional, ‘bricks-and-mortar’ memory) is the potentially fast pace. Therefore, I would make the animation of tile turning optional.

Also, when two non-matching tiles are visible, the next mouse click should hide them and in the same turn display the next clicked-on tile.