The 'null null' error

350 views
Skip to first unread message

MrBuzzy

unread,
Dec 6, 2011, 10:01:21 PM12/6/11
to cfau...@googlegroups.com
Howdy, has anyone actually been able to accurately debug the 'null null' error? (The error occurred on line -1)

It's pretty random. Stack trace is empty so it can't be traced to a particular line. It doesn't happen consistently, nor does it occur during a memory shortage.

Googling didn't reveal anything concrete to work with :( Some suggest it's a symptom, not the root cause. I'd hoped something would show up in the JRun logs, but no.

This is occurring in ACF9 with all the hot fixes I'm aware of.


David Harris

unread,
Dec 6, 2011, 11:13:02 PM12/6/11
to cfau...@googlegroups.com
Hey up,

I've created the null null error...

I can't remember how exactly.
Can you isolate it down to a function call?

I seem to remember it was something about having an argument the same name as a function in the same CFC...

David Harris 




--
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfau...@googlegroups.com.
To unsubscribe from this group, send email to cfaussie+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.


This e-mail is intended only for the named person or entity to which
it is addressed and contains valuable business information that is
privileged, confidential and/or otherwise protected from disclosure.
If you received this e-mail in error, any review, use, dissemination,
distribution or copying of this e-mail is strictly prohibited.
Please notify us immediately of the error via e-mail to
discl...@shift.co.nz and please delete the e-mail from your system, 
retaining no copies in any media.
We appreciate your cooperation.


MrBuzzy

unread,
Dec 6, 2011, 11:41:47 PM12/6/11
to cfau...@googlegroups.com, cfau...@googlegroups.com
Thanks, I can definitely look for something like that.

The annoying thing is its not consistent. It comes and goes :( 

Kai Koenig

unread,
Dec 7, 2011, 12:08:39 AM12/7/11
to cfau...@googlegroups.com
From my point of view, the null null error is def. masking something else happening behind the scenes and there are plenty of reasons why it can occur.

I've been seeing it recently happening in a CFC in the application scope where a method has a function-local variable that is set to reference to another application-scope CFC instance.

Cheers
Kai

MrBuzzy

unread,
Dec 7, 2011, 1:08:43 AM12/7/11
to cfau...@googlegroups.com
Agree, it's hiding :) 

I've narrowed this one down to a query of queries that fails occasionally. 

I was really hoping someone had discovered a way to unmask the error. 

Barry Chesterman

unread,
Dec 7, 2011, 1:09:33 AM12/7/11
to cfau...@googlegroups.com
The only way I've ever been able to effectively debug null errors is by running specific segments of code and seeing if I can recreate it.
The most common causes I see for a null error is unscoped or unvared variables being used in functions which usually cause issues during simultaneous requests. I narrow these down by running load tests on specific pages or parts of code which makes the null error easy to recreate (aside from the obvious checking of scoped / varred variables).

As far as the ones that don't tell you what script the null came from it's a bit of a stumper but if you could set up a load test and configure your test to run specific pages and manage to consistently recreate the nulls from specific pages that might help you narrow it down.

Barry

MrBuzzy

unread,
Dec 7, 2011, 1:55:26 AM12/7/11
to cfau...@googlegroups.com, cfau...@googlegroups.com
In this case the error is occurring outside of a cfc. 
I'm performing a QoQ on a query that's returned by a cfc function.
The query is var scoped and constructed from data returned by a web service. 
Maybe I should be duplicating it as it's returned (?).

@Kai ... What about one of those JVM inspection tools, do they show exceptions as they occur? Maybe we can see it there? 

charlie arehart

unread,
Dec 7, 2011, 10:25:48 AM12/7/11
to cfau...@googlegroups.com

Yep, given what you’ve said, I’d start to suspect perhaps it’s a concurrency problem, where somehow another thread is clashing with data you’re accessing. These can be knotty to solve, because it’s not always obvious from the code you’re looking at where a conflict could arise. I’m starting to wonder if perhaps the query (that you’re accessing in the Q of Q) might be changing while you’re running the Q of Q. Look closely to see if that’s at all possible.

I wonder, if you were to wrap the Q of Q in a try/catch (and the problem were not so severe that it couldn’t be caught) if you then were to dump the query (being queried), to see what it shows. Maybe you’d see that it was suddenly no longer a query (if some other request overwrote that).

I realize all that’s a stretch, but since you’re grasping at straws (and your first note showed that you had done all the right initial diagnostic steps I would otherwise have recommended), it seems it’s time to start picking the code apart to see if it’s something very subtle. I do think there will end up being something that we go, “ah!” :-)

Finally, if what I’m proposing is the problem, I’d say it would not then seem something that could be spotted any more easily using any JVM inspection tool. I think instead it would just be about data structures within CF, and it trying to access something that is now no longer there, or no longer in the form it expected. But if my suggestion is a dead end, I suppose you could try it. I have found most attempts to dig into the heap have proven time-consuming and generally fruitless, but then I know Kai has done some amazing work with that approach.

Hope that’s helpful.

 

/charlie

Kai Koenig

unread,
Dec 7, 2011, 3:34:25 AM12/7/11
to cfau...@googlegroups.com
>
> @Kai ... What about one of those JVM inspection tools, do they show exceptions as they occur? Maybe we can see it there?

Hmm, I wonder if one could actually see it in the list of thread stack traces in a full heap dump. I guess the thread causing the error would have to be running at the time you'd take the heap dump.

But it's an interesting idea.

MrBuzzy

unread,
Dec 15, 2011, 12:06:03 AM12/15/11
to cfau...@googlegroups.com, cfau...@googlegroups.com
Hi everyone, I eventually sorted this out.

I isolated the problem to a QoQ combined with some occasionally bad data.

One of the queries contained un-typed columns. One column contained mainly zeros but occasionally an empty string.

I wasn't joining on this column but I was selecting it.

CF tries to be smart and set a type on the resulting column in the new query. It then barfs when it encounters the empty string.

In this case, garbage in garbage out would suit me fine, but no, it don't work like that!

Thanks everyone for your input, it's probably a CF bug, where an unexpected error happens and CF doesn't produce a proper error for it.

Cheers.

Kai Koenig

unread,
Dec 23, 2011, 11:32:16 PM12/23/11
to cfau...@googlegroups.com
Well done - and here's the promised blogpost re my "null, null" error:


:)

Cheers
Kai
Reply all
Reply to author
Forward
0 new messages