Page 1 of 1

ftp doesnt work.....

Posted: Sun Dec 19, 2004 9:49 pm
by sting3r
ok I have tried the ftp in the yawcam to my website....keep getting the ftp out of index string error.....when I ftp to my local machine it isnt a problem......I can use any other ftp client using the same settings to my website and it works just not yawcam. I have tried not using a password...creating another directory on my site....nothing seems to work....please help


-sting3r-

Posted: Mon Dec 20, 2004 8:54 pm
by malun
Where do you get the error message? Is it in the console, or is it as an message dialog?
Where do you have your ftp-area? Do you know what ftp server software they are running?

/malun

ftp has bugs

Posted: Tue Dec 21, 2004 8:21 am
by sting3r
yeah I am shooting it up to my /public_html dir.....where I am shooting other images to.....not sure what software they use im sure its unix based. I am getting this error in the console......I tried W32 software and it also ftp's images up and it works fine...has to be a bug in the software. Here is proof that other programs are capable www.sting3r.com/cam.html

Posted: Fri Dec 24, 2004 11:39 am
by malun
Sorry for the delayed answer.
I don't doubt that there is a bug in the ftp upload in Yawcam. It certainly can be so.
Right now I'm writing a special version with some extra debug printing that perhaps can help me figure out where something goes wrong.
I would be very glad if you could help me running this version when it is finished.

/malun

Posted: Fri Dec 24, 2004 4:14 pm
by malun
Ok, here is a updated version with debug print.
http://www.tmp.yawcam.com/yawcam_ftp_update.zip

Download the file, and unzip into your yawcam directory.
Overwrite all files.

Start yawcam with the file yaw_debug.bat located in your yawcam directory.
You will then get a command window with debug printing when yawcam is running.

Please run yawcam until you get the "string error" then look at the debug print. Look for the word "position:" and let me know the number behind ;-)

It would also be great if you could tell me what the exception below the word postition says.

Thanks in advance!
/malun

Posted: Fri Dec 24, 2004 6:35 pm
by sting3r
position 2......

hope that helps

Posted: Fri Dec 24, 2004 6:41 pm
by sting3r
Position 2
java.lang.StringIndexOutOfBoundsException: String index out of range: 4
at java.lang.String.substring(Unknown Source)
at yawcam.Linlyn.responseHandler(Linlyn.java:403)
at yawcam.Linlyn.ftpConnect(Linlyn.java:252)
at yawcam.FtpOutputThread.run(FtpOutputThread.java:144)

Posted: Fri Dec 24, 2004 6:46 pm
by sting3r
looks like a java issue....im not sure what version you have included in the install....I know windows xp doesnt have java included and you have to install it for any java app......it just might be a version issue with java

Posted: Sat Dec 25, 2004 3:09 pm
by malun
Thanks for your help!
Now I at least have got a starting point.
I don't think it's an java issue. The java included in the installation is java version 1.5 . I think it's an issue with the ftp package Yawcam uses. (It's called Linlyn)
I'll see if I can figure out what's wrong...

/malun

Posted: Sun Dec 26, 2004 1:18 am
by malun
Ok, I've found something in the Linlyn package that I belive caused the error.
This issue can happen if the answer message from the ftp server is on multiple lines. Otherwise it should work.
I have made a small modification that perhaps will fix this issue. Please give it a try:
http://www.tmp.yawcam.com/yawcam_ftp_fix_attempt1.zip

Download the file, and unzip into your yawcam directory.
Overwrite all files.

/malun

good work

Posted: Sun Dec 26, 2004 5:50 pm
by sting3r
good work my friend....works like a charm.....I was breaking down the code when I saw the reply....what line was the problem in? If you ever need graphics for your site let me know!

sting3r

Posted: Sun Dec 26, 2004 6:37 pm
by malun
Ahh.. nice to hear! :D

The error was located in the responseHandler()
the code:

Code: Select all

if(next.substring(0,4).equals(tester))
       done = true;
did not take in consideration that the string "next" could be shorter then 4 charachters.
So, I just added a small if-statement, like this:

Code: Select all

if(next.length() >= 4){  //malun fix
       //If next starts with "tester", we're done
       if (next.substring(0, 4).equals(tester))
              done = true;
}
I will notify the author of the Linlyn package soon...

Thanks for the graphics offer! I know the graphics right now is a bit plain and not to appealing, but I think that's a bit charming too ;-)
I'll keep your offer in mind!

Once again, Thanks for helping me out locating this error!
/malun