Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

I think I'm having some problems with Java, please help? ^_^

Thread view: 
selina.andor@gmail.com - 23 Mar 2006 01:53 GMT
Hi!

I'm not a java developer or a talented computer person, so I apologize
in advance if I make an idiot out of myself. ^_^; I tend to do it a
lot, afterall. I found a Japanese chatroom that I would really enjoy
talking in (a paint chat, in specific) that runs off of Java. However,
while the applet will load, it will stay loaded for about a minute and
then the page will refresh and I'll be back to the sign in page.

In my Java console, it says:
java.lang.NullPointerException
    at paintchat_client.Data.run_out(Data.java)
    at paintchat_client.Data.run(Data.java)
    at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
    at paintchat.MgLine.getData(MgLine.java)
    at paintchat_client.Data.m_odirect(Data.java)
    at paintchat_client.Data.m_exit(Data.java)
    at paintchat_client.Data.run_out(Data.java)
    at paintchat_client.Data.run(Data.java)
    at java.lang.Thread.run(Unknown Source)
java.lang.InterruptedException: sleep interrupted
    at java.lang.Thread.sleep(Native Method)
    at paintchat_client.Data.run_read(Data.java)
    at paintchat_client.Data.run(Data.java)
    at java.lang.Thread.run(Unknown Source)

That always pops up right as it refreshes. The website in question is:
http://220.210.147.184/ (The java applet I'm talking about is initiated
by clicking either "Paint Chat" buttons).

Thank you for reading over this and I appreciate greatly any help that
anyone has to offer!
Roedy Green - 23 Mar 2006 02:20 GMT
>Thank you for reading over this and I appreciate greatly any help that
>anyone has to offer!

THis is a problem for the author of the program, not you to solve.
However, you can help by at least ensuring you have the latest Java
installed. See http://mindprod.com/jgloss/installingjava.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Seri - 23 Mar 2006 02:28 GMT
Thanks for the reply. I do have the latest Java. The only thing that
led me to believe that it was maybe a mishap on my side was because the
chatroom has 10 or so people in it, but they're all Japanese. Maybe
it's just a problem with the languages clashing ^_^;
Chris Uppal - 23 Mar 2006 13:37 GMT
> Thanks for the reply. I do have the latest Java. The only thing that
> led me to believe that it was maybe a mishap on my side was because the
> chatroom has 10 or so people in it, but they're all Japanese. Maybe
> it's just a problem with the languages clashing ^_^;

I don't suppose this will help much, but it appears that the chatroom is using
rather an old version of the "PaintChat" applet (2.51) when other sites using
it seem to be up to 3.35b.

Unfortunately, I haven't been able to find where PaintChat comes from -- or
maybe I did find it, but didn't realise it was the website I was looking for
because I can't read Japanese...

I did find a suggestion (in the FAQ section of another website that uses
PaintChat) that it can disconnect spontaneously if your machine is heavily
loaded, or if there is a lot of other network activity at the same time.

   -- chris
Oliver Wong - 24 Mar 2006 19:16 GMT
> Unfortunately, I haven't been able to find where PaintChat comes from --  
> or
> maybe I did find it, but didn't realise it was the website I was looking
> for
> because I can't read Japanese...

   It looks like there's more than one software called "PaintChat". The one
that the OP is interested in seems to have its homepage at
http://shichan.jp/ I was unable to find the source code for the client, so I
tried decompiling the source with JAD.

   The code structure for the relevant method is:

<pseudocode>
private void run_out() {
 try {
   if (stm_out != null) {
     //do some stuff.
     l3 = System.currentTimeMillis();
   }
 } catch (Exception e) {/*Swallow exception*/}
 try {
   if (stm_write != null) {
     //do some stuff.
     l2 = System.currentTimeMillis();
   }
 } catch (Exception e) {/*Swallow exception*/}
 long l1 = System.currentTimeMillis();
 if(l1 - l3 >= 45000L) {
   stm_out.write(abyte0);
   stm_out.flush();
 }
 if(l1 - l2 >= 45000L) {
   stm_write.write(abyte1);
   stm_write.flush();
 }
}
</pseudocode>

   In other words, it looks the author checked against null in the earlier
parts of the code, but then neglected to do so in later parts, hence the
NullPointerException.

   The later parts of the code seem to only trigger when a time-out
condition occurs (i.e. 45 seconds have elapsed).

   Combined with the OP's description of "It'll stay loaded for about a
minute", I'm pretty confident this is the culprit.

   As Chris has mentioned, the site that the OP linked to uses version 2.51
of the app, and 3.35b is available. I decompiled 3.35b just for kicks, and
it looks like in that version they've removed the "run_out()" method
completely.

   The the OP, if you can convince the web administrator at
http://220.210.147.184/ to upgrade to 3.35b, that might fix your problems.
Otherwise, what you could *try* to do is download the 3.35b stand-alone
client, and use that to connect to the server at http://220.210.147.184/,
but that might not work: It's possible version 2.51 and 3.35b use a
completly different set of protocols.

   - Oliver
Seri - 24 Mar 2006 21:18 GMT
I appreciate all the thought you put into your post and going to the
trouble of looking at the code for me! That answers my question
completely. ^_^ I'll try downloading the standalone progam, and if it
doesn't work, I'll just keep searching for a new paint chat that uses
the newer client.
hiwa - 23 Mar 2006 02:22 GMT
selina.andor@gmail.com :

> Hi!
>
[quoted text clipped - 29 lines]
> Thank you for reading over this and I appreciate greatly any help that
> anyone has to offer!
It's just a broken software, isn't it?
Tom Leylan - 23 Mar 2006 03:52 GMT
Interesting spot I took a look  It loads and runs fine for me.

You might try a complete uninstall of Java and then a reinstall if you
didn't do it that way.

> Hi!
>
[quoted text clipped - 29 lines]
> Thank you for reading over this and I appreciate greatly any help that
> anyone has to offer!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.