Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 4.0 (Release)
-
None
-
None
-
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
1. Add an event listener to PopUpManagerImpl's singleton instance for the event, "updateModalMask"
2. That event contains a property, popUpData of type mx.managers.PopUpData. Add a mask to event.popUpData.modalWindow when that event fires.
3. Create a simple pop-up window using Alert.show
4. Close the pop-up window
Alternate way to reproduce:
1. Set the value of PopUpManagerImpl's singleton instance mx_internal::modalWindowClass property to a class that creates a mask for itself.
2. Create a simple pop-up window using Alert.show
3. Close the pop-up window
Code included that reproduces this bug. Reproduce with the code:
1. Call static method of DModalWindowMask::injectIntoPopupManager.
2. Create a simple pop-up window using Alert.show
3. Close the pop-up window
Actual Results:
Mask is applied to the modal window's ghosted shield correctly. When the pop-up closes an exception is thrown and the mask is not removed:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::PopUpManagerImpl/fadeOutDestroyEffectEndHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\PopUpManagerImpl.as:1220]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.effects::Effect/effectEndHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\Effect.as:1817]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.effects::EffectInstance/finishEffect()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\EffectInstance.as:805]
at mx.effects::EffectInstance/finishRepeat()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\EffectInstance.as:849]
at mx.effects.effectClasses::TweenEffectInstance/onTweenEnd()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\effectClasses\TweenEffectInstance.as:435]
at mx.effects.effectClasses::FadeInstance/onTweenEnd()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\effectClasses\FadeInstance.as:241]
at mx.effects::Tween/endTween()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\Tween.as:566]
at mx.effects::Tween/http://www.adobe.com/2006/flex/mx/internal::doInterval()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\Tween.as:607]
at mx.effects::Tween$/timerHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\effects\Tween.as:191]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
On line 1220 of mx.managers.PopUpManagerImpl the variable sm is reference before it has been defined and a value has been placed within it. That variable is not defined until line 1225.
Expected Results:
Mask is applied to the modal window's ghosted shield. When the pop-up window closes the mask for the shield is removed without an exception.
Workaround (if any):
The workaround is a bit of a kludge. Set the value of PopUpManagerImpl mx_internal::modalWindowClass to a class that has a setter function for alpha. When the alpha != 0 then confirm the mask exists. If the alpha == 0 and the mask is not null, then set the mask to null and remove the mask from the display list.