4.3 Beta crash: ASSERT (krita): "screen < QGuiApplication::screens().size() && screen >= 0"

I am using Ubuntu 18.04 – I am not yet ready to upgrade to 20.04. I want to test the 4.3 beta, but all 4.3 beta versions (and even 4.3.1 alpha) I have tried, always abort at the begining with this message in the terminal:

ASSERT (krita): "screen < QGuiApplication::screens().size() && screen >= 0" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/widgets/KoToolBox.cpp, line 51

I have Krita version 4.2.9-4~bionic from the krita-lime PPA running perfectly in my system. All previous Krita versions from the PPA and also all appimages have always worked well. I have three screens, one of them being a Wacom Cintiq, and again, always working fine with krita pre-4.3.

The problem only happens with the 4.3 betas and 4.3.1 alpha versions. This is the full output from the command line:

$ ./krita-4.3.0-beta2-x86_64.appimage
QObject::startTimer: Timers cannot have negative intervals
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
/tmp/.mount_krita-0PvtPO/usr/lib/krita-python-libs/krita added to PYTHONPATH
ASSERT (krita): "screen < QGuiApplication::screens().size() && screen >= 0" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/widgets/KoToolBox.cpp, line 51

The error happens independently of how many screens are turned on: with only one screen (main), or with main and the second, or with the Cintiq display also on (or not), the problem and error message is always identical, no changes.

What I have done:

I have tried uninstalling the PPA krita 4.2.9-4~bionic and deleting all krita related files in ~/.config/ , as well as deleting the ~/.local/share/krita folder before attempting to run any of the beta appimages. The ASSERT message is always the same.

If I reinstall krita 4.2.9-4~bionic from the PPA with sudo apt install krita and put back all the deleted files and folder, and run a beta appimage, the ASSERT message is the same, the only difference is that there are many messages of this kind:
NOT COOL: Duplicated action name from xml data:
However bad those might be, they seem unrelated to the Abort problem, because though I can make them disappear by deleting my installation’s fiiles, that doesn’t help with the ASSERT.

Finally, I have tried to find a way of testing v4.3 beta with Flatpak, but I could not find any unstable version in https://flathub.org/repo/flathub.flatpakrepo or in https://distribute.kde.org/kdeapps.flatpakrepo, and this one https://binary-factory.kde.org/job/Krita_nightly_flatpak/ doesn’t seem to contain a flatpakrepo file and I could not find anywhere any documentation suggesting how this could be used by users to test krita 4.3 beta.

My goal is to be able to test 4.3 beta in my system and more importantly, to highlight that this error that I am experiencing might mean future problems for systems that may have similar configurations like mine.

Have anybody else experienced similar troubles? Any additional ideas or information whether is possible to use a Flatpak for 4.3 beta?

Can you check if deleting ~/.config/ (especially kritadisplayrc) and only having one screen turned on helps? Also what is your multi-screen setup? How they are configured?

This doesn’t directly help you but may be useful for comparison:-

Using totally fresh configurations and resources:

With the 4.3.0 beta-2 appimage, I get this when run from the terminal:

{Lots of NOT COOL warnings}
QObject::startTimer: Timers cannot have negative intervals
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
/tmp/.mount_krita-oDeuQP/usr/lib/krita-python-libs/krita added to PYTHONPATH
QLayout: Attempting to add QLayout “” to QWidget “”, which already has a layout

With the 4.2.9 appimage I get this:

{Lots of NOT COOL warnings}
QObject::startTimer: Timers cannot have negative intervals
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
/tmp/.mount_krita-GnuWHD/usr/lib/krita-python-libs/krita added to PYTHONPATH
{Lots of Syntax Warnings about the Comics Project Manager Plugin}

However, both of them run with no problems.

With the Debian repository installed 4.1.7, I get error messages about colour profiles, fonts and icon images but it runs fine.

As mentioned in my post, I deleted all krita{something} files from ~/.config, including kritadisplayrc, and I also deleted the entire ~/.local/share/krita folder and completely uninstalled krita with sudo apt remove krita krita-data, before doing tests with the beta appimages. I wouldn’t delete ~/.config/ altogether, that would be really bad. I think you didn’t mean that :slight_smile:

When I use three screens, this is the configuration:
Left-most: (Primary) 32", Res: 2560 x 1440;

Center: (Secondary) 24", Res: 1920 x 1200; Rotated: Left 90 degrees

Right: (Third): Wacom Cintiq 27", Res: 2560 x 1440;

So, again: With all deleted/uninstalled, I tested with only the main screen ON. I use this configuration a lot with krita, when I don’t need to use the Cintiq, I use a Wacom Intuos. So with only the main screen, it fails as described.

Next, I turn ON the second screen and make sure my display manager gets it correct (always OK, automatically - Xfce). I run the appimage in terminal, and it fails with the exact same lines.

Then I turn ON the Cintiq, make sure the Xfce display manager has all OK as I want, i.e., Cintiq on the right. All normal, as always. I run the appimage and it fails with the exact same lines.

I have tried disabling all displays except main, in the Xfce settings. No change.

To make it clear: krita 4.2.9-4~bionic from the krita-lime PPA and all appimages previous to 4.3xx too, handle all of those configurations normally without any problems.

@AhabGreybeard – thanks for the information, yes it is very useful for comparison.

In my kritarc file, I have the following entry for the Toolbox dockwidget:

[MainWindow][DockWidget ToolBox]

Is your kritarc entry comparable and/or reasonable?

Have you tried disconnecting two of your monitors from the video card output connectors and restarting your computer?

If you refer to the kritarc file that I have when using the 4.2.9 version, the entry looks almost identical:

[MainWindow][DockWidget ToolBox]

But then again, even if it was terribly different, it did not make any difference having that kritarc file, any other or none at all; the bug happens regardless.
If you mean the kritarc file created by the krita 4.3 beta, then in this moment I don’t know, I deleted it and re-installed 4.2.9 and my normal files. I am not sure if that would provide useful info, don’t you think?

As for disconnecting the monitors, well, when I disconnect them, I do turn OFF the mains for them. They don’t remain in standby or anything. Which I recommend everybody to do, because having things like that on “standby” is not only a waste of money at the end of the year, but more importantly, collectively, it’s really not very good… :earth_africa:. Thus the video card has connectors connected, but those connectors are dead, no need to disconnect them :slight_smile: .

UPDATE: IDENTICAL PROBLEM WITH krita v4.3.0 released today (Jun 18, 2020).

ASSERT (krita): "screen < QGuiApplication::screens().size() && screen >= 0" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/widgets/KoToolBox.cpp, line 51

Same error, same tests, same results.

Could anyone tell what is this assert checking so I can at least have an idea what could be happening?

screen < QGuiApplication::screens().size() && screen >= 0

It seems to read: “either ‘screen’ is bigger or equal than some limit size, or ‘screen’ value is negative”. But: why? what does it mean? is it some missing dependency, some obsolete library or a bug in calculating whatever ‘screen’ is supposed to be?

I also have this error on my three display set-up.
Display 1: 1920x1080 (Primary)
Display 2: 2560x1440
Display 3: 3840x2160 (Cinitq Pro)

My kritadisplayrc looks like this:



[MainWindow][DockWidget ToolBox]

more log files and a stack trace can be found here

Deleting kritarc and kritadisplayrc didn’t help.

I only have a two screen setup at the moment and I don’t get the assert, but in response to https://bugs.kde.org/show_bug.cgi?id=423303, I’ve pushed https://invent.kde.org/graphics/krita/commit/3738d47f327cd5c067fc33f93fcb29ab49f3ef0e. The nightly builds should be safe to use now.

The assert is trying to make sure that the screen we’re checking the dimensions of exists, but apparently screens can have a negative number in Qt…

Thanks, the nightly build works :smiley:

Hi, I have the exact same issue. Will there be a new App image available or do I need to install the nightly ?
Also I am pretty new to all this so if someone could point me to how to install nightly build that will be super helpful.
note I have three monitor setup with all screens being same sizes.

Go to this page: https://krita.org/en/download/krita-desktop/ and make sure you’re getting Krita Plus (this is the stable version that should be safe to use).

1 Like

Thanks. the nightly build works fine.


I can confirm that the nightly build has fixed the problem (I am trying krita-4.3.1-alpha-7eb5276-x86_64.appimage).
Thanks to all that contributed! :grinning:

1 Like