Uncaught TypeError: Cannot read property 'aoData' of null on line 472 of localhost:23348/js/

Uncaught TypeError: Cannot read property 'aoData' of null on line 472 of localhost:23348/js/

dr3xdr3x Posts: 12Questions: 1Answers: 0
edited January 2014 in General
This is an intermittent error due to the following function being called with a null first parameter. My quick fix is to return if the first param is invalid.

@version 1.9.4

[code]
function _fnAddData ( oSettings, aDataSupplied ) {}
[/code]

Since it is intermittent, it may be a timing issue. I've put in a stack trace to fire next time this happens.

Also getting a similar error further down in the code (line # will be a few off due to debugging code)

[Uncaught TypeError: Cannot read property 'aiDisplayMaster' of null on line 5207 of http://localhost:23348/js/lib/jquery.dataTables.js]

[code]
this.fnAddData = function( mData, bRedraw ) {}
...
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
[/code]

Replies

  • dr3xdr3x Posts: 12Questions: 1Answers: 0
    Looks like the dataTable wasn't being initialized by my code before the fnAddData() call was being applied; so the fnAddData() must have been implicitly initializing the dataTable which is why I got the unexpected results. Tipoff was that the initialization settings weren't getting picked up.
This discussion has been closed.