Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unhandled exception On IOS
25-03-2014, 10:17 AM (This post was last modified: 25-03-2014 10:29 AM by simonc.)
Post: #1
Unhandled exception On IOS
Code:
m_pProxy = new CpProxyUpnpOrgContentDirectory1Cpp(*m_pDevice);
    Functor callback = MakeFunctor(*this, &CMyClass::OnInitEvent);
    m_pProxy->SetPropertyInitialEvent(callback);
    m_pProxy->Subscribe();

void CMyClass::OnInitEvent()
{
    m_pProxy->PropertyTransferIDs(m_strTransferIDs);
}
failed, and errors shown as below:
Unhandled exception AssertionFailed at OpenHome/Net/ControlPoint/Upnp/EventUpnp.cpp:168 in thread EventSession 0

if use :
Code:
void CMyClass::OnInitEvent()
{
    m_pProxy->PropertyContainerUpdateIDs(m_strContainerUpdateIDs);
    m_pProxy->PropertySystemUpdateID(m_nSystemUpdateID);
}
It's ok.

CpProxyUpnpOrgConnectionManager1Cpp has the same problem, why?

waiting for your reply, thank you!
Find all posts by this user
25-03-2014, 11:10 AM
Post: #2
RE: Unhandled exception On IOS
The TransferIDs state variable is optional and isn't implemented by all media servers. If it was not set by the subscription's initial event, attempting to read its value throws a PropertyError exception. You need to catch this in your code:
Code:
#include <OpenHome/Net/Private/Service.h>
void CMyClass::OnInitEvent()
{
    try {
        m_pProxy->PropertyTransferIDs(m_strTransferIDs);
    } catch (PropertyError&) {}
}
Find all posts by this user
26-03-2014, 05:02 AM
Post: #3
RE: Unhandled exception On IOS
It's work, thank you!
(25-03-2014 11:10 AM)simonc Wrote:  The TransferIDs state variable is optional and isn't implemented by all media servers. If it was not set by the subscription's initial event, attempting to read its value throws a PropertyError exception. You need to catch this in your code:
Code:
#include <OpenHome/Net/Private/Service.h>
void CMyClass::OnInitEvent()
{
    try {
        m_pProxy->PropertyTransferIDs(m_strTransferIDs);
    } catch (PropertyError&) {}
}
Find all posts by this user


Forum Jump: