Init Buddy List memory error
Posted: 18 May 2014, 12:02
Hello.
I have occasional problems with buddy list initialization.
Tried on two latest server version 2.8.2 & 2.8.1 and two latest versions of C# client api 1.5.0 & 1.5.2 - result is the same.
I'm using Unity3D 4.3.3.
Problems reveals itself on iOS, after device is brought from sleeping mode, and reconnection is established.
Bug is very inconsistent, so I've used debug mode to crash the app on Buddy List init.
When client plugin is in debug mode:
app crashes once in approximately three launches right on first buddy list init, but there is no certain pattern.
Please see attached screenshots.
It's clear that app tries to allocate 1gb of memory on m_Sfs2X_Controllers_SystemController_FnInitBuddyList_Sfs2X_Bitswarm_IMessage.
Buddy list dump looks the same if app is running normally of crashed, (2 of 28 users showed):
Could it be so, that something is not yet initialized when we try to init buddy list?
In non-debug mode, after going back from sleep on ios, it can work just fine for 10 times, and then crash on 11th with very same reason.
Could you please look at things at your end? Or suggest direction to move further on our side..
Thanks.
Update:
Just tested in debug mode with new user, who has no buddies. xCode log just before the crash:
P.S. Could you please move this topic to Unity C# thread? Thanks.
I have occasional problems with buddy list initialization.
Tried on two latest server version 2.8.2 & 2.8.1 and two latest versions of C# client api 1.5.0 & 1.5.2 - result is the same.
I'm using Unity3D 4.3.3.
Problems reveals itself on iOS, after device is brought from sleeping mode, and reconnection is established.
Bug is very inconsistent, so I've used debug mode to crash the app on Buddy List init.
When client plugin is in debug mode:
Code: Select all
m_sfx = new SmartFox(true);Please see attached screenshots.
It's clear that app tries to allocate 1gb of memory on m_Sfs2X_Controllers_SystemController_FnInitBuddyList_Sfs2X_Bitswarm_IMessage.
Buddy list dump looks the same if app is running normally of crashed, (2 of 28 users showed):
Code: Select all
[SFS - DEBUG] Handling New Packet of size 485
[SFS - DEBUG] Handling Header Size. Length: 484 (small)
[SFS - DEBUG] Data size is 482
[SFS - DEBUG] Handling Data: 482, previous state: 0/482
[SFS - DEBUG] <<< Packet Complete >>>
[SFS - INFO] Message: InitBuddyList { Message id: 200 }
{ Dump: }
(sfs_array) mv:
(sfs_array)
(utf_string) $__BV_STATE__
(byte) 4
(utf_string) Available
(utf_string_array) bs: [System.String[]]
(sfs_array) bl:
(sfs_array)
(int) -1
(utf_string) user5.1393015114019
(bool) False
(sfs_array)
(sfs_array)
(utf_string) $__BV_STATE__
(byte) 4
(utf_string) Available
(sfs_array)
(int) -1
(utf_string) user3.1392503800337
(bool) False
(sfs_array)
(sfs_array)
(utf_string) $__BV_STATE__
(byte) 4
(utf_string) AvailableCould it be so, that something is not yet initialized when we try to init buddy list?
In non-debug mode, after going back from sleep on ios, it can work just fine for 10 times, and then crash on 11th with very same reason.
Could you please look at things at your end? Or suggest direction to move further on our side..
Thanks.
Update:
Just tested in debug mode with new user, who has no buddies. xCode log just before the crash:
Code: Select all
[SFS - INFO] Data Read: Binary Size: 160
80 00 44 12 00 03 00 01 61 03 00 c8 00 01 63 02 ..D.....a.....c.
00 00 01 70 12 00 03 00 02 6d 76 11 00 00 00 02 ...p.....mv.....
62 73 10 00 03 00 09 41 76 61 69 6c 61 62 6c 65 bs.....Available
00 04 41 77 61 79 00 08 4f 63 63 75 70 69 65 64 ..Away..Occupied
00 02 62 6c 11 00 00 80 00 56 12 00 03 00 01 61 ..bl.....V.....a
03 00 cc 00 01 63 02 00 00 01 70 12 00 02 00 02 .....c....p.....
62 6e 08 00 13 55 73 65 72 39 2e 31 34 30 30 34 bn...User9.14004
31 33 32 39 32 33 33 36 00 02 62 76 11 00 01 11 13292336..bv....
00 03 08 00 0d 24 5f 5f 42 56 5f 53 54 41 54 45 .....$__BV_STATE
5f 5f 02 04 08 00 09 41 76 61 69 6c 61 62 6c 65 __.....Available
[SFS - DEBUG] Handling New Packet of size 160
[SFS - DEBUG] Handling Header Size. Length: 159 (small)
[SFS - DEBUG] Data size is 68
[SFS - DEBUG] Handling Data: 157, previous state: 0/68
[SFS - DEBUG] <<< Packet Complete >>>
[SFS - INFO] Message: InitBuddyList { Message id: 200 }
{ Dump: }
(sfs_array) mv:
(utf_string_array) bs: [System.String[]]
(sfs_array) bl: