Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageMagick with RSVG conversion errors #4284

Closed
Insalien opened this issue Sep 11, 2019 · 5 comments
Closed

ImageMagick with RSVG conversion errors #4284

Insalien opened this issue Sep 11, 2019 · 5 comments
Labels
system-level bug Bug is hidden somewhere in OS and can't be fixed

Comments

@Insalien
Copy link

Problem description
Issue related to imagemagick or precisely with rsvg-convert

$ convert test.svg test.png
bionic/libc/upstream-netbsd/lib/libc/stdlib/bsearch.c:70: bsearch: assertion "key != NULL" failed
Aborted
$ rsvg-convert /sdcard/test.svg -o test.png
bionic/libc/upstream-netbsd/lib/libc/stdlib/bsearch.c:70: bsearch: assertion "key != NULL" failed
Aborted

Steps to reproduce
I can't upload svg file but the testing content is pretty small

<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="640" height="1000" pagecolor="#ffffff" viewBox="0 0 744.09449 1052.3622" id="svg2" version="1.1">
  <g id="group_data">
    <text>Test</text>
  </g>
</svg>

Expected behavior
Conversion is done

Additional information
Post output of command termux-info.

$ termux-info
Updatable packages:
All packages up to date
Subscribed repositories:
https://dl.bintray.com/grimler/science-packages-21 science/stable
https://dl.bintray.com/grimler/game-packages-21 games/stable
https://termux.net stable/main
https://termux.net stable/main
System information:
Linux localhost 3.18.19 #2 SMP PREEMPT Tue Jun 4 11:50:10 UTC 2019 armv7l Android
Termux-packages arch:
arm
Android version:
6.0
Device manufacturer:
FAMOCO
Device model:
FX200i,3

Depending on problem, additional information may be requested:

  1. Android warning/error log: logcat -d "*:W".
  2. Output of strace: strace -fv -s 2048 -o strace.log {program name}.
  3. If program write it's own log files, you may need to attach them.
@ghost
Copy link

ghost commented Sep 11, 2019

I'm unsure that issue is related to imagemagick with librsvg.

The line

bionic/libc/upstream-netbsd/lib/libc/stdlib/bsearch.c:70: bsearch: assertion "key != NULL" failed

clearly states that issue is in your ROMs libc (maybe for all libc's at Android v6.0 and lower).


Googling shows that issue may occur not only with imagemagick like in Termux case:

@ghost ghost added the system-level bug Bug is hidden somewhere in OS and can't be fixed label Sep 11, 2019
@Insalien
Copy link
Author

Insalien commented Sep 11, 2019

@xeffyr hey thank you for your quick response. I have several devices in both arm and aarch64 arch and only this one in arm having this issue. Let's say there's some incompatibility between termux libsrvg(arm) and the libC in our ROM. I'll try to dig into it further.

There is still one tiny problem that I didn't mention earlier because it's not related to the original question but after installing imagemagick and depending on the svg, the conversion might not work because of

(process:32277): GdkPixbuf-WARNING **: 19:01:39.235: Cannot open pixbuf loader module file '/data/data/com.termux/files/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /data/data/com.termux/files/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.

Everything is fine after I followed the suggestion.
You might consiger adding a gdk-pixbuf.postinst in this case.

@tondy67
Copy link

tondy67 commented Sep 23, 2019

After latest upgrade (20 Sep 2019) everythink X11 stop working :(
termux-info
Updatable packages:
All packages up to date
Subscribed repositories:
https://dl.bintray.com/xeffyr/x11-packages-21 x11/main
https://dl.bintray.com/grimler/science-packages-21 science/stable
https://dl.bintray.com/grimler/game-packages-21 games/stable
https://termux.net stable/main
https://termux.net stable/main
System information:
Linux localhost 3.4.39 #6 SMP PREEMPT Sat Sep 3 03:30:24 UTC 2016 armv7l Android
Termux-packages arch:
arm
Android version:
5.1.1
Device manufacturer:
DARK GLEE 10.1
Device model:
DARK GLEE 10.1 1.1
$ grep bionic /data/data/com.termux/files/home/.vnc/localhost:1.log
bionic/libc/upstream-netbsd/lib/libc/stdlib/bsearch.c:70: bsearch: assertion "key != NULL" failed

ghost pushed a commit that referenced this issue Sep 23, 2019
ghost pushed a commit that referenced this issue Sep 23, 2019
See #4284.

Note: bsearch implementation in Bionic didn't changed since
Thu Feb 20 14:15:09 2014, though issue #4284 is not reproducible
on recent Android versions. Patch is applied for both branches.
ghost pushed a commit to termux/x11-packages that referenced this issue Sep 23, 2019
ghost pushed a commit to termux/x11-packages that referenced this issue Sep 23, 2019
@Insalien
Copy link
Author

Thanks @xeffyr, the fix that you did on pango package is working for me. The ticket can be closed unless @tondy67 want to add anything.

@ghost ghost closed this as completed Sep 26, 2019
@tondy67
Copy link

tondy67 commented Sep 27, 2019

Hi, my X11 (openbox,geany,pcmanfm) is still broken.
I installed Termux from scratch - no luck
I installed all libandroid-*-static - no luck
I installed fluxbox, it works, at least I can start aterm
I use nano && mc to continue my work but it's not the same as geany && pcmanfm
Maybe is x32 related, my tablet is old...

amuramatsu pushed a commit to amuramatsu/termux-packages that referenced this issue Dec 7, 2019
See termux#4284.

Note: bsearch implementation in Bionic didn't changed since
Thu Feb 20 14:15:09 2014, though issue termux#4284 is not reproducible
on recent Android versions. Patch is applied for both branches.
ghost pushed a commit to termux/x11-packages that referenced this issue Nov 22, 2020
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
system-level bug Bug is hidden somewhere in OS and can't be fixed
Projects
None yet
Development

No branches or pull requests

2 participants