bugGNUstep - Bugs: bug #11100, Hang on...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11100: Hang on +dictionaryWithContentsOfURL:

Submitted by:  None
Submitted on:  Mon 22 Nov 2004 10:41:29 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Tue 23 Nov 2004 02:03:29 PM UTC, comment #6:

OK .. looks like an old bug already fixed in CVS then.

Richard Frith-Macdonald <CaS>
Project Member
Tue 23 Nov 2004 12:19:26 PM UTC, comment #5:

This can be closed, my mistake. I was testing this on a system that hadn't been updated in 2 months, it worked on the machine that was updated 2 days ago.

Anonymous
Tue 23 Nov 2004 04:36:08 AM UTC, comment #4:

Further to this ... I do have GNUstep-base on an apple laptop ... and the Darwin operating system there is a BSD derivative. I've just run the test program on that machine and it worked fine there too, suggesting that the problem may be specific to the OS version you are running or even too your machine.

Richard Frith-Macdonald <CaS>
Project Member
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.

Richard Frith-Macdonald <CaS>
Project Member
Mon 22 Nov 2004 10:15:17 PM UTC, comment #2:

I am using the CVS from a day and a half ago, and you may use http://www.fuqn.ca/foo.plist as a source of the property list I was using.

Anonymous
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.

Richard Frith-Macdonald <CaS>
Project Member
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.

Anonymous

 

Attached Files
file #2041:  test.m added by None (317B - application/octet-stream - Simple test program used to create above problem.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 23 Nov 2004 02:03:29 PM UTCCaSOpen/ClosedOpen=>Closed
Mon 22 Nov 2004 12:16:06 PM UTCCaSStatusNone=>Works For Me
Mon 22 Nov 2004 10:41:29 AM UTCNoneAttached File-=>Added test.m, #1903

Back to the top


Powered by Savane 3.1-cleanup1