discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Path of GNUstep (Was: Re: Gnustep + mac + windows? Possib le?)


From: Richard Frith-Macdonald
Subject: Re: The Path of GNUstep (Was: Re: Gnustep + mac + windows? Possib le?)
Date: Mon, 23 Sep 2002 20:14:33 +0100

On Monday, September 23, 2002, at 07:49 PM, Chris B. Vetter wrote:

On Mon, 23 Sep 2002 19:19:50 +0100
Richard Frith-Macdonald <address@hidden> wrote:
On Monday, September 23, 2002, at 07:14 PM, Richard Frith-Macdonald
wrote:
On Monday, September 23, 2002, at 06:06 PM, Chris B. Vetter wrote:
Ok, I take that back - I'd rather see URL handling *WORK* than
having> something superfluous like themes.
What's wrong with URL handling?
Where there are bugs, we need good bug reports.
Better still, bug reports with testcases for the testsuite.
Ideally ... fixes too.

[...cut here...]

- (BOOL) checkURL
{
  NSURL *currentURL;
  NSData *data;

  currentURL = [NSURL URLWithString:
                      @"http:/www.foobar.org/PageWithAValid.plist"];
  data = [currenURL resourceDataUsingCache: NO];

  if( data )
    return YES;
  return NO;
}

[...cut here...]

This simple snipped will give you a nice clean core dump, at least on my
machine.

Not on any of my machines... what machine/OS/gnustep versions are you running?

AFAICT, the culprit is in NSURL's -URLHandleUsingCache:

[...cut here...]

- (NSURLHandle*) URLHandleUsingCache: (BOOL)shouldUseCache
{
  NSURLHandle   *handle = nil;

  if (shouldUseCache)
    {
      handle = [NSURLHandle cachedHandleForURL: self];
    }
  if (handle == nil)
    {
      Class     c = [NSURLHandle URLHandleClassForURL: self];

      if (c != 0)
        {
          handle = [[c alloc] initWithURL: self cached: shouldUseCache];
          AUTORELEASE(handle);
        }
    }
  return handle;
}

What is your reason for suggesting that this is the culprit?

[...cut here...]

BOTH,
  [NSURLHandle cachedHandleForURL: self];
and
   c = [NSURLHandle URLHandleClassForURL: self];

will dump core (a SIGSEGV, IIRC) upon being called.
Neither -cachedHandleForURL: nor -URLHandleClassForURL: are actually
entered.
I'm not sure what the problem is, as adding an

  NSLog(@"-> %@", [self absoluteURL])

does print the corrent URL.

How about a stack trace of where the crash is?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]