question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GLib-ERROR - gmem.c - failed to allocate n bytes

See original GitHub issue

Hi.

Im trying to save a large image into tile format. I’m using python 3.6.9 and the code : x = pyvips.Image.new_from_file("test.ndpi", access="sequential") x.dzsave("test_folder")

Which works fine in verison 8.4.5.

But in the latest version 8.9.1: GLib-ERROR **: 12:00:36.791: …/…/…/…/glib/gmem.c:135: failed to allocate 32105299968 bytes when trying to use dzsave.

The image is : <pyvips.Image 110592x96768 uchar, 4 bands, rgb>

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jcupittcommented, Jan 20, 2020

It was a bug in 8.9.0, it should be fixed in 8.9.1. I see:

$ python3
Python 3.7.5 (default, Nov 20 2019, 09:21:52) 
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvips
>>> x = pyvips.Image.new_from_file("bild.ndpi")
>>> x.get("vips-loader")
'openslideload'
0reactions
petoorcommented, Jan 20, 2020

The problem seemed to be that the initial build did not have libopenslide-dev installed while building. (It is optionallyin : https://github.com/libvips/libvips/wiki/Build-for-Ubuntu)

So, no, i dont think there was a problem in nither 8.9.1 or 8.9.0.

In this case, it would make sense to throw an exception / warning to the user when trying to use openslideload without libopenslide installed.

Thank you for the help

Read more comments on GitHub >

github_iconTop Results From Across the Web

Glib memory allocation error - Stack Overflow
I dont know why it is trying to allocate so many bytes for 24+5 length. Could anyone suggest me any solution? java ·...
Read more >
200071 – GLib-ERROR **: gmem.c:172 - Red Hat Bugzilla
CAMEL_VERBOSE_DEBUG=1 tells me it's trying to allocate a gig of ram: GLib-ERROR **: gmem.c:172: failed to allocate 1073741824 bytes.
Read more >
2023 (GLib-ERROR **: gmem.c:175: failed to allocate ...
I see this error with mc-4.7.0.2 on gentoo x86_64. I've tied on/off all use flags and to compile from source. Error always the...
Read more >
Unable to allocate enough memory when pasting or duplicating
... is: "Glib-ERROR **: gmem.c:136: failed to allocate 6144 bytes ... also when you open a new file, draw a path or shape...
Read more >
46.0.1: gmem.c:100: failed to allocate 3857049062 bytes
(firefox:652): GLib-ERROR **: gmem.c:100: failed to allocate 3857049062 bytes ... understand the details, so I didn't keep links to the bug reports and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found