2024-11-21 12:31 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002787NetSurfGTK-specificpublic2024-02-25 21:43
Reporterhappysmash27 
Assigned ToVincent Sanders 
SeveritycrashReproducibilityalways 
StatusclosedResolutionfixed 
PlatformLinuxOSOS Version
Product Version3.10 
Target Version3.11Fixed in Version3.11 
Summary0002787: Unable to find resource pageinfo.gtk2.ui on resource path
DescriptionAfter running "make" on my system, running `./netsurf/nsgtk2 -v` fails with the following messages:

(0.000000) [INFO netsurf] frontends/gtk/gui.c:990 get_config_home: "/home/happysmash27/.config/netsurf"
(0.000027) [INFO netsurf] utils/log.c:268 nslog_init: NetSurf version '3.10 (24th May 2020)'
(0.000041) [INFO netsurf] utils/log.c:279 nslog_init: NetSurf on <Linux>, node <computer-pig.net>, release <5.7.8-gentoo>, version <#10 SMP Sun Jul 26 00:42:56 PDT 2020>, machine <x86_64>
(0.000216) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/netsurf.gtk2.ui
(0.000246) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/tabcontents.gtk2.ui
(0.000284) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/password.gtk2.ui
(0.000307) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/toolbar.gtk2.ui
(0.000335) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/downloads.gtk2.ui
(0.000355) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/globalhistory.gtk2.ui
(0.000374) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/localhistory.gtk2.ui
(0.000393) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/options.gtk2.ui
(0.000419) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/hotlist.gtk2.ui
(0.000451) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/cookies.gtk2.ui
(0.000481) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/viewdata.gtk2.ui
(0.000507) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/warning.gtk2.ui
(0.000551) [INFO netsurf] frontends/gtk/resources.c:261 init_resource: Unable to find resource pageinfo.gtk2.ui on resource path
GTK resources failed to initialise (NotFound)
Steps To ReproduceIf using Gentoo, try to install Netsurf in Portage (which will install all its dependencies).

After the package manager build fails (that's a separate bug, I think), download the Netsurf 3.10 source and run `make` in the root of the source.

Run `./netsurf/nsgtk2` or `./netsurf/nsgtk2 -v` while in Sway (a Wayland compositor).
Additional InformationGCC version: 8.4.0

GTK+ 2 version: 2.24.32-r1
TagsNo tags attached.
Fixed in CI build #5196
Reported in CI build #
URL of problem page
Attached Files

-Relationships
+Relationships

-Notes
happysmash27

~0002279

happysmash27 (reporter)

The crash also occurs in i3wm, so I don't think it is a Wayland-specific problem.
happysmash27

~0002280

happysmash27 (reporter)

The same error also appears if I move ~/.config/netsurf to ~/.config/netsurf_old to get a fresh config:

% ./netsurf/nsgtk2 -v
(0.000000) [INFO netsurf] frontends/gtk/gui.c:1003 create_config_home: Attempting to create configuration directory
(0.000028) [INFO netsurf] frontends/gtk/gui.c:1039 create_config_home: "/home/happysmash27/.config/netsurf"
(0.000037) [INFO netsurf] utils/log.c:268 nslog_init: NetSurf version '3.10 (24th May 2020)'
(0.000052) [INFO netsurf] utils/log.c:279 nslog_init: NetSurf on <Linux>, node <computer-pig.net>, release <5.7.8-gentoo>, version <#10 SMP Sun Jul 26 00:42:56 PDT 2020>, machine <x86_64>
(0.000250) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/netsurf.gtk2.ui
(0.000285) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/tabcontents.gtk2.ui
(0.000316) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/password.gtk2.ui
(0.000346) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/toolbar.gtk2.ui
(0.000377) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/downloads.gtk2.ui
(0.000406) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/globalhistory.gtk2.ui
(0.000435) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/localhistory.gtk2.ui
(0.000463) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/options.gtk2.ui
(0.000488) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/hotlist.gtk2.ui
(0.000561) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/cookies.gtk2.ui
(0.000607) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/viewdata.gtk2.ui
(0.000639) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/warning.gtk2.ui
(0.000684) [INFO netsurf] frontends/gtk/resources.c:261 init_resource: Unable to find resource pageinfo.gtk2.ui on resource path
GTK resources failed to initialise (NotFound)

Looking at the source code, the error appears to be related to pageinfo.gtk2.ui not being found in the respath variable to init_resource... but what is the respath variable that is passed to the init_resource function? I'm not sure whether to try to find whichever file links to it, or to just use printf. Maybe I should try printf first.
happysmash27

~0002281

happysmash27 (reporter)

On second thought, maybe changing the log entry to the following might work:

NSLOG(netsurf, INFO, "Unable to find resource %s on resource path %s",
          resource->name, respath);

And... it seems to work!

(0.000000) [INFO netsurf] frontends/gtk/gui.c:990 get_config_home: "/home/happysmash27/.config/netsurf"
(0.000026) [INFO netsurf] utils/log.c:268 nslog_init: NetSurf version '3.10 (24th May 2020)'
(0.000034) [INFO netsurf] utils/log.c:279 nslog_init: NetSurf on <Linux>, node <computer-pig.net>, release <5.7.8-gentoo>, version <#10 SMP Sun Jul 26 00:42:56 PDT 2020>, machine <x86_64>
(0.000217) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/netsurf.gtk2.ui
(0.000246) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/tabcontents.gtk2.ui
(0.000268) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/password.gtk2.ui
(0.000289) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/toolbar.gtk2.ui
(0.000320) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/downloads.gtk2.ui
(0.000343) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/globalhistory.gtk2.ui
(0.000367) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/localhistory.gtk2.ui
(0.000390) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/options.gtk2.ui
(0.000407) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/hotlist.gtk2.ui
(0.000430) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/cookies.gtk2.ui
(0.000452) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/viewdata.gtk2.ui
(0.000470) [INFO netsurf] frontends/gtk/resources.c:240 init_resource: Found gresource path /org/netsurf/warning.gtk2.ui
(0.000503) [INFO netsurf] frontends/gtk/resources.c:261 init_resource: Unable to find resource pageinfo.gtk2.ui on resource path /home/happysmash27/.config/netsurf
GTK resources failed to initialise (NotFound)

Now the question is: How exactly is it supposed to find resources in ~/.config/netsurf? Or am I understanding this wrong?
happysmash27

~0002282

happysmash27 (reporter)

Correction:

NSLOG(netsurf, INFO, "Unable to find resource %s on resource path %s",
          resource->name, respath);

does not work. I forgot to edit it, but the actual line of code that works for logging is the following:

NSLOG(netsurf, INFO, "Unable to find resource %s on resource path %s",
          resource->name, *respath);
happysmash27

~0002283

happysmash27 (reporter)

Apparently, the entrypoint for this error is approximately line 1263 of gui.c:

/* initialise the gtk resource handling */
ret = nsgtk_init_resources(respaths);
if (ret != NSERROR_OK) {
    fprintf(stderr, "GTK resources failed to initialise (%s)\n",
        messages_get_errorcode(ret));
    return 1;
}

nsgtk_init_resources is, of course, on line 430 of resources.c.
happysmash27

~0002284

happysmash27 (reporter)

I think I just figured out what I was understanding wrong. respath is a pointer to a pointer of chars (i.e, an array of strings), not a pointer to chars (i.e, just one string). So of course that logging method doesn't work to give the full picture. Now the question is: where can I find the amount of strings to get a more full debug output?
Vincent Sanders

~0002285

Vincent Sanders (administrator)

This occurs because the gtk compiled in resource file was missing a reference to the gtk2 pageinfo ui template resulting in the resource being unavailable at runtime.

fixed with commit http://git.netsurf-browser.org/netsurf.git/commit/?id=410cb9a8fd9354b4c3b95824e135b64cc002986f on master, this could also be applied to the 3.10 release files to solve the runtime issue.
Vincent Sanders

~0002437

Vincent Sanders (administrator)

Issue resolved in 3.11 release
+Notes

-Issue History
Date Modified Username Field Change
2020-08-09 04:30 happysmash27 New Issue
2020-08-09 04:35 happysmash27 Note Added: 0002279
2020-08-09 04:46 happysmash27 Note Added: 0002280
2020-08-09 04:51 happysmash27 Note Added: 0002281
2020-08-09 05:01 happysmash27 Note Added: 0002282
2020-08-09 05:08 happysmash27 Note Added: 0002283
2020-08-09 05:11 happysmash27 Note Added: 0002284
2020-08-15 08:54 Vincent Sanders Assigned To => Vincent Sanders
2020-08-15 08:54 Vincent Sanders Reproducibility have not tried => always
2020-08-15 08:54 Vincent Sanders Status new => resolved
2020-08-15 08:54 Vincent Sanders Resolution open => fixed
2020-08-15 08:54 Vincent Sanders Fixed in Version => 3.11
2020-08-15 08:54 Vincent Sanders Target Version => 3.11
2020-08-15 08:54 Vincent Sanders Fixed in CI build # => 5196
2020-08-15 08:54 Vincent Sanders Note Added: 0002285
2024-02-25 21:43 Vincent Sanders Status resolved => closed
2024-02-25 21:43 Vincent Sanders Note Added: 0002437
+Issue History