[Photon-iOS_v3-2-5-1 clude] crashes when room list updated

edited February 2014 in Native
Hi,

I am facing random crash when user is in ideal state at game menu. other players are playing their game in different rooms which are randomly leaving & joining other rooms.

error trace is as follows:
Inside Client.cpp


[code2=cpp]case EventCode::ROOM_LIST_UPDATE:
{
Hashtable roomListUpdate(ValueObject<Hashtable>(eventData.getParameterForCode(ParameterCode::ROOM_LIST)).getDataCopy());
const JVector<Object>& keys = roomListUpdate.getKeys();
for(unsigned int i=0; i<keys.getSize(); i++)
{
Hashtable val(ValueObject<Hashtable>(roomListUpdate.getValue(keys)).getDataCopy());
bool removed = ValueObject<bool>(val.getValue(static_cast<nByte>(Properties::Room::REMOVED))).getDataCopy();
int index = mRoomNameList.getIndexOf(KeyObject<JString>(keys).getDataCopy());

if(!removed)
{
if(index == -1) //add room
{
JString roomNameValue = KeyObject<JString>(keys).getDataCopy();
mRoomList.addElement(createRoom(roomNameValue, val));
mRoomNameList.addElement(roomNameValue);
}
else // update room (only entries, which have been changed, have been sent)
RoomPropertiesCacher::cache(*mRoomList[index], val); //CRASH HERE - index value is 0
}
else if(index > -1) // remove room
{
destroyRoom(mRoomList);
mRoomList.removeElementAt(index);
mRoomNameList.removeElementAt(index);
}
}
mListener.onRoomListUpdate();
}

//


//Inside RoomPropertiesCacher.cpp
namespace ExitGames
{
namespace LoadBalancing
{
namespace Internal
{
void RoomPropertiesCacher::cache(Room& room, const Common::Hashtable& properties)
{
room.cacheProperties(properties); // EXC_BAD_ACCESS
}
}
}
}[/code2]

this is happening randomly so not able to find exact reason for crash.

Please let me know if you need more information.

Thanks,
Paresh

Comments

  • Hi Paresh.

    Please update to 3.2.5.3. This could be caused by a bug in 3.2.5.1 that has been fixed in the 3.2.5.3 release.
  • thanks I will try new release.
Sign In or Register to comment.