Skip to main content
Inspiring
December 4, 2008
Answered

The error occurred on line -1

  • December 4, 2008
  • 2 replies
  • 1145 views
We are getting an intermittent error that seems to have no rhyme or reason and we have been unable to replicate it. It occurs on different templates, it happens with different users and isn't restricted to our busy periods.

The error message reads:
Index: 6, Size: 6 null
The error occurred on line -1.

The index and size number given has ranged between 1 and 19 and is always the same for both index and size. The line number given is always -1.

We have checked the cfcs in application scope for thread safety and we have session variables written using cflock in session scoped (we are not using named locks), but we are still getting a handful of these errors each day (from 1000s of page reads). We are running out of ideas. Does anyone have any suggestions as to why we might be encountering these errors?

FYI - We are running Coldfusion 8 Multiserver with a cluster of two coldfusion instances using sticky sessions.

Cheers,
Mark

    This topic has been closed for replies.
    Correct answer mark_la
    It seems this error was caused by a small query containing related users that was loaded into session at login. The session was locked when being written using session scope <cflock scope="session" ...>.

    We changed this to locking with a unique name instead <cflock name="session#obj.getUUID()#" ...>. and when outputting this variable we referred explicitly to this named lock and we haven't had the error occurring again (5 days and counting).

    2 replies

    tclaremont
    Inspiring
    December 4, 2008
    If you are using an application.cfm or OnRequestEnd template, the error MIGHT be occuring on one of those pages, and the line number might be out of the ordinary for that reason.
    mark_laAuthor
    Inspiring
    December 5, 2008
    We still use an application.cfm and I had a look and couldn't identify any errors.

    mark_laAuthorCorrect answer
    Inspiring
    December 9, 2008
    It seems this error was caused by a small query containing related users that was loaded into session at login. The session was locked when being written using session scope <cflock scope="session" ...>.

    We changed this to locking with a unique name instead <cflock name="session#obj.getUUID()#" ...>. and when outputting this variable we referred explicitly to this named lock and we haven't had the error occurring again (5 days and counting).
    Inspiring
    December 4, 2008
    so, what do cf logs say?

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/
    mark_laAuthor
    Inspiring
    December 4, 2008
    Unfortunately the error doesn't show up in any of the logs, which is part of the mystery. I can see the error notification emails being sent, but no exception/error precedes them.