Adding itemCreationPolicy="immediate" on mx:Panel causes null object reference error in Flex 4.x
The itemCreationPolicy works fine with spark components and other mx component until we hit by mx panel.
Looks like an error is thrown from StyleProtoChain.
The interesting thing is the null object reference error both occurs in Flex 4.0 and Flex 4.1, but caused by different objects.
Is there a workaround to use itemCreationPolicy on mx panel?
Thank you.
Yes, there are all kinds of problems when you remove something from the screen that had focus (for instance, at that point you can't capture keyboard events either).
My code is sprinkled with so many things to make sure something is in focus, I tend to forget that I've done it.
In your code that changes the currentState, add
this.setFocus()
HTH;
Amy
Similar Messages
-
Null object reference error in Axis Renderer in Case of Stacked Column Chart
We are trying to display a Flex Column chart (when stacked ) with single value in DataProvider but we used to get following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.charts::AxisRenderer/calcStaggeredSpacing()[C:\Work\flex\dmv_automation\projects\datav isualisation\src\mx\charts\AxisRenderer.as:2195]
at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\Work\flex\dmv_automation\projects\dat avisualisation\src\mx\charts\AxisRenderer.as:1586]
at mx.charts::AxisRenderer/adjustGutters()[C:\Work\flex\dmv_automation\projects\datavisualis ation\src\mx\charts\AxisRenderer.as:1326]
at mx.charts::AxisRenderer/set gutters()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRender er.as:798]
at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\Work\flex\dmv_automation\pro jects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:2028]
at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\Work\flex\dmv_automation\pr ojects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1355]
at mx.core::UIComponent/validateDisplayList()[C:\autobuild\galaga\frameworks\projects\framew ork\src\mx\core\UIComponent.as:6351]
at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\galaga\frameworks\projects\ framework\src\mx\managers\LayoutManager.as:622]
at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\galaga\frameworks\project s\framework\src\mx\managers\LayoutManager.as:695]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\galaga\frameworks\projects\frame work\src\mx\core\UIComponent.as:8733]
at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\galaga\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8673]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
We have invested so much effort and done lots of googling and also followed the work around given on https://bugs.adobe.com/jira/browse/FLEXDMV-2275 but till now, we didn't get any solution.I solved the issue by getting rid of the creationCompleteHandler event handlers for the KPI charts. But, since I am just days into flex development, I would be indebted if someone could explain to me why that was creating problems.
-
Flex 4.5: null object reference error on focus handling
The spark list in the following listing is only included in MyState1. If a CheckBox is checked, the MyState2 is set and therefore the spark list is removed from stage.
If I run the application with debugger attached and i check a CheckBox and then focus out and focus in the browser's window there is an error:
TypeError: Error #1009: Cannot access a property or method of a null object reference
at spark.components::Scroller/focusInHandler()[E:\dev\4.5.1\frameworks\projects\spark\src\sp ark\components\Scroller.as:1273]
at flash.display::Stage/set focus()
at mx.core::UIComponent/setFocus()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UI Component.as:9895]
at mx.managers::FocusManager/activateHandler()[E:\dev\4.5.1\frameworks\projects\framework\sr c\mx\managers\FocusManager.as:689]
This is the code of the application:
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
initialize="application1_initializeHandler(event);">
<fx:Script>
<![CDATA[
protected function application1_initializeHandler(event:Event):void
addEventListener("myComboBoxChanged", testHandler);
private function testHandler(e:Event):void
currentState = "MyState2";
]]>
</fx:Script>
<s:states>
<s:State name="MyState1"/>
<s:State name="MyState2"/>
</s:states>
<s:List includeIn="MyState1">
<s:dataProvider>
<s:ArrayList>
<fx:String>A</fx:String>
<fx:String>B</fx:String>
<fx:String>C</fx:String>
</s:ArrayList>
</s:dataProvider>
<s:itemRenderer>
<fx:Component>
<s:ItemRenderer>
<s:CheckBox label="CheckBox {data}" change="dispatchEvent(new Event('myComboBoxChanged', true));" />
</s:ItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:List>
</s:Application>Yes, there are all kinds of problems when you remove something from the screen that had focus (for instance, at that point you can't capture keyboard events either).
My code is sprinkled with so many things to make sure something is in focus, I tend to forget that I've done it.
In your code that changes the currentState, add
this.setFocus()
HTH;
Amy -
I added a textarea to vrgoup container and added that vgroup as popup to the application. while i am trying to focus into the textarea , it always throwing me null object reference. to see that you need to have debugger version of flash player installed. please help me if anybody knows the solution.
here is my code.
code
protected function btn_clickHandler(event:MouseEvent):void
var vgroup:VGroup = new VGroup();
var ta:TextArea = new TextArea();
vgroup.percentWidth = 100;
vgroup.addElement(ta);
PopUpManager.addPopUp(vgroup, this);
Following is the error thrown
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at spark.components::Scroller/focusInHandler()[E:\dev\hero_private\frameworks\projects\spark \src\spark\components\Scroller.as:1258]
at flash.display::Stage/set focus()
at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::setFocus()[C:\Vellum\branches\v2\2.0\dev\out put\openSource\textLayout\src\flashx\textLayout\container\ContainerController.as:2265]
at flashx.textLayout.container::ContainerController/mouseDownHandler()[C:\Vellum\branches\v2 \2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerController. as:2067]
at flashx.textLayout.container::TextContainerManager/mouseDownHandler()[C:\Vellum\branches\v 2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManage r.as:1939]
at spark.components.supportClasses::RichEditableTextContainerManager/mouseDownHandler()[E:\d ev\hero_private\frameworks\projects\spark\src\spark\components\supportClasses\RichEditable TextContainerManager.as:665]
at flashx.textLayout.container::ContainerController/http://ns.adobe.com/textLayout/internal/2008::requiredMouseDownHandler()[C:\Vellum\branche s\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\ContainerControl ler.as:2088]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\hero_private\frameworks\projects\framework\sr c\mx\core\UIComponent.as:13128]
at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\fr amework\src\mx\managers\SystemManager.as:2924]The simplest example I could come up with consists of 3 files:
Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
applicationComplete="open()">
<fx:Script>
<![CDATA[
import mx.managers.PopUpManager;
public function open():void {
var popUp:CustomComponent = PopUpManager.createPopUp(
this, //parent
CustomComponent, //class name
true //modal
) as CustomComponent;
PopUpManager.centerPopUp(popUp);
]]>
</fx:Script>
</s:Application>
CustomComponent.as
package {
import spark.components.supportClasses.SkinnableComponent;
public class CustomComponent extends SkinnableComponent {
public function CustomComponent() {
super();
setStyle('skinClass', CustomComponentSkin);
CustomComponentSkin.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Metadata>
[HostComponent("CustomComponent")]
</fx:Metadata>
<s:Panel>
<s:TextArea/>
</s:Panel>
</s:Skin> -
Default Cannot access a property or method of a null object reference.
Evenin' all.
I've got a problem with a flash application I'm creating. I have put an FLV movie in frame 10 of a scene, but whenever I test the movie it just says:
[CODE]TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Prototype_fla::MainTimeline/__setProp_commentsPlayer_Variables_Content_0()
at Prototype_fla::MainTimeline/frame1()[/CODE]
Variables is the name of the scene, commentsPlayer being the name of the FLV player. What is causing this to happen? I have tested the video on its own in a new file and it works fine :confused:
I also get the same problem with buttons in different frames/scenes.
I'm relatively new to Flash so it's probably something pretty small but vital.Ignore the 'Default' bit at the start of the question, that's just a typo.
I'm using Flash CS4/AS 3.0, the Flash movie is split up into scenes, I've added an FLVPlayback component to the stage in frame 10 (keyframe) in one of the scenes (not the first scene) and specified the source and other component settings using the component inspector. I'm not using ActionScript for this currently.
The problem occurs when I try to test the movie, it throws up this output when compiling:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Prototype_fla::MainTimeline/__setProp_commentsPlayer_Variables_Content_0()
at Prototype_fla::MainTimeline/frame1()
The FLVPlayback is obviously 'commentsPlayer' in scene 'Variables'. -
Web-UI error message "Access via 'NULL' object reference not possible"
I need some help, I'm not a Basis person but I need to get this connection problem resolve.
This problem is in our DEV ICWeb system. After logging in to Web-UI, I got a error message "Access via 'NULL' object reference not possible". We have 3 clients (100, 220, & 310) in DEV and all 3 clients are giving me the same error message.
From the help.sap.com, I found this topic http://help.sap.com/saphelp_nwes70/helpdata/en/84/43f0d786304e19a652a8f80909a8ec/content.htm
but in the document it asked to go to SM59 to check the ESH_APPL_WS_TEMPLATEENGINE destination. But we don't have that destination setup in all our systems.
Here is the complete error message:
Error when processing your request
What has happened?
The URL http://crm-dev.staff.copa:8000/sap/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do was not called due to an error.
Note
■The following error text was processed in the system CD1 : Access via 'NULL' object reference not possible.
■The error occurred on the application server CRM-DEV_CD1_00 and in the work process 0 .
■The termination type was: RABAX_STATE
■The ABAP call stack was:
Method: GET_DATA_LOSS_HANDLER of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
Method: GET_DATA_LOSS_HANDLER of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
Method: EH_TRIGGER_NAVIGATION of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
Method: SET_WORKAREA_CONTENT of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
Method: PROCESS_NAV_QUEUE of program CL_BSP_WD_VIEW_MANAGER========CP
Method: DO_INIT of program CL_CRM_UI_FRAME_APP_CONTROLLERCP
Method: DO_INIT of program CL_BSP_CTRL_ADAPTER===========CP
Method: GET_PAGE_CONTEXT_CURRENT of program CL_BSP_CONTEXT================CP
Method: ON_REQUEST_ENTER of program CL_BSP_RUNTIME================CP
Method: ON_REQUEST of program CL_BSP_RUNTIME================CP
What can I do?
■If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CD1 in transaction ST22.
■If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server CRM-DEV_CD1_00 in transaction SM21.Hi Michael,
Refer to the link below and check the procedure.
http://help.sap.com/saphelp_nwes70/helpdata/en/84/43f0d786304e19a652a8f80909a8ec/content.htm
Regards,
Arjun -
Access via 'NULL' object reference not possible Error in WD application execution
Experts,
I am getting following error for web dynpro application intermittently, please find following error log:
What happened?
Error in the ABAP Application Program
The current ABAP program "CL_SALV_WD_C_TABLE_V_TABLE====CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
caught in
procedure "IF_SALV_WD_COMP_TABLE_DATA_MAP~MAP_TO_RESULT_CHANGES" "(METHOD)",
nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component.
An object reference must point to an object (an instance of a class)
before it can be used to access components.
Either the reference was never set or it was set to 'NULL' using the
CLEAR statement.
Information on where terminated
Termination occurred in the ABAP program "CL_SALV_WD_C_TABLE_V_TABLE====CP" -
in "IF_SALV_WD_COMP_TABLE_DATA_MAP~MAP_TO_RESULT_CHANGES".
The main program was "SAPMHTTP ".
In the source code you have the termination point in line 168
of the (Include) program "CL_SALV_WD_C_TABLE_V_TABLE====CM080".
The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
procedure "IF_SALV_WD_COMP_TABLE_DATA_MAP~MAP_TO_RESULT_CHANGES" "(METHOD)",
but it was neither handled locally nor declared
in the RAISING clause of its signature.
The procedure is in program "CL_SALV_WD_C_TABLE_V_TABLE====CP "; its source
code begins in line
1 of the (Include program "CL_SALV_WD_C_TABLE_V_TABLE====CM080 ".
Line SourceCde
138
139 "Set new value to result data
140 if ls_changelist-r_old_value is not bound.
141 "insert new table line
142 lr_component->r_result_data->if_salv_bs_r_data_table_edit~insert_table_line(
143 index = l_result_data_index ).
144 else.
145 "Modify existing table line
146 lr_component->r_result_data->if_salv_bs_r_data_table_edit~set_table_line(
147 index = l_result_data_index
148 data_line = <ls_table> ).
149 endif.
150 else.
151 "A single attribute value has to be updated
152
153 "Get context element from output data node
154 data lr_element type ref to if_wd_context_element.
155
156 "Retrieve the element to update from the data output node
157 if l_mass_edit_row_inserted = abap_true.
158 "The Element only exists virtually due to the mass edit mode.
159 lr_element = lr_node->get_element( l_mass_edit_virtual_index ).
160 l_mass_edit_row_inserted = abap_false.
161 else.
162 "The element already exists in the data output node.
163 lr_element = lr_node->get_element( ls_changelist-index ).
164 endif.
165
166 "Determine if the cell to be updated is set to null (Nullable)
167 data l_is_null type abap_bool.
>>>>> l_is_null = lr_element->is_attribute_null( ls_changelist-attribute ).
169
170 "Update result data with change
171 if <l_value> is assigned.
172 "update ResultData with cell value
173 lr_component->r_result_data->if_salv_bs_r_data_table_edit~set_table_cell(
174 index = l_result_data_index
175 attribute = ls_changelist-attribute
176 data_cell = <l_value>
177 is_null = l_is_null ).
178 else.
179 "Update result data without any updated cell value
180 lr_component->r_result_data->if_salv_bs_r_data_table_edit~set_table_cell(
181 index = l_result_data_index
182 attribute = ls_changelist-attribute
183 is_null = l_is_null ).
184 endif.
Please help us on what could be the reason behind this?
Thanks,
MadanHi Madan,
It seems that, there are user settings saved and the attribute in the layout settings is not available with current changes.
try to delete the user settings if any.
Please find my answer in the below link
Reset user settings in WDA
Hope this helps you.
Regards,
Rama -
Null object reference starling
This function is called within a for loop to create 4 buttons ... select the right frame and display it.
Problem is I get a null object reference in addChild... line.
I'm using starling and I don't know how to get rid of this error. Can you help ?
private function newButton(i:int):void
var newBtn:_menuButton = new _menuButton();
newBtn.gotoAndStop(i + 1);
menuGroup[i] = newBtn;
addChild(newBtn as DisplayObject); //starling.display.DisplayObject
newBtn.addEventListener(TouchEvent.TOUCH, onTouch, false, 0, true);
Also the code on Starling :
public function addChild(child:DisplayObject):void
addChildAt(child, numChildren);
/** Adds a child to the container at a certain index. */
public function addChildAt(child:DisplayObject, index:int):void
if (index >= 0 && index <= numChildren)
child.removeFromParent(); //I get error in this line primarly.
mChildren.splice(index, 0, child);
child.setParent(this);
child.dispatchEvent(new Event(Event.ADDED, true));
if (stage) child.dispatchEventOnChildren(new Event(Event.ADDED_TO_STAGE));
else
throw new RangeError("Invalid child index");Also _menuButton is a flash MovieClip ... I am thinking you can't unite flash and starling this way ...maybe have to implement it using starling MovieClip.
-
Hi,
I'm having a lot of trouble getting a preloader to work on my Flash website. I'm new to actionscript, the site works fine but when I place the preloader in frame 1, I get.
Error#1009: Cannot access a property or method of a null object reference.
Then it lists three areas. The buttons on the site don't work anymore.
I've followed the Lynda com tutorials so don't know what is causing this error.
Included is the word.doc with the error code, preloader code, the main flash frame 2 code and the debug information.
Any help would be great.
Thanks!You need to make sure 'cards' is named properly and is present when that line of code executes. If it is somewhere down a timeline, it is not present.
As far as your preloader code goes, what is infoLoader. I have to assume it's some form of component since you don't have any code to instantiate it. -
Is there a known bug when displaying a chart component that is defined in a module. When attempting to display a chart component defined in a module it crashes indicating Error #1009: Cannot access a property or method of a null object reference.
It crashes at the following location in ChartBase.as. Somehow when loading the chart the styleManager.getStyleDeclaration("mx.charts.chartClasses.ChartBase"); returns null so when using the setStyle methods the exception occurs.
private function initStyles():Boolean
HaloDefaults.init(styleManager);
var chartBaseStyle:CSSStyleDeclaration = styleManager.getStyleDeclaration("mx.charts.chartClasses.ChartBase");
chartBaseStyle.setStyle("chartSeriesStyles", HaloDefaults.chartBaseChartSeriesStyles);
chartBaseStyle.setStyle("fill", new SolidColor(0xFFFFFF, 0));
chartBaseStyle.setStyle("calloutStroke", new SolidColorStroke(0x888888,2));
return true;
Added note: There is a chart component in the application that works fine. The only way I can get the chart in the module to display is to add the following workaround preinitializer but it severly impacts the loading of the module. Is there a way around this.
protected function preinitializeHandler(event:FlexEvent):void
var styleObjects:Array = FlexGlobals.topLevelApplication.styleManager.selectors;
for each(var styleObj:String in styleObjects) {
var style:CSSStyleDeclaration = FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration(styleObj);
styleManager.setStyleDeclaration(styleObj, style, true);
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.charts.chartClasses::ChartBase/initStyles()[E:\dev\4.y\frameworks\projects\charts\src\ mx\charts\chartClasses\ChartBase.as:1862]
at mx.charts.chartClasses::ChartBase/set moduleFactory()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\chartClasses\ChartBas e.as:1894]
at mx.charts.chartClasses::PolarChart/set moduleFactory()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\chartClasses\PolarCha rt.as:223]
at mx.charts::PieChart/set moduleFactory()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\PieChart.as:203]
at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1590]
at spark.components::Group/addElementAt()[E:\dev\4.y\frameworks\projects\spark\src\spark\com ponents\Group.as:1387]
at spark.components::SkinnableContainer/addElementAt()[E:\dev\4.y\frameworks\projects\spark\ src\spark\components\SkinnableContainer.as:775]
at mx.states::AddItems/addItemsToContentHolder()[E:\dev\4.y\frameworks\projects\framework\sr c\mx\states\AddItems.as:782]
at mx.states::AddItems/apply()[E:\dev\4.y\frameworks\projects\framework\src\mx\states\AddIte ms.as:563]
at mx.core::UIComponent/applyState()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:10741]
at mx.core::UIComponent/commitCurrentState()[E:\dev\4.y\frameworks\projects\framework\src\mx \core\UIComponent.as:10487]
at mx.core::UIComponent/setCurrentState()[E:\dev\4.y\frameworks\projects\framework\src\mx\co re\UIComponent.as:10323]
at mx.core::UIComponent/set currentState()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:6425]
at BloodPressure/bloodpressureDg_selectionChangeHandler()[C:\Users\Mark\Adobe Flash Builder 4.7\BiometricsFlexProject\src\BloodPressure.mxml:311]
at BloodPressure/__bloodpressureDg_selectionChange()[C:\Users\Mark\Adobe Flash Builder 4.7\BiometricsFlexProject\src\BloodPressure.mxml:41]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core \UIComponent.as:13152]
at spark.components::DataGrid/commitInteractiveSelection()[E:\dev\4.y\frameworks\projects\sp ark\src\spark\components\DataGrid.as:3634]
at spark.components::DataGrid/setSelectionAnchorCaret()[E:\dev\4.y\frameworks\projects\spark \src\spark\components\DataGrid.as:4210]
at spark.components::DataGrid/grid_mouseDownHandler()[E:\dev\4.y\frameworks\projects\spark\s rc\spark\components\DataGrid.as:4679]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core \UIComponent.as:13152]
at spark.components::Grid/dispatchGridEvent()[E:\dev\4.y\frameworks\projects\spark\src\spark \components\Grid.as:4038]
at spark.components::Grid/grid_mouseDownDragUpHandler()[E:\dev\4.y\frameworks\projects\spark \src\spark\components\Grid.as:3883]
at Function/<anonymous>()[E:\dev\4.y\frameworks\projects\spark\src\spark\utils\MouseEventUti l.as:84]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mouseEventHandler()[E:\dev\4.y\frameworks\projects\framework\s rc\mx\managers\SystemManager.as:2918]It appears as though this error has been going on for a while. See the following link http://forums.adobe.com/thread/941849
-
PopUpManager.centerPopUp gives Cannot access a property or method of a null object reference
Hello all,
The PopUpManager.centerPopUp(this); in my code gives out the following error:
Main Thread (Suspended: TypeError: Error #1009: Cannot access a property or method of a null object reference.)
mx.managers::PopUpManagerImpl/findPopupInfoByOwner
mx.managers::PopUpManagerImpl/centerPopUp
mx.managers::PopUpManager$/centerPopUp
com.mycom.view::LoginView/doInit
com.mycom.view::LoginView/___LoginView_TitleWindow1_creationComplete
flash.events::EventDispatcher/dispatchEventFunction [no source]
flash.events::EventDispatcher/dispatchEvent [no source]
mx.core::UIComponent/dispatchEvent
mx.core::UIComponent/set initialized
mx.managers::LayoutManager/doPhasedInstantiation
Function/http://adobe.com/AS3/2006/builtin::apply [no source]
mx.core::UIComponent/callLaterDispatcher2
mx.core::UIComponent/callLaterDispatcher
MyAppl.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:view="com.mycom.view.*">
<mx:Panel id="applPanel" height="100%" width="100%" backgroundColor="#3CACCC">
<view:LoginView />
</mx:Panel>
</mx:Application>
LoginView.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" width="400" height="300" creationComplete="doInit()">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
private function doInit():void {
PopUpManager.centerPopUp(this);
private function login():void{
trace("login clicked");
]]>
</mx:Script>
<mx:Form id="loginForm" defaultButton="{loginBtn}">
<mx:HBox>
<mx:Button id="loginBtn" label="OK" click="login()" />
</mx:HBox>
</mx:Form>
</mx:TitleWindow>
Somebody please help me on this.
Thanks.
roshniPls find your solution Below.
MyAppl.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="onCreationComplete()">
<mx:Script>
<![CDATA[
import com.mycom.view.LoginView;
import mx.core.IFlexDisplayObject;
import mx.managers.PopUpManager;
private var popUp:IFlexDisplayObject;
private function onCreationComplete():void
popUp = PopUpManager.createPopUp(this, LoginView, true);
popUp.move(((this.width/2)-(popUp.width/2)),(((this.height/2)-(popUp.height/2))));
]]>
</mx:Script>
<mx:Panel id="applPanel" height="100%" width="100%" backgroundColor="#3CACCC"/>
</mx:Application>
LoginView.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" width="400" height="300">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
private function login():void{
trace("login clicked");
]]>
</mx:Script>
<mx:Form id="loginForm" defaultButton="{loginBtn}">
<mx:HBox>
<mx:Button id="loginBtn" label="OK" click="login()" />
</mx:HBox>
</mx:Form>
</mx:TitleWindow>
Pls let me know if you have any problem with this one code.
with Regards,
Shardul Singh Bartwal -
Hi ,
I am working on file to rfc scenario.
The scenario was working fine till monday evening.
From yst , all of a sudden i am getting this error in RWB
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling /POSDW/CREATE_TRANSACTIONS_EXT in remote system (RfcClient[RFC_Receiver_POSDM]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Access via 'NULL' object reference not possible.: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling /POSDW/CREATE_TRANSACTIONS_EXT in remote system (RfcCli
and because of this even though the records are suceesfully posted in target system , the xi keeps trying to send the records to the BI system and recoeds are replicated.
Wat can be the reasonand solution.?
Thanks in advance and best regards,
AnilHi Anil,
Try to debug the receiver RFC call.
The specified item was not found.
go through the help..
http://help.sap.com/saphelp_nw04s/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm
Hope it helps...
Thanks,
kumar. -
Error: "Cannot access a property or method of a null object reference"
I am getting the following action script error when I try to play my exported .swf in flash player 9. If I hit "continue" or "dismiss all" it plays the file fine. Is there a way to fix or at least supress this error message?
Action Script Error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::LayoutManager/set usePhasedInstantiation()
at mx.core::Application()
at template3427435882-34461-4573-128-41-612353629238248()
at _template_mx_managers_SystemManager3427435882-34461-4573-128-41-612353629238248/create()
at mx.managers::SystemManager/initializeTopLevelWindow()
at mx.managers::SystemManager/docFrameHandler()Hi Owen,
it looks like you have debug version of flash player installed. If you uninstall it through Control Panel and install regular (release) version from Adobe website, the message should go away.
Margaret -
RFC_ERROR_SYSTEM_FAILURE - - Access via NULL object reference not possible
Hi,
RFC was working fine , suddenly starting showing error below ( not sure if i changed anything ) -
Rest of the RFC's in the same app are working fine.
The error throwed is -
com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Access via NULL object reference not possible., error key: RFC_ERROR_SYSTEM_FAILURE
Full error details -
com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Access via NULL object reference not possible., error key: RFC_ERROR_SYSTEM_FAILURE
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClassExecutable.execute(DynamicRFCModelClassExecutable.java:101)
at com.sap.xss.per.fc.persinfo.FcPersInfo.onCleanup(FcPersInfo.java:561)
at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfo.onCleanup(InternalFcPersInfo.java:798)
at com.sap.xss.per.fc.persinfo.FcPersInfoInterface.onCleanup(FcPersInfoInterface.java:246)
at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfoInterface.onCleanup(InternalFcPersInfoInterface.java:299)
at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfoInterface$External.onCleanup(InternalFcPersInfoInterface.java:459)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.cleanUp(FPMComponent.java:644)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.access$1000(FPMComponent.java:78)
at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.exitCalled(FPMComponent.java:963)
at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPMProxy.exitCalled(FPMComponent.java:1134)
at com.sap.pcuigp.xssfpm.wd.BackendConnections.wdDoExit(BackendConnections.java:124)
at com.sap.pcuigp.xssfpm.wd.wdp.InternalBackendConnections.wdDoExit(InternalBackendConnections.java:228)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doExit(DelegatingCustomController.java:77)
at com.sap.tc.webdynpro.progmodel.controller.Controller.exitController(Controller.java:180)
at com.sap.tc.webdynpro.progmodel.controller.Controller.exit(Controller.java:154)
at com.sap.tc.webdynpro.progmodel.controller.Component.exitController(Component.java:251)
at com.sap.tc.webdynpro.progmodel.controller.Controller.exit(Controller.java:154)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.exit(ClientComponent.java:219)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.exit(ClientApplication.java:474)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.destroy(ClientApplication.java:527)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.destroy(ApplicationSession.java:398)
at com.sap.tc.webdynpro.clientserver.session.ClientWindow.destroyApplicationSession(ClientWindow.java:235)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doDestroyApplication(ClientSession.java:1003)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doSessionManagementPostProcessing(ClientSession.java:789)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:264)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(AccessController.java:219)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Caused by: com.sap.aii.proxy.framework.core.BaseProxyException: Access via 'NULL' object reference not possible., error key: RFC_ERROR_SYSTEM_FAILURE
at com.sap.aii.proxy.framework.core.AbstractProxy.send$(AbstractProxy.java:150)
at com.sap.xss.per.model.mac.HRXSS_PER_MAC.hrxss_Per_Cleanup(HRXSS_PER_MAC.java:331)
at com.sap.xss.per.model.mac.Hrxss_Per_Cleanup_Input.doExecute(Hrxss_Per_Cleanup_Input.java:137)
at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClassExecutable.execute(DynamicRFCModelClassExecutable.java:92)
... 43 more
Thanks,
Regards,
AnkitHello Vaish & Ankit,
Can you check what is the dump occurred in transaction ST22?
I hope you guys are working with HR data. So, i think some object is not passed(internally) correctly in RFC.
Please debug the RFC by keeping the breakpoint from webdynpro application, then you will come to know what is not passed when we execute the RFC from R/3.
Regards
Nizamudeen SM -
1009 error for null object reference-how to fix/workaround?
Hi,
A while ago, with help on the forum, worked out a script (AS3) for a tween animation to demonstrate breathing in and out for an eLearning lesson exercise. There are buttons to pause and unpause/resume the animation.
These pause and unpause/resume functions throw a 1009 error if the pause button is clicked at the moment that the tween is changing from expanding to contracting. So, most of the time, no error. But every so often, if clicked at the turning point, the 1009 error displays in debugging.
The error points to the line: _paused == null ? pauseAnimation():unpauseAnimation(); which is part of one of the pause functions. And the error also points to a conditional in a second pause function which is probably the beginning attemp to execute the script in it: if (_tX.isPlaying) {
I have tried different ways of changing the script but cannot prevent the error. Any help would be appreciated.
I've included the full pause function script below:
// pause/unpause
function pauseButtonClick2(e:MouseEvent):void {
_paused == null ? pauseAnimation():unpauseAnimation(); error 1009
// pause
function pauseAnimation():void {
// if Tween _tX is running
if (_inhale) { //error 1009
// stop the Tween
_tX.stop();
_soundChannel.stop(); //soundChannel playing inhale sound mp3
_exitButton.visible = false
indexBtn2.visible = false;
// record what is paused
_paused = "tween";
} if (!_inhale) {
_tX.stop();
_soundChannel.stop(); //soundChannel playing exhale sound mp3
_exitButton.visible = false
indexBtn2.visible = false;
// record what is paused
_paused = "tween2";
else{
// timer is running
// stop the timer
_timer.stop();
exitButton.visible = false
indexBtn2.visible = false;
// record what is stopped
_paused = "timer";
_pauseButton2.visible = false
_exitButton.visible = true;
_exitButton.alpha = .5;
indexBtn2.visible = true;
//indexBtn2.alpha = .5;
_resumeButton2.visible = true;
//_resumeButton2.alpha = .5;
// unpause
function unpauseAnimation():void {
// unpause accordingly
switch (_paused) {
case "tween" :
_tX.resume();
_soundChannel = _inhaleSound.play()
break;
case "tween2" :
_tX.resume();
_soundChannel = _exhaleSound.play()
break;
case "timer" :
_timer.start();
break;
// reset what was paused
_paused = null;
_pauseButton2.visible = true;
//_pauseButton2.alpha = .5;
_exitButton.visible = false;
indexBtn2.visible = false;
_resumeButton2.visible = false;
Error 1009:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at FLNav9exp_fla::MainTimeline/pauseAnimation()[FLNav9exp_fla.MainTimeline::frame6:305]
at FLNav9exp_fla::MainTimeline/pauseButtonClick2()[FLNav9exp_fla.MainTimeline::frame6:300]I've been trying to fix, still unsuccessfully, so hopefully I've restored script to above (simply cut and pasted it from above) before adding your script.
Got the following, which differs from original error locations:
Attempting to launch and connect to Player using URL C:/Users/Stephen/Desktop/bejeweled(1)/flashinglights/latestfiles/exp/FLNav9exp-app.xml
[SWF] FLNav9exp.swf - 1687237 bytes after decompression
10 10
BPM input: 10
Minute: 1, BPM: 10
Inhale/exhale cycle: 1
a
false
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at FLNav9exp_fla::MainTimeline/pauseAnimation()[FLNav9exp_fla.MainTimeline::frame6:317]
at FLNav9exp_fla::MainTimeline/pauseButtonClick2()[FLNav9exp_fla.MainTimeline::frame6:300]
However, each time I run and get an error, there is a different error line. But, one error line remains consistent:
function pauseButtonClick2(e:MouseEvent):void {
_paused == null ? pauseAnimation():unpauseAnimation(); error 1009: this line
Maybe you are looking for
-
Officejet Pro 8600 Plus, N911g sends faxes, but won't receive
Hello, My printer will send faxes, but not receive them. Windows 7 Pro 64 bit, SP1. The printer is connected to the computer via wireless. The phone is Comcast Digital Voice. The printer is the only device connected to the phone line. Per techs a
-
Mighty Mouse can't Scroll DOWN over Ads
Does anyone else have this issue? Safari Beta (3.0.3), 10.4.10, USB mighty mouse. When I go to some pages, say this one: http://gamers-creed.com/?p=230. And scroll down over the ads, the scrolling stops. Scrolling up is fine. It's annoying because it
-
Hi APPLE! I have one question, Why does my iPod Touch 5-th generation WiFi is not working, When an iPod is in sleep position It appeared after the update iOS seven!! Please tell me how to fix it!!
-
How can i check when a given query was run
how can i check when a given query was run ( i mean the timestamp ) from forms I am trying to run the query depending on when it was last run
-
Hi When i execute copy task to copy the data from one version to another. the system is applying wrong currency transalation. example source version is 500 GC - INR Target version is 700 GC - USD Issue is coming when in the target one of hte consolid