UDPController SIGABRT

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

Fellow
Posts: 10
Joined: 29 Feb 2012, 17:29

UDPController SIGABRT

Postby Fellow » 19 Nov 2013, 22:41

Hi,

We want to update our iOS SFS library from 1.1.5 to 1.2.1 but we are running into a problem.
The UDPController crashes when trying to connect. The attachment shows the crash.

This is our setup:

Code: Select all


- (void)initializeSF
{
    _smartFox = [SmartFox2XClient smartFoxWithDebugMode:NO delegate:self];
    [_smartFox connect:_server port:_port];
}

- (void)onConnection:(SFSEvent *)evt
{
    [_smartFox send:[LoginRequest requestWithUserName:_username
                                             password:[_password sha256]
                                             zoneName:ZONE
                                               params:param]];
}

- (void)onLogin:(SFSEvent *)evt
{
    [_smartFox initUDP:_server :9933];
}

- (void)onUDPSocketConnect:(SFSEvent *)evt
{
    [self performRoomJoin];
}




Here's the debug info just before the crash:

Code: Select all

2013-11-19 14:05:35.025 DevProject[2975:60b] Trying to initialize the UDP controller..
2013-11-19 14:05:35.027 DevProject[2975:60b] [SFS - INFO]Data Read: Binary Size: 57
80 00 36 12 00 03 00 01 61 03 00 0d 00 01 63 02    ..6.....a.....c.
01 00 01 70 12 00 02 00 01 63 08 00 01 69 00 01    ...p.....c...i..
70 12 00 03 00 01 61 03 00 08 00 01 76 08 00 03    p.....a.....v...
31 2e 32 00 01 69 03 00 00                         1.2..i...       
2013-11-19 14:05:35.032 DevProject[2975:60b] [SFS - INFO]{ Message id: 13 }
{Dump: }

   (utf_string) c: i
   (sfs_object) p:
      (short) a: 8
      (utf_string) v: 1.2
      (short) i: 0
   
2013-11-19 14:05:35.037 DevProject[2975:60b] [SFS - INFO]UDP Handshake written: Binary Size: 36
80 00 21 12 00 04 00 01 69 05 00 00 00 00 00 00    ..!.....i.......
00 01 00 01 75 04 00 00 00 15 00 01 63 02 01 00    ....u.......c...
01 68 02 01                                        .h..   


Any help on this issue would be very appreciated.

Thanks,
Jonas
Attachments
Screen Shot 2013-11-19 at 1.58.52 PM.png
UDPController_SIGABRT_crash
(179.34 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UDPController SIGABRT

Postby Lapo » 20 Nov 2013, 10:03

Hi,
thanks for reporting.

Also are you testing in the emulator or on a device?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UDPController SIGABRT

Postby Lapo » 20 Nov 2013, 10:43

UPDATE: I was able to reproduce the issue, we're now looking into it. I'll post an update as soon as possible.

Minor suggestion. Instead of this:

Code: Select all

[_smartFox initUDP:_server :9933];


you can use this:

Code: Select all

[_smartFox initUDP:_smartFox.config.host :_smartFox.config.port];

in other words you can read the configuration from the API directly.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
Fellow
Posts: 10
Joined: 29 Feb 2012, 17:29

Re: UDPController SIGABRT

Postby Fellow » 20 Nov 2013, 19:11

Thanks for the update.

Same issue on both the device and the simulator.

Some more info:

Code: Select all

2013-11-20 10:37:44.683 DevProject[11447:a0b] [SFS - INFO]UDP Handshake written: Binary Size: 36
80 00 21 12 00 04 00 01 69 05 00 00 00 00 00 00    ..!.....i.......
00 01 00 01 75 04 00 00 00 1a 00 01 63 02 01 00    ....u.......c...
01 68 02 01                                        .h..           
DevProject(11447,0x4fd1a28) malloc: *** error for object 0xe5302b0: double free
*** set a breakpoint in malloc_error_break to debug


Thanks!
Jonas
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UDPController SIGABRT

Postby Lapo » 28 Nov 2013, 09:14

UPDATE: we have fixed the problem and have completed a number of tests.
It would be great if you could test it too and confirm that the problem is fixed in your specific case too.

You can download the updated framework from here.

Let us know your feedback.
Lapo

--

gotoAndPlay()

...addicted to flash games
Fellow
Posts: 10
Joined: 29 Feb 2012, 17:29

Re: UDPController SIGABRT

Postby Fellow » 28 Nov 2013, 22:21

I've updated the library to 1.2.2 and the issue seems fixed!

Thanks for the update.

Jonas
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UDPController SIGABRT

Postby Lapo » 29 Nov 2013, 08:49

Thanks for the feedback, we have finished testing and we'll publish the new update in the next days.
Lapo

--

gotoAndPlay()

...addicted to flash games
dangtao
Posts: 2
Joined: 20 Nov 2013, 07:06

Re: UDPController SIGABRT

Postby dangtao » 02 Dec 2013, 07:23

Fellow wrote:I've updated the library to 1.2.2 and the issue seems fixed!

Thanks for the update.

Jonas


I came across the same issue and nothing's changed when I've updated the library to 1.2.2.

2013-12-02 14:44:04.473 SpriteWalkthrough[3644:70b] login success
2013-12-02 14:44:04.942 SpriteWalkthrough[3644:70b] [SFS - INFO]UDP Handshake written: Binary Size: 36
80 00 21 12 00 04 00 01 69 05 00 00 00 00 00 00 ..!.....i.......
00 01 00 01 75 04 00 00 00 07 00 01 63 02 01 00 ....u.......c...
01 68 02 01 .h..
SpriteWalkthrough(3644,0x23d41a8) malloc: *** error for object 0x98612d0: double free
*** set a breakpoint in malloc_error_break to debug

my code:
- (void)onLogin:(SFSEvent *)evt
{
NSLog(@"login success");

// init UDP
[self.sfsClient initUDP:@"192.168.1.105" :9933];
}

I do not know how to fix. please give me a hand. thanks.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UDPController SIGABRT

Postby Lapo » 02 Dec 2013, 08:32

Are you sure you're using version 1.2.2?
Have you double checked by printing out the version number in the console?
Lapo

--

gotoAndPlay()

...addicted to flash games
dangtao
Posts: 2
Joined: 20 Nov 2013, 07:06

Re: UDPController SIGABRT

Postby dangtao » 02 Dec 2013, 09:11

Lapo wrote:Are you sure you're using version 1.2.2?
Have you double checked by printing out the version number in the console?


Yes, you are right.
I forgot to remove the old path of version 1.2.1...
Now, it's working. Thanks for replying ^^
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UDPController SIGABRT

Postby Lapo » 02 Dec 2013, 10:05

Great, thanks.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UDPController SIGABRT

Postby Lapo » 02 Dec 2013, 10:54

The API 1.2.2 are now fully available for download.
http://www.smartfoxserver.com/download/sfs2x#p=client
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 19 guests