Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
javanesevn #1
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
Subject: Disconnect from server when send file
Dear all,

I got a strange problem when I send file with this name ?????? ??????.txt (Asian text) . File name is alphabet name, everything ok.

But its not often disconnect from server. Sometime I can sent file successfully.

When error raised, SiIqResult can not process, user is disconnected from server.
SiIqResult come from ->   xmppConnection.IqGrabber.SendIq( streamInitIq, new IqCB( SiIqResult ), null ) ;

Miniclient have the same problem. Thanks.

Best,

Le

      • I can not input asian text on this forum.?I attached file.
The author has attached one file to this post:
AsianFileName.zip 160 Bytes
You have no permission to open this file.
This post was edited on 2008-06-26, 11:38 by javanesevn.
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
can you please post or attach your xml log when you get disconnected.
if you get disconnected only sometimes I don't think its an agxMPP or Xml related problem.

Alex
Avatar
javanesevn #3
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
Dear Alex,

I tested again and Miniclient works fine with Asian text except zero divide when file size is 0 byte.

But my application can not done and have no exception occur. Here is my log:

SEND: <iq id="agsXMPP_20" to="test1@fedoracore9/home" type="set">
    <si xmlns="http://jabber.org/protocol/si" profile="http://jabber.org/protocol/si/profile/file-transfer" id="a973eaad-bbcf-44c0-a6e8-87dc42bf9a00">
        <file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="?????? ??????.txt" size="4">
            <desc>Send File to test2</desc> <range />
        </file>
        <feature xmlns="http://jabber.org/protocol/feature-neg">
            <x xmlns="jabber:x:data" type="form">
            <field type="list-single" var="stream-method">
                <option><value>http://jabber.org/protocol/bytestreams</value></option>
            </field>
            </x>
        </feature>
    </si>
    </iq>

RECV: <presence xmlns="jabber:client" from="test1@fedoracore9/home" to="test2@fedoracore9" type="unavailable" />

Sender is disconnected from server and Receiver get result is "unavailable" presence. Thank you for your help.

Best,
Avatar
Jabberer #4
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
we never tested MiniClient with 0K files.
And it makes no sense to send a 0K file over XMPP filetransfer. This edge case is not documented in the protocol.
Software Developer
AG-Software
Avatar
javanesevn #5
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
Dear Jabberer,

This bug raised when I set Asian value into property agsXMPP.protocol.extensions.filetransfer.File.Description
Its ok when I set value via direct in code, but error when I set value via string.Format() function.
Ex: File.Description = string.Format("File Description {0}", "Asian text with blank space set in here"); 

Best,
Avatar
Alex #6
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
can you please post the byte representation of the filename?
Are there any characters which are not allowed in XML?

And you still owe me a complete XML log where I can see the error message from your server.

Alex
Avatar
javanesevn #7
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
Dear Alex,

Thank you for your reply.
Quote by Alex:
can you please post the byte representation of the filename?
Client application run on WinXP Chinese and Japanese version, so I think filename based on Unicode.
Quote by Alex:
Are there any characters which are not allowed in XML?
If have, encoding will : UTF-8, EUC-JP, GB2312, SJIS

Quote by Alex:
And you still owe me a complete XML log where I can see the error message from your server.
Server throw this exception:

2008.07.02 14:01:58 Closing session due to exception: (SOCKET, R: /10.10.1.2:33017, L: /192.168.1.2:5222, S: 0.0.0.0/0.0.0.0:5222)
org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.ArrayIndexOutOfBoundsException (Hexdump: empty)
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:165)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
        at org.apache.mina.filter.CompressionFilter.messageReceived(CompressionFilter.java:161)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
        at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:239)
        at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:283)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.ArrayIndexOutOfBoundsException

Maybe this is bug from server. I try Openfire XMPP.

Best regards,
Avatar
javanesevn #8
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
That is bug of compression feature of openfire server. I try with tigase server and it works.

Best
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS