Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Weird problem in the isA() function under IE

    Hi,

    I'm having a weird problem in the isA() function under IE ...

    I use Smartclient 8 GA and I get an 'Unexpected call to method or property access.' exception on line #95
    of the ISC_Core.js file.

    I slightly un-minified the ISC_Core.js file to better isolate the exact line where the problem occurred
    and have come to the conclusion that the error happens on the following specific line:

    Code:
    if(_1.constructor&&_1.constructor.$k!=null){
    The unobfuscated version of this line would be:

    Code:
    if (object.constructor && object.constructor.__nativeType != null) {
    This was extracted from the overall un-minified following code (to give some context):

    Code:
    ,isc.A.Object=function isc_isA_Object(_1)
    {
    	if(_1==null)return false;
    
    	if(isc.Browser.isIE&&typeof _1==this.$a7)
    		return false;
    
    	if(this.useTypeOf)
    	{
    		var _2=typeof _1;
    		return(_2=="object"||_2=="array"||_2=="date"||(isc.Browser.isMoz&&_2=="function"&&isc.isA.RegularExpression(_1)))
    	}
    
    	if(_1.constructor&&_1.constructor.$k!=null)
    	{
    		var _3=_1.constructor.$k;
    		if(_3==1)
    		{}
    		else
    		{
    			return(_3==8||_3==7||_3==3||_3==2)
    		}
    	}
    
    	if(_1.Class!=null&&_1.Class==this.$73x)return false;
    	if(typeof _1==this.$bl)
    	{
    		if(isc.Browser.isIE&&isc.isA.Function(_1))
    			return false;
    		else return true
    	}
    	else return false
    }
    The stack when the problem occurs is the following:

    Code:
    	isc_isA_Object
    	isc_c_DataSource_isSimpleTypeValue
    	isc_DataSource_xmlSerializeField
    	isc_DataSource_xmlSerializeFields
    	isc_DataSource__xmlSerialize
    	isc_DataSource_xmlSerialize
    	isc_DataSource_xmlSerializeField
    	isc_DataSource_xmlSerializeFields
    	isc_DataSource__xmlSerialize
    	isc_DataSource_xmlSerialize
    	isc_DataSource_getXMLRequestBody
    	isc_DataSource_getServiceInputs
    	isc_DataSource_sendDSRequest
    	isc_c_Class_invokeSuper
    	isc_c_Class_Super
    	JScript anonymous function
    	isc_DataSource_performDSOperation
    	isc_DataSource_updateData
    	JScript anonymous function
    	JScript anonymous function
    	isc_c_Class_invokeSuper
    	isc_c_Class_Super
    	JScript anonymous function
    	isc_c_Class_fireCallback
    	isc_Class_fireCallback
    	isc_c_Class_fireCallback
    	isc_c_Timer__fireTimeout
    	JScript - anonymous function
    The 'this' object when the problem occurs is as the included attached print screen.

    Any idea what's wrong ? How can this be resolved ?

    Thanks,
    Attached Files
    Last edited by yavery; 6 May 2011, 09:45.

    #2
    It looks like some kind of weird native object has crept into the data being passed to updateData(). The stack trace we log in the Developer Console will have more information, including the fieldName where it appears. In your screenshot, there are application-specific Strings like "MEI-15425" - what do these relate to?

    Comment


      #3
      Yes, the 'this' object at the time the error occurs seem to be a listGrid record. At least all the
      properties in the '_1' object lead me believe that, as Code, ContentType, Data.Code,
      Deduction.Deduction, FileName and Size are all record columns for one of my listGrids.

      In the mean time, I'll try to produce an ISC stack as requested.

      Thanks,

      Comment


        #4
        Here's the ISC error I get in the ISC console:

        Code:
        14:39:41.508:TMR3:WARN:Log:Error:
        	'Unexpected call to method or property access.'
        	in http://172.16.1.157:8080/MeiTpm/isomorphic/system/modules/ISC_Core.js?meiTpmVersion=4.0.8.0.9138
        	at line 95
            [c]isA.Object(_1=>[Error in echoLeaf: [object Error]])
            [c]DataSource.isSimpleTypeValue(_1=>[Error in echoLeaf: [object Error]])
            DataSource.xmlSerializeField(_1=>"DeductionAttachment", _2=>[Error in echoLeaf: [object Error]], _3=>Obj, _4=>"        ")
            DataSource.xmlSerializeFields(_1=>Obj, _2=>Obj, _3=>"        ")
            DataSource.$ew(_1=>Obj, _2=>Obj, _3=>"    ", _4=>"DeductionFull", _5=>undef)
            DataSource.xmlSerialize(_1=>Obj, _2=>Obj, _3=>"    ", _4=>"DeductionFull")
            ** recursed on DataSource.xmlSerializeField
        If you want me to reproduce this using extra specific loggers enabled, please let me know.

        Thanks again for your help,

        Comment


          #5
          OK, the question is now what's special about this "DeductionAttachment" object. How is it delivered to the browser, or if it's created programmatically, what is it created from?

          To give an idea of the type of thing that could cause this error - let's say it's created programmatically at some point you do something like:

          Code:
          DeductionAttachment.someFieldName = this.foo;
          Maybe you're in a scope, such as a closure, where "this" isn't what you expect - it's actually the global "window". And "foo" turns out to be a (possibly undocumented) property that exists on "window" in IE, and whatever it's value is, IE doesn't like you checking for .constructor and throws an error.

          Also, what version of IE is this from?

          Comment


            #6
            I think you've put your finger on the problem. The object that was added to the list had been created inside
            the 'pseudo hidden' IFRAME that I use to post uploaded attachments. What I did is I had that object created
            inside the main application frame and the problem has gone away. This was intermittent in the first place,
            so I hope that it is truly gone away.

            Thanks again for your help,

            Comment

            Working...
            X