[Gtk-sharp-list] new Gdk.Pixbuf (svg_stream) fails on windows but works on unix

Billy Schoenberg wasbridge at gmail.com
Tue Oct 21 09:39:34 EDT 2008


Hello,
Whoa, now you are entering what I like to call the unknown zone.... for me I
try to read the error messages as best as I can and put the dll's its asking
for in the proper places.  There is also a file with the extension
.immodules that I think is important in processes like this.  For me its
located in the same directory as the .loaders file, but I have been using an
experimental medsphere installer.  If I was you I would go on a hunt for
your libcroco, and patch the build and send it along upstream.  Make sure
though that libcroco is cross platform, aka no improper PInvokes etc.

Billy

On Tue, Oct 21, 2008 at 12:15 PM, Thomas Wach
<th.wach at wach-it-solutions.de>wrote:

>
> Hello Billy,
>
> also a perfect hint! I inpsected my boxes for files named "*loaders*" and
> found them as
>
> Windows box ..: C:\Programme\Mono-2.0\etc\gtk-2.0\gdk-pixbuf.loaders
> Linux box.........: /etc/gtk-2.0/i386-redhat-linux-gnu/gdk-pixbuf.loaders
>
> Indeed, the file on the Windows box missed the entry for SVG.
> So I added a copy of the related section from the Linux box to the file on
> my Windows box as follows (modified the first line regaridng the file
> location analog to all other entries in my windows file):
>
> "c:/devel/target/gtk+-2.10.6/lib/gtk-2.0/2.10.0/loaders/svg_loader.dll"
> "svg" 2 "gtk20" "Scalable Vector Graphics"
> "image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml"
> "text/xml-svg" "image/svg+xml-compressed" ""
> "svg" "svgz" "svg.gz" ""
> " <svg" "*    " 100
> " <!DOCTYPE svg" "*             " 100
>
> So far, the Pixbuf.Loaders enumeration on my Windows box now shows the type
> svg!
>
> But trying to create a pixbuf from a svg-resource now leads me to the same
> problem as of direct loading svg-files:
> The given module cannot be found.
> In case of direct loading an file into an rsvg-object the complained module
> was lib-rsvg2.dll.
> In this case, creating a pixbuf from a svg-file the complained module is
> svg_loader.dll.
> But, of course, BOTH files exist in the correct place.
>
> "new Gdk.Pixbuf (svg-stream)" now leads to:
> GLib.GException: Bildlader-Modul konnte nicht geladen werden
> (pictureloader-module could not be loaded):
> C:\Programme\Mono-2.0/lib/gtk-2.0/2.10.0/loaders/svg_loader.dll: Das
> angegebene Modul wurde nicht gefunden.
>  at Gdk.PixbufLoader.Write (System.Byte[] buf, UInt64 count) [0x00000]
>  at Gdk.PixbufLoader.Write (System.Byte[] bytes, UInt32 count) [0x00000]
>  at Gdk.PixbufLoader.LoadFromStream (System.IO.Stream input) [0x00000]
>   at Gdk.PixbufLoader.InitFromStream (System.IO.Stream stream) [0x00000]
>  at Gdk.PixbufLoader..ctor (System.IO.Stream stream) [0x00000]
>  at Gdk.Pixbuf..ctor (System.IO.Stream stream) [0x00000]
>   at Stairs.Window1..ctor (System.String[] args) [0x00000]
>
> gdk-pixbuf-query-loaders.exe shows on the console:
> g_module_open() failed for
> C:\Programme\Mono-2.0/lib/gtk-2.0/2.10.0/loaders\svg_loader.dll: Das
> angegebene Modul wurde nicht gefunden. (given module not found)
>
> But prior it pops up messagebox that it could not find libcroco-0.6-3.dll
> .....
>
> This is the same file my early test with direct loading and creating of
> rsvg
> objects leaded to.
> Searching about libcroco did not give me very much information but it seems
> to be a XML-helper for SAX or similar. Anyhow, on my Windows box there not
> any file containing "croco" in its name. Neither lib* nor .dll nor .so,
> just
> nothing..
>
> Inspecting the svg_loader.so on my Linux box gave a long list of
> dependencies, including the specified libcroco-0.6.so.3.
>
> So It turns out to be a problem of a missing dll-file, though I thaught and
> hoped it would not.
>
> Conclusion: The problem is a missing libcroco, isn't it?
> Someone got rid of that lib? Maybe an exsiting Windows-dll with another
> name
> that could be mapped via dllmap in Mono-2.0/etc/config? Or a setup that
> includes libcroco-0.6-3.dll for Windows boxes?
>
> Kind regards
> Thomas
>
>
>
> Billy Schoenberg-2 wrote:
> >
> > Hello,
> > There is also a config file for GTK/GDK *gdk_pixbuf.loaders* which needs
> > to
> > be set up properly.  I know that I have had many issues using GTK on my
> > Win
> > XP and Vista boxes.
> >
> > Billy
> > ______________________________________________
> > Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> >
>
> --
> View this message in context:
> http://www.nabble.com/new-Gdk.Pixbuf-%28svg_stream%29-fails-on-windows-but-works-on-unix-tp20055917p20086513.html
> Sent from the Mono - Gtk# mailing list archive at Nabble.com.
>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20081021/4105a899/attachment.html 


More information about the Gtk-sharp-list mailing list