Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
d_mueck #1
Member since Apr 2006 · 6 posts · Location: Germany
Group memberships: Members
Show profile · Link to this post
Subject: agsXMPP Version 0.7.6.0 issue
Intermittently I get following error with agsXMPP version 0.7.6.
Running same code with version 0.7.1 works out fine.
I've installed both version in gac on my machine. I'm using mac osx 10.4, mono 1.1.14 (.net 1.0)
Any hints are appreciated.


    • (bin/Debug/BookingsNL.exe:865): WARNING **: The class agsXMPP.Xml.Dom.ElementList could not be loaded, used in agsXMPP, Version=0.7.6.0, Culture=neutral, PublicKeyToken=ff839b81f1debe86

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Stacktrace:

in gabba.session.SupplierSessionManager:OnGMessage (object,agsXMPP.protocol.client.Message) <0xffffffff>
in gabba.session.SupplierSessionManager:OnGMessage (object,agsXMPP.protocol.client.Message) <0x75c>
in gabba.session.SupplierSessionManager:OnGMessage (object,agsXMPP.protocol.client.Message) <0x758>
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_Message (object,agsXMPP.protocol.client.Message) <0x8c>
in agsXMPP.XmppClientConnection:StreamParserOnStreamElement (object,agsXMPP.Xml.Dom.Node) <0x1b4>
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_Node (object,agsXMPP.Xml.Dom.Node) <0x8c>
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_Node (object,agsXMPP.Xml.Dom.Node) <0x5c>
in agsXMPP.StreamParser:EndTag (byte[],int,agsXMPP.Xml.xpnet.ContentToken,agsXMPP.Xml.xpnet.TOK) <0x284>
in agsXMPP.StreamParser:Push (byte[],int,int) <0x220>
in agsXMPP.XmppConnection:SocketOnReceive (object,byte[],int) <0xa4>
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_byte[]_int (object,byte[],int) <0x9c>
in agsXMPP.net.BaseSocket:FireOnReceive (byte[],int) <0x54>
in agsXMPP.net.ClientSocket:EndReceive (System.IAsyncResult) <0xb4>
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_IAsyncResult (System.IAsyncResult) <0x7c>in SocketAsyncResult:Complete () <0x268>
in Worker:Receive () <0x20>
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void () <0x6c>
in (wrapper runtime-invoke) System.Object:runtime_invoke_void (object,intptr,intptr,intptr) <0x60>
Abort trap
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

we have no MAC machine, so we had no chance to run the code on MAC OS yet. But i really like the new Mac Mini with Intel Dual Core. So i think i should order one soon ;-)

Could you give me more info about the exception? When does it occur? I don't understand what the Warning in the 1st line.
For me the stacktrace looks like you get the exception when receiving a message. I that correct?

Alex
Alexander Gnauck
AG-Software
Avatar
d_mueck #3
Member since Apr 2006 · 6 posts · Location: Germany
Group memberships: Members
Show profile · Link to this post
I've registered my own OnMessage handler and run in a loop following code (stripped down):
                  
  foreach(Node node in msg.ChildNodes) {
            logger.Trace(node.ToString());
                       
             Element e = node as Element;
             if (e == null)
                           continue;
 
         Feature e =  new Feature(e);  // mono is crashing here
  }

 public class Feature {
    public Feature(Element e) {
            logger.Trace(e.ToString());
        ......           
    }
 }


Before reaching logger.Trace inside constructor Feature mono run-time environment crashes.
Avatar
Jabberer #4
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
could you post or attach the full code of your feature class? Or at least the code of the constructor, because its crashing there.
Software Developer
AG-Software
This post was edited on 2006-04-19, 14:28 by Jabberer.
Avatar
d_mueck #5
Member since Apr 2006 · 6 posts · Location: Germany
Group memberships: Members
Show profile · Link to this post
using System;
using System.Collections;
using System.Xml;

using agsXMPP;
using agsXMPP.Xml;
using agsXMPP.Xml.Dom;

using NLog;

/*
sample structure passed on to Feature constructor

<set xmlns="gabba:feature" type="fixed" var="affiliate">
  <value>12345</value>
</set>
*/

public class Feature {
        static Logger logger = LogManager.GetLogger("Feature");
       
        public  string [ ] feature;

        private string type;
        private string ns;
        private string tag;
       
        public Feature(Element e) {
            logger.Trace(e.ToString());
           
            ns = e.Namespace;
            tag = e.TagName;
           
           
            feature = new String[10];
            Var = e.GetAttribute("var");

            int i = 0;
            foreach(Element val in e.SelectElements("value")) {
                feature[i++]=val.Value;
            }
        }
       
        private string var;
        public string Var{
            get{
                return var;
            }
            set{
                var = value;
            }
        }
}
Avatar
Jabberer #6
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
the code looks ok to me if you don't receive more then 10 values because you use a fix sized array. A arraylist would be perhaps better here.
And your logger should be thread safe because the events are raised from async sockets. But this is nothing that has changed in version 0.7.6.0. Can you try to narrow it down with some additional debug output in your constructor?
Software Developer
AG-Software
Avatar
d_mueck #7
Member since Apr 2006 · 6 posts · Location: Germany
Group memberships: Members
Show profile · Link to this post
Finally I've found the bug. Old version of agsxmpp.dll has been linked mistakenly against my application at run-time. 
Erratic behaviour is disappeared after removing old agsxmpp.dll from project bin directory.
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 SDK Support RSS