Async HTTPSocket Crashing

Has anyone else had problems using the asynchronous methods and events of the HTTPSocket on OSX? We have been using the asynchronous Get and Post methods just fine on Windows but on OSX, we get a hard crash. The Mac OSX dump indicates this is likely occurring somewhere within the Xojo framework. Any ideas on how to fix this?

Exception Codes: KERN_INVALID_ADDRESS at 0x0000000040cf4970

VM Regions Near 0x40cf4970:
    ATS (font support)     0000000011d79000-0000000013cf9000 [ 31.5M] rw-/rwx SM=COW  
    __TEXT                 000000008fece000-000000008ff01000 [  204K] r-x/rwx SM=COW  /usr/lib/dyld

Thread 0 Crashed:: Dispatch queue:
0   com.xojo.XojoFramework        	0x0099a9d0 0x8ca000 + 854480
1   com.xojo.XojoFramework        	0x00a7783b 0x8ca000 + 1759291
3      	0x93445863 __CFRunLoopDoTimer + 1395
4      	0x934c006d __CFRunLoopDoTimers + 349
5      	0x933fd353 __CFRunLoopRun + 1779
6      	0x933fc9ea CFRunLoopRunSpecific + 394
7      	0x933fc84b CFRunLoopRunInMode + 123
8           	0x9990fb5d RunCurrentEventLoopInMode + 259
9           	0x9990f8e2 ReceiveNextEventCommon + 526
10           	0x9990f6bd _BlockUntilNextEventMatchingListInModeWithFilter + 92
11              	0x96daa349 _DPSNextEvent + 1602
12              	0x96da9870 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
13  com.xojo.XojoFramework        	0x0090a4ba 0x8ca000 + 263354
14  com.xojo.XojoFramework        	0x0090a520 0x8ca000 + 263456

We’re pretty sure this is being triggered by the asynchronous sockets. If we switch to using synchronous sockets the crashes go away. Of course, that has its own set of problems, which is why we wanted to use the async versions.

Could you post the whole crash log?

We figured out a solution. Using the newer Xojo.Net.HTTPSocket works fine. The classic framework seems to have some bugs in the HTTPSocket.

Exactly the opposite is true for me. I’ve had a dickens of a time getting the new sockets to work the way I need them to, while the classic framework sockets work perfectly for me.


I think the vast majority of people are happy using the new framework HTTPSocket. The only portion that can’t in the current release (as Kimball points out) is if you use them from Windows, and then- try and use them from a Thread. Otherwise I think they’re functioning well on each platform in the current releases.

Posting the crash log somewhere would give us a place to start in terms of fixing them. Right now this is the first I’ve heard of such a crash.