Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JVM apparently hanging




Thanks for your suggestions Gary... I already did exactly what you suggested, saving the byte array to a file, and it unzipped just fine.

I can see if kill -QUIT does any good.  I tried using the sampler in the Activity Monitor, but it didn't give me any better information.  I'm going to see if a Java Debugger will work with this JVM and if it will tell me anything more.

Any and all other suggestions/help/inspiration are still welcome (from anyone!!

Thanks!

-Eric


Greg Guerin <email@hidden>
Sent by: java-dev-bounces+eric_feigenson=email@hidden

05/01/2006 05:27 PM

To
email@hidden
cc
Subject
Re: JVM apparently hanging





Eric Feigenson wrote:

>I have some java code that looks like this
> System.out.println("Creating new ZipInputStream, bytes.Length() = " +
>bytes.length);
>// create a ZipInputStream to read the zip/jar file
>ByteArrayInputStream bytestream = new ByteArrayInputStream(bytes);
>
>System.out.println("Created ByteArrayInputStream");
>Exception except = new Exception("Stack trace before new ZipInputStream");
>
>except.printStackTrace();
>ZipInputStream zis = new ZipInputStream (bytestream);
>System.out.println("Created ZipInputStream");
>
>This is just a fragment from some larger code.  It all seems to execute
>just fine; all the println's execute and the printStackTrace prints
>everything out ok.
>But the call to the ZipInputStream constructor never returns.  No
>exception, no nothing.

I suggest verifying that the data in the byte-array is valid zip data.
Easiest way I can think of is to write the array to a new temp-file, then
use the 'jar tvf yourTemp.jar' command to see what it says.  Or use 'file
yourTemp.jar' to see if the file command thinks it's a zip/jar file.

If you want to try finding out where it's hanging, try a 'kill -QUIT pid'
on the hung process to get a full thread-dump.  May or may not work,
depending on how the JVM was created.

 -- GG


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: JVM apparently hanging (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.