Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Simon Hooker / Simon Hooker (Simon Hooker)
Created: 04/21/2013
Components: ORM Support
Versions: 9.0.1
Failure Type: Crash
Found In Build/Fixed In Build: 9.0.1 / CF10 Update16
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Linux All
Vote Count: 3
Problem Description: In CF 9.0.1 if you perform a getMetaData() call on an object that was just loaded with ObjectLoad() then you will have a NULL POINTER error. If you call a method of that object, or writedump that object, prior to the getMetaData() call then the getMetaData() call will function correctly. See StackOverflow ticket http://stackoverflow.com/questions/16103089/null-pointer-error-when-using-objectloadobjectsave for a couple of methods to reliably reproduce.
This is not a problem within Railo. This has been confirmed within CF 9.0.1, CF 9.0.2, and CF 10.0.9
Steps to Reproduce:
I have attached 2 files. NullError.cfc and NullErrorTest.cfc. If you run the MXUnit tests within NullErrorTest.cfc then the error will reproduce.
Alternatively another user has found the following will also reproduce the error
// C.cfc
component {}
<!--- test.cfm --->
<cfscript>
o1 = new C();
writeDump(getMetaData(o1)); // OK
o2 = objectLoad(objectSave(o1));
writeDump(getMetadata(o2)); // breaks
</cfscript>
Actual Result:
NULL POINTER ERROR
Expected Result:
Metadata dump of component object
Any Workarounds:
1 : WriteDump(o2) prior to doing GetMetaData(o2)
2 : Calling a method of o2 prior to GetMetaData(o2)
Both these workarounds result in the object behaving correctly following an ObjectLoad
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3546237
External Customer Info:
External Company:
External Customer Name: MSO Simon
External Customer Email:
External Test Config: My Hardware and Environment details:
This is reproducable on any CF 9.0.1 environment (Linux + Win) that I have tried so far. Another user has also tested 9.0.2 and 10.0.9 and found this same issue to be reproducable in that.
Attachments:
- April 21, 2013 00:00:00: 1_NullError.zip
Comments: