Fresh install - issues with missing GNUstep/Library

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fresh install - issues with missing GNUstep/Library

Riccardo Mottola-5
Hi,

I did a total fresh install of GNUstep (had to reinstall everything on
my Raspberry).
For simplicity I used xlib, I only need a minimal GUI.

I get this trace when starting ProjectCenter:

pi@RaspberryPI1 ~/code/apps-projectcenter $ ProjectCenter
2020-06-16 09:00:46.810 ProjectCenter[28356:28356] styleoffsets ...
guessing offsets
2020-06-16 09:00:46.829 ProjectCenter[28356:28356] styleoffsets ...
guessing offsets
2020-06-16 09:00:46.974 ProjectCenter[28356:28356] Unsupported context
depth 24
2020-06-16 09:00:47.413 ProjectCenter[28356:28356] Library directory
'/home/pi/GNUstep/Library' not available!
2020-06-16 09:00:47.416 ProjectCenter[28356:28356] File NSData.m: 287.
In readContentsOfFile Open ((null)) attempt failed - bad path
2020-06-16 09:00:47.418 ProjectCenter[28356:28356] No font cache
available - building new one - this may take several seconds (or minutes
on a slow machine with lots of fonts)
2020-06-16 09:00:47.422 ProjectCenter[28356:28356] Running
/GNUstep/System/Tools/font_cacher
ProjectCenter: Uncaught exception NSInvalidArgumentException, reason:
Tried to init array with nil object


I think the depth24 context is not relevant (although, Fred... nothing
strange in this setup, the display is exported)

I think the whole failure is that the user has no gnustep preference
directory.
usually no font_cacher is run either, xlib only and perhaps only on
remote display?

Maybe it fails because *both* GNUstep and GNUstep/Library have to be
created (whole path).

I suppose it should be created automatically?
I created manually GNUstep/Library and font cacher started withoutissuesl.

Riccardo

Reply | Threaded
Open this post in threaded view
|

Re: Fresh install - issues with missing GNUstep/Library

Fred Kiefer


> Am 16.06.2020 um 12:44 schrieb Riccardo Mottola <[hidden email]>:
>
> Hi,
>
> I did a total fresh install of GNUstep (had to reinstall everything on my Raspberry).
> For simplicity I used xlib, I only need a minimal GUI.
>
> I get this trace when starting ProjectCenter:
>
> pi@RaspberryPI1 ~/code/apps-projectcenter $ ProjectCenter
> 2020-06-16 09:00:46.810 ProjectCenter[28356:28356] styleoffsets ... guessing offsets
> 2020-06-16 09:00:46.829 ProjectCenter[28356:28356] styleoffsets ... guessing offsets
> 2020-06-16 09:00:46.974 ProjectCenter[28356:28356] Unsupported context depth 24
> 2020-06-16 09:00:47.413 ProjectCenter[28356:28356] Library directory '/home/pi/GNUstep/Library' not available!
> 2020-06-16 09:00:47.416 ProjectCenter[28356:28356] File NSData.m: 287. In readContentsOfFile Open ((null)) attempt failed - bad path
> 2020-06-16 09:00:47.418 ProjectCenter[28356:28356] No font cache available - building new one - this may take several seconds (or minutes on a slow machine with lots of fonts)
> 2020-06-16 09:00:47.422 ProjectCenter[28356:28356] Running /GNUstep/System/Tools/font_cacher
> ProjectCenter: Uncaught exception NSInvalidArgumentException, reason: Tried to init array with nil object
>
>
> I think the depth24 context is not relevant (although, Fred... nothing strange in this setup, the display is exported)
>
> I think the whole failure is that the user has no gnustep preference directory.
> usually no font_cacher is run either, xlib only and perhaps only on remote display?
>
> Maybe it fails because *both* GNUstep and GNUstep/Library have to be created (whole path).
>
> I suppose it should be created automatically?
> I created manually GNUstep/Library and font cacher started withoutissuesl.
>
> Riccardo
>


In font_cache we have this code:


paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
                                              NSUserDomainMask, YES);
  if ((paths != nil) && ([paths count] > 0))
    {
      path = [paths objectAtIndex: 0];
    }
  else
    {
      NSLog(@"  No valid path for cached information exists. You ");
      NSLog(@"  should create ~/GNUstep/Library by hand");
      return nil;
    }

This makes it unlikely that the failure was in font_cache. More likely other code in the library tried to access this directory. A stacktrace of the exception would have helped.

Fred
Reply | Threaded
Open this post in threaded view
|

Re: Fresh install - issues with missing GNUstep/Library

Riccardo Mottola-5
Hi,

Fred Kiefer wrote:

>> Maybe it fails because*both*  GNUstep and GNUstep/Library have to be created (whole path).
>>
>> I suppose it should be created automatically?
>> I created manually GNUstep/Library and font cacher started withoutissuesl.
>>
>> Riccardo
>>
>
> In font_cache we have this code:
>
>
> paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
>                                                NSUserDomainMask, YES);
>    if ((paths != nil) && ([paths count] > 0))
>      {
>        path = [paths objectAtIndex: 0];
>      }
>    else
>      {
>        NSLog(@"  No valid path for cached information exists. You ");
>        NSLog(@"  should create ~/GNUstep/Library by hand");
>        return nil;
>      }
>
> This makes it unlikely that the failure was in font_cache. More likely other code in the library tried to access this directory. A stacktrace of the exception would have helped.


Actually the issue is exactly there. I was confused, because there is a
"twin" code in XGFontManager, but font_cacher gets run first.

Essentially your warnings about creating it never exectues.
NSSearchPathForDirectoriesInDomains returns the paths even if they do
not exist.
I added some code to extra-check, create it (and recheck if it fails...
just in case).

It is good to be kind to new users.

Riccardo