Asked by:
App self-closes with no exception

Question
-
I have a store app that I have been converting to improve performance and responsiveness.
This has implied quite large changes to one of the App pages.
The app runs perfectly in the simulator but has a strange behaviour on a real device (Asus VivoTab RT).
On rotating the device, the app performs correctly all the code that deals with rotation and change of page, and then closes without warning and without giving an exception to the unhandled exception handler.
This happens with both the 8.0 and 8.1 vesions of the app.
I am quite baffled by this problem, since even stepping through the code one line at a time does not help. After the code for handling the rotation has completed, and the code that services the Layout_Updated has also completed, the app simply disappears from the device screen without stopping at any of the breakpoints set up for OnSuspens, OnUnhandledException etc.
Can somebody help?
Tuesday, March 18, 2014 12:33 PM
All replies
-
It sounds like you can reproduce this under the debugger, so you should be able to catch the initial exception. Since you're not seeing it in managed code it's likely in native. Set the Debug properties for the project to Mixed mode rather than Managed only debugging and go to the Debug.Exceptions... dialog and turn on the "Thrown" exceptions for whatever you're hitting. Since you don't know for sure what it is you might need to turn it on for everything and then step through (or turn off) other handled exceptions as you hit them.
--Rob
Tuesday, March 18, 2014 4:09 PMModerator -
I have tried your suggestion. I had to set debug to Native only because the Arm remorte debugger does not support mixed mode. Unfortunately the results do not point to any specific statement in my application, which at the time is trying to simply switch the screen from landscape to portrait. All the redrawing is done by using Visual States.
I get the following:
1. Five times this exception:
First-chance exception at 0x74EC8EE7 in EpubReader.exe: Microsoft C++ exception: _com_error at memory location 0x0431A810
with this call stack:
> KernelBase.dll!RaiseException() Unknown
msvcrt.dll!_CxxThrowException() Unknown
d3d11.dll!ThrowFailure(long) Unknown
d3d11.dll!NDXGI::CDevice::CreateSurfaceInternal(struct IDXGISwapChainInternal *,struct IUseCounted2 *,struct IDXGISwapBufferInternal *,struct DXGI_SURFACE_DESC const *,unsigned int,unsigned int,unsigned int,unsigned int,void *,struct IDXGIResource * *) Unknown
d3d11.dll!CDevice::CreateCompositionBuffer(unsigned int,unsigned int,enum DXGI_FORMAT,int,unsigned int,unsigned int,struct _GUID const &,void * *,void * *) Unknown
dcomp.dll!CDxDevice::CreateCompositionBuffer(unsigned int,unsigned int,enum DXGI_FORMAT,int,unsigned int,unsigned int,void * *,struct IUnknown * *) Unknown
dcomp.dll!CAtlasSurfacePool::CreateDeviceResources(void) Unknown
dcomp.dll!CAtlasSurfacePool::Initialize() Unknown
dcomp.dll!CAtlasSurfacePool::Create(class CSurfaceManager *,class SizeU const &,enum DXGI_FORMAT,bool,bool,class CAtlasSurfacePool * *) Unknown
dcomp.dll!CDynamicPoolSet::AllocateDynamicPool(class CDynamicPool * *,class SizeU const &,enum DXGI_FORMAT,bool,bool) Unknown
dcomp.dll!CSurfaceManager::RequestSurface() Unknown
dcomp.dll!CBitmapInfoFront::Initialize() Unknown
dcomp.dll!CBitmapInfoFront::Create(class CSurfaceFactory *,unsigned int,unsigned int,enum DXGI_FORMAT,enum DXGI_ALPHA_MODE,enum D2D1_EXTEND_MODE *,bool,struct IDCompositionSurface *,enum AtlasUseType,class CBitmapInfoFront * *) Unknown
dcomp.dll!CCompositionSurface::Create() Unknown
dcomp.dll!CSurfaceFactory::CreateSurface(unsigned int,unsigned int,enum DXGI_FORMAT,enum DXGI_ALPHA_MODE,struct IDCompositionSurface * *) Unknown
dcomp.dll!CDevice::CreateSurface(unsigned int,unsigned int,enum DXGI_FORMAT,enum DXGI_ALPHA_MODE,struct IDCompositionSurface * *) Unknown
Windows.UI.Xaml.dll!DCompSurface::InitializeSurface() Unknown
Windows.UI.Xaml.dll!DCompSurface::Create() Unknown
Windows.UI.Xaml.dll!DCompTreeHost::CreateSurface() Unknown
Windows.UI.Xaml.dll!HWTextureManager::CreateTexture() Unknown
Windows.UI.Xaml.dll!D2DTextDrawingContext::HWBuildGlyphRunTexture() Unknown
Windows.UI.Xaml.dll!D2DTextDrawingContext::HWBuildGlyphRunTextures() Unknown
Windows.UI.Xaml.dll!D2DTextDrawingContext::HWRender(class xvector<struct IDCompositionPrimitivePartner *> *,struct HWTextRenderParams const &,class SolidColorBrushClone *) Unknown
Windows.UI.Xaml.dll!ParagraphDrawingContext::HWRenderContent() Unknown
Windows.UI.Xaml.dll!ContainerDrawingContext::HWRenderContent() Unknown
Windows.UI.Xaml.dll!CRichTextBlockOverflow::HWRenderContent(class xvector<struct IDCompositionPrimitivePartner *> *,struct HWTextRenderParams const &,class SolidColorBrushClone *) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildrenDefault(class CUIElement *,struct HWRenderParams const &,unsigned int) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderChildren(class CUIElement *,struct HWRenderParams const &) Unknown
Windows.UI.Xaml.dll!HWWalk::RenderContentAndChildren() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderProperties() Unknown
Windows.UI.Xaml.dll!HWWalk::Render() Unknown
Windows.UI.Xaml.dll!HWWalk::RenderRootImpl(class CUIElement *,class CRenderTarget *,unsigned int,unsigned int,float,class TransformAndClipStack *) Unknown
Windows.UI.Xaml.dll!CCoreServices::RenderWalk(class HWWalk *,struct ICoreRenderTarget *,class VisualTree *,unsigned int,unsigned int) Unknown
Windows.UI.Xaml.dll!CCoreServices::NWDrawTree() Unknown
Windows.UI.Xaml.dll!CCoreServices::NWDrawMainTree() Unknown
Windows.UI.Xaml.dll!CWindowRenderTarget::Draw() Unknown
Windows.UI.Xaml.dll!CXcpBrowserHost::OnTick() Unknown
Windows.UI.Xaml.dll!CXcpDispatcher::Tick() Unknown
Windows.UI.Xaml.dll!CXcpDispatcher::OnReentrancyProtectedWindowMessage() Unknown
Windows.UI.Xaml.dll!CXcpDispatcher::WindowProc() Unknown
user32.dll!UserCallWinProcCheckWow() Unknown
user32.dll!DispatchMessageWorker() Unknown
Windows.UI.dll!Windows::UI::Core::CDispatcher::WaitAndProcessMessages(void * hEventWait) Line 321 C++
Windows.UI.dll!Windows::UI::Core::CDispatcher::ProcessEvents(Windows::UI::Core::CoreProcessEventsOption options) Line 390 C++
Windows.UI.Xaml.dll!CJupiterWindow::RunCoreWindowMessageLoop(void) Unknown
Windows.UI.Xaml.dll!CJupiterControl::RunMessageLoop(void) Unknown
Windows.UI.Xaml.dll!DirectUI::DXamlCore::RunMessageLoop(void) Unknown
Windows.UI.Xaml.dll!DirectUI::FrameworkView::Run(void) Unknown
twinapi.appcore.dll!Windows::ApplicationModel::Core::CoreApplicationView::Run(void) Unknown
twinapi.appcore.dll!XWinRT::SecureVersionTag::TagManager::ChangeVersion(void) Unknown
SHCore.dll!CRandomAccessStreamOverStream::GetStream(struct IStream * *) Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknownfollowed by 5 times this exception:
Unhandled exception at 0x7524FB8F (combase.dll) in EpubReader.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x669ED758, 0x00000001).
with this call stack:
> kernel32.dll!RaiseFailFastException() Unknown
combase.dll!RoFailFastWithErrorContextInternal2(long,unsigned long,struct _STOWED_EXCEPTION_INFORMATION_V2 * * const) Unknown
combase.dll!RoFailFastWithErrorContextInternal(long,unsigned long,struct _STOWED_EXCEPTION_INFORMATION_V1 * * const) Unknown
Windows.UI.Xaml.dll!CCoreServices::NWDrawTree() Unknown
Windows.UI.Xaml.dll!CCoreServices::NWDrawMainTree() Unknown
Windows.UI.Xaml.dll!CWindowRenderTarget::Draw() Unknown
Windows.UI.Xaml.dll!CXcpBrowserHost::OnTick() Unknown
Windows.UI.Xaml.dll!CXcpDispatcher::Tick() Unknown
Windows.UI.Xaml.dll!CXcpDispatcher::OnReentrancyProtectedWindowMessage() Unknown
Windows.UI.Xaml.dll!CXcpDispatcher::WindowProc() Unknown
user32.dll!UserCallWinProcCheckWow() Unknown
user32.dll!DispatchMessageWorker() Unknown
Windows.UI.dll!Windows::UI::Core::CDispatcher::WaitAndProcessMessages(void * hEventWait) Line 321 C++
Windows.UI.dll!Windows::UI::Core::CDispatcher::ProcessEvents(Windows::UI::Core::CoreProcessEventsOption options) Line 390 C++
Windows.UI.Xaml.dll!CJupiterWindow::RunCoreWindowMessageLoop(void) Unknown
Windows.UI.Xaml.dll!CJupiterControl::RunMessageLoop(void) Unknown
Windows.UI.Xaml.dll!DirectUI::DXamlCore::RunMessageLoop(void) Unknown
Windows.UI.Xaml.dll!DirectUI::FrameworkView::Run(void) Unknown
twinapi.appcore.dll!Windows::ApplicationModel::Core::CoreApplicationView::Run(void) Unknown
twinapi.appcore.dll!XWinRT::SecureVersionTag::TagManager::ChangeVersion(void) Unknown
SHCore.dll!CRandomAccessStreamOverStream::GetStream(struct IStream * *) Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() UnknownWednesday, March 19, 2014 8:31 AM