LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   gtk-2.21.6 "gtk-demo" no stock icons load when listed for viewing (no spam) (https://www.linuxquestions.org/questions/linux-software-2/gtk-2-21-6-gtk-demo-no-stock-icons-load-when-listed-for-viewing-no-spam-4175556245/)

debguy 10-15-2015 10:59 AM

gtk-2.21.6 "gtk-demo" no stock icons load when listed for viewing (no spam)
 
gtk+-2.21.6 "gtk-demo" no stock icons load when listed for viewing (it's supposed to show a list of stock icons OR use default stock icon if not found: instead it shows errors)

i've build a LFS (compiling all from source from lib termcap all to qt-everywhere and firefox). req'ed thousands of DiY fixes - which are everyday for me no problem. left with this one nagging bug. gtk2 no stock icons.

Code:

(lt-gtk-demo:28786): GLib-GIO-CRITICAL **: g_loadable_icon_load: assertion `G_IS_LOADABLE_ICON (icon)' failed

(lt-gtk-demo:28786): Gtk-WARNING **: Error loading theme icon 'gtk-about' for stock: Failed to load icon

(lt-gtk-demo:28786): Gtk-CRITICAL **: gtk_default_render_icon: assertion `base_pixbuf != NULL' failed

(there were other errors but that is first. also it's repeated 2x because loading default "missing icon" icon also fails)

briefly (several functions are called):

Code:

FILES: gtk-demo -> stock_browser.c -> gtkwidget.c -> gtk_iconfactory.c -> gtkicontheme.c

last function: icon_info_ensure_scale_and_pixbuf

icon_info_ensure_scale_and_pixbuf assumes any stock icon is pre-loaded into variable "foo->loadable", else is ->filename (crashes if you try substituting filename, you cannot simply add a filename even for testing). iiesap is the ONLY place that loads a pixbuf in all the functions they all lead to calling iiesap to do the loading.

EXPLAINING iiesap

to load stock icon all functions call iiesap, and iiesap only fills in struct icon_info->loadable icon_info->filename was used (by app). i have no icons because nothing ever even attempts (no code that even might) fill in ->loadable.

a good thought is "well copy icon name to filename, try static or global or strcpy to ptr ->filename", so what if it's a little slower it's get cached by linux right?" all these fail / segfault (meaning compilation / fixing all applications needing stock icons would be indicated, impossible to expect or do that).

so i'm back to: i need ->loadable set not by filename but by/from gtk_stock_list_ids->gtk_stock_lookup->gtk_icon_factory_lookup_default (which gets icon_info - but isn't meant to attempt ->loadable - these only do lookups). ->loadable is never attempted and i haven't even found code which appears to attempt it (noting it would not be called even if it were there: as i said, no code does anything except lead to expecting function icon_info_ensure_scale_and_pixbuf to do it)

obviously there's something missing, that's impossible, thus the QUESTION.

QUESTION:

the above is impossible it seems. why is everything expecting it to work? what could fix this i can't think of anything that would fix missing code. yet this was released in binary form by major distros and icons worked, so "supposedly that's impossible", and being impossible is why i post the QUESTION :) i said gtk-1.2 works so obviously stock icons are not impossible?

NOTES:

once ->loadable is set it is used to open icon_stream (stream file having icons) and pixbuf is then loaded by gdk from stream (as source of icon stream) and returned, glib/gdk loads pixi we'll assume it always succeeds). put another way: gtk caches icons (ie stock) but not filename type. an icon may be loaded by gtk). unix streams: "everything x is a file; passed params, memory, devices, network reads, everything"

gio/gloadableicon.c is immaterial as "loadable" was never loaded. gtk code infamously seldom cheks return values and continues on, gdk was called with null is why gdk error is shown, no glib blames please

MORE INDICATIONS: other than gtk-demo

firefore-20.0 (nightly) or 5 has no icons (but firefox-2 is fine, qt-4.74, all but gtk-2 is fine, even fvwm2 that uses gtk-2 seems to work (ships with own icons tho!)), and gtk-1 demos work and gnome-1 desktop works (have not tried 2,3). gtk-demos work excepting icon errors whenever loading stock icons. this is why i even tried gtk-demos: and the demo (build test) fails

also ... i've seen many questions on stackexchange and oracle about missing icons for gtk2 but never anything but a dodge - no answers, just hype like "oh you should upgrade to gtk3 why use 2?" or "reinstall your linux, you used pkg tool wrong" (debian sqeeze uses gtk2 - so the binaries they hacked apparently worked). all genericisms blaming poster for asking.

so, you could say "well fvwm depends on gtk2 and has icons" but it does not use stock icons. obviously there's allot of software (ie, scientific which cannot be simply "ported" by idiots) that use stock icons. i only guess firefox is one, i didn't chase that leopard yet :)

but in all, on the whole: gtk supposedly offers "service" to application programmers to take care of minor details like loading "copy paste" icon: and it's not doing it in many case, all said and done: it's not doing anything it advertises or only does so for special cases of chosen software (software that "bypasses normal rules").

BACKGROUND:

I've made an LFS using roughly year 2010 build toolchain pkgs and libs (newer on a few). Compiled and installed hundreds of pkgs from scratch. had thousands of software fixes todo to get it done. i have no strict rule other than to remain fully sourced and avoid phone-home software. (some pkgs do phone home and i'm looking into that in spare time: xml/sgml doc in build toolchain, firefox, gtk - the "well known hard to build" software tends to have phone-home hacks). gtk-2.9.4 is different from other fixes requires knowlege from someone who knows something about gtk-2.9.4 source code, dependencies, configuration - that is the part unknown)

debguy 10-15-2015 11:13 AM

i'd really like to get past this "one last bug" so i can move onto other things or newer versions - or just use the system with icons :) it's major because it effects many gtk2 software - for compatibility it's a must have and unavoidable. simply saying 1 works 3 is supposed to work is no good: there are allot of gtk2 based apps that aren't 1 or 3: as we all know gtk is totally unreliable as far as backward compatibility (an app written for 2 isn't even going to compile using 1 or 3)

i'd really like to get past this "one last bug" so i can move onto other things; being stuck on icons of all things after several hundred fully sourced pkg builds: just sucks

debguy 10-15-2015 11:44 AM

.


.

debguy 10-20-2015 01:44 PM

after adding printf and also later re-compiling all for debug and running gdb i came to the conclusion: gtk+-2.21.6 does NOT work - it never loads .png and .png are required for all theme/engines that are available for gtk+-2.21.6

i then (using my own LFS) went to gtk+-2.10.14 Gtk has been VERY much a problem child. i had NO GUIDE. Gtk/Gnome offer not depends list. i began 2.9.x, software complained. I went to 3, but found that's gnome3 related (cell/pad) and wouldnt help for gtk2 apps (incompatible). next i went latest gtk2: that was broken many ways. picked "in-betweens" and 2.21.6 was the first to work that "wasn't too new"

I uninstalled and re-installed all effected excepting gtk+-2.10.14 substitution. 80 builds (40 uninstall 40 install, include firefox 5 and 20) and it all went smoothly

I NOW HAVE ICONS

and i'm pretty sure my initial suspicion / complain was right on. 2.21.6 CANNOT display icons and many people asking saying they had no icons were NOT TOLD WHY.

WHY: gtk+-2.21.6 never even attempts to load .svg icons for gtk2 apps

it should have been A MAJOR VERSION BUMP it is not compatible in any way with 2.10 (2.12?)

there was NO HINT of this in changelogs. nothign on Gnome website for warning. Noting in README.

as someone "making a year 2010 LFS (squeeze LFS)" alone (no mainframe community help: just old pc and NOTHING to go by except debian depends when i was stumped): gtk (also ncurse) were simply obnoxious insofar as: time wasted, lack of any info why, sheer number of compiles to find stupid things and many bugs. hundreds of other authors/pkgs even ported from bsd did not do / did not leave such chaos

i think the problem was they hacked it to not work, didn't bother to tell anyone, and perhaps hoped it wouldn't work until "redhat/debian/google" were ready to make another "we are first release"

which i had NOT been aware of. there's not "README" on the gnome site explaining why pkg dates are all wrong, why versions of pkgs cannot be used to judge which lib to use (ie, gtk2 might depend on a lib that is using version 1.4.x - and no way to know this)

really: who deletes ability of a X11 wrapper that provides icons+widgets to X11 apps and deletes ability of all apps compiled for gtk2 to use stock icons WHILE MERELY BUMPING MINOR VERSION ? and says nothing ? and doesn't answer anyone when they ask ? (google it: many were never told)

i'm confused here and not ammused how icons: 30 years after X11 (motif and many others) supported them, it could be such a problem that software needs to be recompiles AND REWRITTEN especially for a minor version bump just to display: icons - the smallest of things

i'm sure there are many excuses but where are these excuses publicized so that people (outside of redhat debian google) know? you might even fear a conspiracy here. but let's give them a chance to answer ;)

-----------

or maybe someone can correct me? i still DO wish to know why 2.21.6 i have no icons - meaning that gtk+-2.21.6/demos/gtk-demo/gtk-demo works?

---------- Post added 10-20-15 at 02:45 PM ----------

(you had to know ncurses was a bitch: they told you so in the name and in the README :)

debguy 10-23-2015 10:53 PM

bump


All times are GMT -5. The time now is 12:08 AM.