The following error appears when you load then unload and then re-load a module which contains a viewStack or tabNavigator components:

TypeError: Error #1034: Type Coercion failed: cannot convert mx.managers::HistoryManagerImpl@-77d0a45f to mx.managers.IHistoryManager.<br></br>	at mx.managers::HistoryManager$/get impl()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\HistoryManager.as:96]<br></br>	at mx.managers::HistoryManager$/register()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\HistoryManager.as:134]<br></br>	at mx.containers::ViewStack/commitProperties()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\containers\ViewStack.as:649]<br></br>	at mx.containers::TabNavigator/commitProperties()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\containers\TabNavigator.as:504]<br></br>	at mx.core::UIComponent/validateProperties()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:5670]<br></br>	at mx.managers::LayoutManager/validateProperties()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:519]<br></br>	at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:639]<br></br>	at Function/http://adobe.com/AS3/2006/builtin::apply()<br></br>	at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]<br></br>	at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]<br></br><br></br>

Check here the solution:

<mx:Application ...><br></br>...<br></br><mx:Script><br></br><![CDATA[<br></br>	//because of http://bugs.adobe.com/jira/browse/SDK-15249<br></br>	import mx.managers.HistoryManager;<br></br>	private var hist:HistoryManager; <br></br>]]><br></br></mx:Script><br></br>

It seems this problem is much more general and as far as I understand it it’s related to singletone problems while loading/unloading modules:

TypeError: Error #1034: Type Coercion failed: cannot convert mx.managers::DragManagerImpl@2fb82859 to mx.managers.IDragManager.<br></br>	at mx.managers::DragManager$/get impl()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\DragManager.as:152]<br></br>	at mx.managers::DragManager$/get isDragging()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\DragManager.as:187]<br></br>	at mx.controls.listClasses::ListBase/dragScroll()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:7148]<br></br>	at Function/http://adobe.com/AS3/2006/builtin::apply()<br></br>	at <anonymous>()<br></br>	at SetIntervalTimer/onTimer()<br></br>	at flash.utils::Timer/_timerDispatch()<br></br>	at flash.utils::Timer/tick()<br></br><br></br>

but the solution is always the same:

//because of http://bugs.adobe.com/jira/browse/SDK-15249<br></br>import mx.managers.HistoryManager;<br></br>private var hist:HistoryManager; <br></br>//because of https://bugs.adobe.com/jira/browse/SDK-14384<br></br>import mx.managers.IPopUpManager;<br></br>private var iPopUpManager:IPopUpManager;<br></br>//because of similar problem: TypeError: Error #1034: Type Coercion failed: <br></br>//cannot convert mx.managers::DragManagerImpl@2fb82859 to mx.managers.IDragManager<br></br>import mx.managers.IDragManager;<br></br>private var iDragManager:IDragManager;<br></br>

Comments:

Vu Tuan Anh -

I encountered the same problem, thank you for the solution. It works for me :)


Bruno Soares -

That´s work´s!!!!!!! Thank´s!


Reece -

Was banging my head against the wall for days….Thanks a million!


Nappz -

Wow - that was simple… thanks for the guidance!


Francisco Cisneros -

Thank you very much for the help, I am a programmer since the last century, RPGII, Cobol ANS when it was IBM, (1975), currently developing web applications in Flash Builder 4 (4.5sdk). I develop modules based on all my applications. My expertise is in administrative, sales, purchasing inventory.