App crashing in emulator when starting because of

Monkey Forums/Monkey Bug Reports/App crashing in emulator when starting because of

Raul(Posted 2014) [#1]
becasue of IAPs..

If I do not try to init IAP is working fine.

Tested with v 79e.

BTW, in VS 2013 I use MixedPlatofrms because everytime I want to use an emulator Mixed Platforms is automatically selected. If I select ARM the other selection jumps on Device..

this is the standard init IAP code:
		_purchases = New JsonObject()
		_store = New MonkeyStore()
		_store.AddProducts(CONSUMABLES, 1)
		_store.OpenStoreAsync(Self)


this is the error I receive:
First-chance exception at 0x76DC210B in TaskHost.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x0786E878. HRESULT:0x805A0194

If there is a handler for this exception, the program may be safely continued.


and this appears in vs2013 debug window
>	MonkeyGame.PhoneComponent.dll!Concurrency::details::_ExceptionHolder::_RethrowUserException() Line 899	C++
 	MonkeyGame.PhoneComponent.dll!Concurrency::details::_Task_impl_base::_Wait() Line 1404	C++
 	MonkeyGame.PhoneComponent.dll!Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>::get() Line 3028	C++
 	MonkeyGame.PhoneComponent.dll!BBMonkeyStore::OpenStoreAsync::__l22::<lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> currentTask) Line 4815	C++
 	MonkeyGame.PhoneComponent.dll!std::_Callable_obj<void <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),0>::_ApplyX<void,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> >(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> && _V0) Line 431	C++
 	MonkeyGame.PhoneComponent.dll!std::_Func_impl<std::_Callable_obj<void <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),0>,std::allocator<std::_Func_class<void,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil> >,void,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil>::_Do_call(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> && _V0) Line 239	C++
 	MonkeyGame.PhoneComponent.dll!std::_Func_class<void,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil>::operator()(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> _Vx0) Line 515	C++
 	MonkeyGame.PhoneComponent.dll!Concurrency::details::_MakeTToUnitFunc::__l3::<lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> t) Line 2185	C++
 	MonkeyGame.PhoneComponent.dll!std::_Callable_obj<unsigned char <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),0>::_ApplyX<unsigned char,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> >(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> && _V0) Line 431	C++
 	MonkeyGame.PhoneComponent.dll!std::_Func_impl<std::_Callable_obj<unsigned char <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),0>,std::allocator<std::_Func_class<unsigned char,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil> >,unsigned char,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil>::_Do_call(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> && _V0) Line 239	C++
 	MonkeyGame.PhoneComponent.dll!std::_Func_class<unsigned char,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil>::operator()(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^> _Vx0) Line 515	C++
 	MonkeyGame.PhoneComponent.dll!Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>::_ContinuationTaskHandle<Windows::ApplicationModel::Store::ListingInformation ^,void,void <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>::_Continue(std::integral_constant<bool,1> __formal, Concurrency::details::_TypeSelectorNoAsync __formal) Line 3410	C++
 	MonkeyGame.PhoneComponent.dll!Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>::_ContinuationTaskHandle<Windows::ApplicationModel::Store::ListingInformation ^,void,void <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>::_Perform() Line 3318	C++
 	MonkeyGame.PhoneComponent.dll!Concurrency::details::_PPLTaskHandle<unsigned char,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>::_ContinuationTaskHandle<Windows::ApplicationModel::Store::ListingInformation ^,void,void <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>,Concurrency::details::_ContinuationTaskHandleBase>::operator()() Line 1213	C++
 	MonkeyGame.PhoneComponent.dll!Concurrency::details::_UnrealizedChore::_InvokeBridge<Concurrency::details::_PPLTaskHandle<unsigned char,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>::_ContinuationTaskHandle<Windows::ApplicationModel::Store::ListingInformation ^,void,void <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>,Concurrency::details::_ContinuationTaskHandleBase> >(Concurrency::details::_PPLTaskHandle<unsigned char,Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>::_ContinuationTaskHandle<Windows::ApplicationModel::Store::ListingInformation ^,void,void <lambda>(Concurrency::task<Windows::ApplicationModel::Store::ListingInformation ^>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorNoAsync>,Concurrency::details::_ContinuationTaskHandleBase> * _PChore) Line 4467	C++



marksibly(Posted 2014) [#2]
Have you read this?

http://www.monkey-x.com/Community/posts.php?topic=8438&post=86331&view=all#86331

>You have to click 'continue' here - as far as I can tell, it's just the way msvc/winrt works. See my reply to your bug report for more info. Note that this only happens when you run the app from msvc

It generally indicates the store is not setup correctly, for whatever reason, and your app is not able to connect with it. Does clicking continue allow your app to keep running?

Also, I *strongly* recommend getting a real device for testing, esp. for winrt/android.


Raul(Posted 2014) [#3]
Pressing on Continue will result in nothing.. The whole VS will crash.


marksibly(Posted 2014) [#4]
* What does your app do if store open fails?

* Have you tried iaptest in bananas/mak? What does it do? here, if I run it 'as is', I get: 1) app displays 'opening store'; 2) exception happens; 3) I click continue; 4) App continues with 'Store unavailable message'. This is with a real phone though - emulator just crashes for me these days.

* What windows phone OS version are you using? I'm actually still on 8.0 for BW compatibility testing reasons, and I'm still using the older VS express for windows phone. Just updating msvc2013 now...will then try installing windows 8.0 SDK, test, then upgrade phone, test etc. Fun day ahead!


marksibly(Posted 2014) [#5]
Ok , I successfully updated VS 2013 so I can now compile windows phone apps in it.

Again, there were no problems with iaptest - it worked both on the phone and in the emulator (which I also got working). By 'worked', I mean it threw and exception after the 'opening store...' message , but I could successfully continue the app by clicking 'continue', which left the app displaying 'store unavailable'.

Please try iaptest and let me know what happens.


Raul(Posted 2014) [#6]
I managed to make the BETA app and BETA iaps to work on the real device.
I think there was a mistake on the market.

I hope it will be the same on the actual app.