Tue 23 Nov 2004 04:15:37 AM UTC, comment #3:
Thanks for the public URL.
I've tried using it with your test program, and it worked fine on my Debian GNU/Linux system.
So it looks like there may be a BSD specific problem... which is a problem for me as I don't have a BSD system to debug on.
You could try hacking base/Source/GSHTTPURLHandle.m to set the 'debug' flag when a handle is initialised so that your test program will log all I/O and you can get some idea of what is going on, but if that's not informative enough, the only real option I can see is either to insert lots of debugging statements in GSHTTPURLHandle.m or to step through under gdb to find out what is happening.
|
Mon 22 Nov 2004 12:16:06 PM UTC, comment #1:
I can't reproduce this ... but there are variuos possibilities -
Various versions of NSURL have had problems with detecting the ends of responses with some pages from some web servers.
There are no known problems with the CVS version, but you don't say whether you are using up to date code from CVS or another version of GNUstep.
Unless there is a public URL that can be used to demonstrate the problem with the latest code from CVS, my assumption would be that any torubles are already fixed in the current code.
|
Mon 22 Nov 2004 10:41:29 AM UTC, original submission:
Using the attached program, I'm experiencing a hang when calling +dictionaryWithContentsOfURL:. The URL contains a serialized property list, with one key/value pair: Foo = Bar; .. OSX reads it fine. Each time I run it through gdb, and then kill it (sometimes after a few seconds, sometimes several minutes pass before I kill it), it always ends up in a different location. However, it does share one thing in common, in each instances where I break out of the program and examine the backtrace, everything is the same until the next call after -[NSRunLoop limitDateForMode:] (any that come after that, could be as shown below, or NSDefaultMallocZone(), etc). Output of 'bt' from one instance when I stopped it (see note above) is below:
(gdb) bt
#0 0x28354aef in gettimeofday () from /lib/libc.so.5
#1 0x28152035 in GSTimeNow () at NSDate.m:133
#2 0x28155340 in -[NSGDate timeIntervalSinceNow] (self=0x8305fa8,
_cmd=0x282ac110) at NSDate.m:1423
#3 0x281b5417 in -[NSRunLoop limitDateForMode:] (self=0x8305d28,
_cmd=0x282ac080, mode=0x282ac244) at NSRunLoop.m:1754
#4 0x281b615c in -[NSRunLoop runMode:beforeDate:] (self=0x8305d28,
_cmd=0x282b3aa0, mode=0x282ac244, date=0x8345188) at NSRunLoop.m:2035
#5 0x281eac61 in -[NSURL resourceDataUsingCache:] (self=0x80a0968,
_cmd=0x2829ba70, shouldUseCache=1 '\001') at NSURL.m:1380
#6 0x2814955f in +[NSData dataWithContentsOfURL:] (self=0x2829b9e0,
_cmd=0x282af768, url=0x80a0968) at NSData.m:470
#7 0x281cc70c in -[NSString initWithContentsOfURL:] (self=0x806ec88,
_cmd=0x2829dfd8, url=0x80a0968) at NSString.m:1484
#8 0x28164026 in -[NSDictionary initWithContentsOfURL:] (self=0x80b0848,
_cmd=0x2829dfd8, aURL=0x80a0968) at NSDictionary.m:614
#9 0x28164312 in +[NSDictionary dictionaryWithContentsOfURL:] (
self=0x2829de20, _cmd=0x8059150, aURL=0x80a0968) at NSDictionary.m:664
#10 0x0804b339 in main () at test.m:6
#11 0x0804b1b2 in _start ()
System is a FreeBSD 5.2.1 system, have only tested this with apple's Foundation on osx, and GNUstep's on FreeBSD. Works on apples, doesn't on GNUsteps.
|