GithubHelp home page GithubHelp logo

Comments (17)

gituser23234235234887 avatar gituser23234235234887 commented on May 27, 2024 1

I ran foliate through konsole, this is the error code I got
***MEMORY-ERROR***: com.github.johnfactotum.Foliate[58603]: GSlice: assertion failed: sinfo->n_allocated > 0
the gui crash notifier says that gjs console ran out of memory

from foliate.

a-pav avatar a-pav commented on May 27, 2024 1

That... is unfortunate! I have to stick with Foliate 2.6.4 for the time being then.

In the meantime, I'm getting the same Memory Error with Foliate 2.6.4 on Ubuntu 22.04 (Linux Mint).

Though using G_SLICE=always-malloc com.github.johnfactotum.Foliate seems to be a working solution for now. It' been running for a few minutes and I skimmed through some chapters and images without Foliate crashing.

But can you tell what G_SLICE=always-malloc exactly does? Is it safe to use?

from foliate.

johnfactotum avatar johnfactotum commented on May 27, 2024

Closing as obsolete with the release of the GTK 4 version. Feel free to open new issues if you have problems with the new version.

from foliate.

a-pav avatar a-pav commented on May 27, 2024

Closing as obsolete with the release of the GTK 4 version. Feel free to open new issues if you have problems with the new version.

Should we wait for an installable .deb file or that's not coming anymore?

from foliate.

johnfactotum avatar johnfactotum commented on May 27, 2024

You can download them from this PPA: https://launchpad.net/~apandada1/+archive/ubuntu/foliate. Note that any .deb package of Foliate would require Ubuntu 23.10 or newer.

from foliate.

johnfactotum avatar johnfactotum commented on May 27, 2024

Maybe. I have no idea.

from foliate.

mars4science avatar mars4science commented on May 27, 2024

@a-pav,

But can you tell what G_SLICE=always-malloc exactly does? Is it safe to use?

I've recently got same issue and found https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/1169694 where it is suggested to run gdb to find the cause, but I could not make gdb run Foliate.

https://developer-old.gnome.org/glib/stable/glib-Memory-Slices.html
https://developer-old.gnome.org/glib/stable/glib-running.html#G_SLICE

This will cause all slices allocated through g_slice_alloc() and released by g_slice_free1() to be actually allocated via direct calls to g_malloc() and g_free().

from foliate.

a-pav avatar a-pav commented on May 27, 2024

I also found and read those docs after my last reply. I wasn't satisfied with the results, overall.
The memory foliate consumed seemed to be too high to be acceptable, although I don't remember the exact number.

from foliate.

iconoclasthero avatar iconoclasthero commented on May 27, 2024

I just tried to build 3.0.1 on 22.04 as I'm waiting for 24.04 to upgrade this machine (not doing non-LTS releases ever again!).

As you can see it doesn't seem to think that I have a cromulent version of gjs installed despite the appearance of 1.72.4 > 1.0.

$ gjs --version; which gjs; meson setup build --prefix=/usr; apt show gjs
gjs 1.72.4
/usr/bin/gjs
/bin/gjs
The Meson build system
Version: 0.61.2
Source dir: /home/bvargo/bin/gits/foliate
Build dir: /home/bvargo/bin/gits/foliate/build
Build type: native build
Project name: com.github.johnfactotum.Foliate
Project version: 3.0.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Found CMake: /usr/bin/cmake (3.22.1)
Run-time dependency gjs-1.0 found: NO (tried pkgconfig and cmake)

meson.build:9:0: ERROR: Dependency "gjs-1.0" not found, tried pkgconfig and cmake

A full log can be found at ~/bin/gits/foliate/build/meson-logs/meson-log.txt
Package: gjs
Version: 1.72.4-0ubuntu0.22.04.1
.
.
.

Here's that log:

Build started at 2023-12-05T12:28:21.693939
Main binary: /usr/bin/python3
Build Options: -Dprefix=/usr
Python system: Linux
The Meson build system
Version: 0.61.2
Source dir: ~/bin/gits/foliate
Build dir: ~/bin/gits/foliate/build
Build type: native build
Project name: com.github.johnfactotum.Foliate
Project version: 3.0.1
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Pkg-config binary for 1 is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Determining dependency 'gjs-1.0' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --modversion gjs-1.0` -> 1

CMake binary for 1 is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: /usr/bin/cmake (3.22.1)
Extracting basic cmake information
Try CMake generator: auto
Calling CMake (['/usr/bin/cmake']) in ~/bin/gits/foliate/build/meson-private/cmake_gjs-1.0 with:
  - "--trace-expand"
  - "--trace-format=json-v1"
  - "--no-warn-unused-cli"
  - "--trace-redirect=cmake_trace.txt"
  - "-DCMAKE_TOOLCHAIN_FILE=~/bin/gits/foliate/build/meson-private/cmake_gjs-1.0/CMakeMesonToolchainFile.cmake"
  - "."
  -- Module search paths:    ['/', '/opt', '/usr', '/usr/local']
  -- CMake root:             /usr/share/cmake-3.22
  -- CMake architectures:    ['x86_64-linux-gnu']
  -- CMake lib search paths: ['lib', 'lib32', 'lib64', 'libx32', 'share', 'lib/x86_64-linux-gnu']
Preliminary CMake check failed. Aborting.
Run-time dependency gjs-1.0 found: NO (tried pkgconfig and cmake)

meson.build:9:0: ERROR: Dependency "gjs-1.0" not found, tried pkgconfig and cmake

from foliate.

johnfactotum avatar johnfactotum commented on May 27, 2024

The minimum GJS version is 1.76. I think the 1.0 in gjs-1.0 refers to the API version.

from foliate.

iconoclasthero avatar iconoclasthero commented on May 27, 2024

Did I miss that in the README.md? If not, perhaps you might include that?

from foliate.

iconoclasthero avatar iconoclasthero commented on May 27, 2024

The minimum GJS version is 1.76. I think the 1.0 in gjs-1.0 refers to the API version.

As I'm sure you've already surmised, that's not going to work until ubuntu is upgraded. I just borked my system over the weekend and so if whatever I did to try to get that version of GJS installed on my system breaks it, oh well... i still have the flash drive handy.

from foliate.

johnfactotum avatar johnfactotum commented on May 27, 2024

Yes, the minimum version is documented in the readme.

It does not mention the API version in the readme as it's implied by the package version. The API version is usually identical to the major version, i.e. the first number in the version string. (The exception is WebKitGTK, which can have multiple API versions for the same version.)

I think (though I'm not entirely sure) the - before the version number is a convention that is meant to tell you that the version is not considered part of the real name of the package. When there's no - before the number, it means that you can install them in parallel (e.g. gtk3, gtk4, not gtk-3, gtk-4). (Again the exception is WebKitGTK: Debian and Arch Linux both package it with -6.0 in the package name. But note that in Fedora it's not webkitgtk-6.0 but webkitgtk6.0, which makes more sense.)

Maybe it would be better to just remove the version checks in Meson. Those were added purely to stop people from assuming that they have met the minimum requirements. But apparently it didn't really accomplish that. And although Meson reports them as run time dependencies, you have to install them at build time, which makes no sense.

I don't know why it says "not found", though. If you have older versions of GJS with the same API version, I would expect it to say that it is found but does not meet the version requirement.

from foliate.

iconoclasthero avatar iconoclasthero commented on May 27, 2024

So here's why I'm here: In my opinion, the most complete and capable Linux ebook reader is Calibre but it leaves a lot to be desired in terms of UX. I would prefer not to look at itโ€“ever. (I didn't even bother to seriously consider using it for a backend server and went with Kativa instead). Since I really don't read ebooks, I just want something light-weight that I can search for what I'm listening to on audio, look at end- and footnotes, references, etc., Part of my definition of light-weight is not an appimage/flatpack/snap.

I didn't think to really look for it, but gnome-books might be a solution if it would actually work on my laptop (new 22.04 install as of 3 days ago); would use directories other than ~/Documents; would follow symlinks in ~/Documents; and was still actively being developed (no activity for at least a year).

So after all that, I'm back to where I was a week ago: foliate fits my requirements (if I can get a .deb/build) and I'd nominate it to replace gnome-books if that's been abandoned.

from foliate.

iconoclasthero avatar iconoclasthero commented on May 27, 2024

Let me ask another question: Do you have an older source version that I can compile on 22.04 and basically just lets me $ foliate ebook\ name.epub to look and search the book? Other features might be useful, but that's all I need...
Otherwise, the space for the snap isn't going to kill me and I'll just wait a few months for 24.04 beta to install the .deb.

I just installed the .deb from https://github.com/johnfactotum/foliate/releases/tag/2.6.3 and unless there's some reaon that that is a problem (e.g., insecure), that solves my issue 'till 24.04.

Hmmm... just crashed with the gjs error. So I take it that means I'd need to downgrade gjs. :(

from foliate.

johnfactotum avatar johnfactotum commented on May 27, 2024

I just want something light-weight that I can search for what I'm listening to on audio, look at end- and footnotes, references, etc.

You could consider using an online viewer such as https://github.com/pgaskin/ePubViewer.

foliate-js has an online demo viewer also: https://johnfactotum.github.io/foliate-js/reader.html. Compared to the EPUB viewer above it can open more formats, but it doesn't support searching in the book (well, you can run reader.view.search in the console but that's obviously not great for normal use).

Hmmm... just crashed with the gjs error. So I take it that means I'd need to downgrade gjs. :(

You could try the workaround mentioned above.

Just an idea, but you can also try the 1.x versions.

from foliate.

iconoclasthero avatar iconoclasthero commented on May 27, 2024

Thanks for all your help. Foliate really fills a need as described or I wouldn't be spending the time on it. I'm just going to install the snap and satisfice on that until April.

Thanks again for the support and for Foliate.

from foliate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.