Bug 395440

Summary: Appimage (4.0.4) crashes after splash screen if name does not start with "krita".
Product: [Applications] krita Reporter: Yemachu
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: 4.0.4   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Yemachu 2018-06-15 16:20:55 UTC
Steps to reproduce:
 1. Download the appimage from the krita website, saving it with the name provided by the browser ("krita-4.0.4-x86_64.appimage").
 2. Make the appimage executable.
 3. Execute the application to make sure it loads the main window.
 4. Close krita.
 5. Rename the appimage to something which does NOT start with "krita" (case sensitive), make the 'k' uppercase, or place an underscore ('_') inf front of it for example.
 6. Start the application again to see it crash after showing the splashscreen.
 7. Rename the application so its name starts with "krita" again.
 8. Run the application, and it should function once again.


Actual results:
Krita crashes after showing the splash screen, if the appimage's name does not start with "krita".

Expected results:
The application to run the same regardless of whether its name starts with "krita" or not.

Additional information:
Running the application from the command line gave some more information. Here is the output from running the appimage as "krita-4.0.4.appimage" and "Krita-4.0.4.appimage", on an account without admin privileges.


===================================
"Krita-4.0.4.appimage"; not working
===================================

Setting XDG_DATA_DIRS "/tmp/.mount_Krita-WodB9D/usr/bin/../share:/usr/share/cinnamon:/usr/share/gnome:/home/yemachu/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share"
Override language: ""
QApplication: invalid style override passed, ignoring it.
OpenGL Info 
  Vendor:  nouveau 
  Renderer:  "NVA5" 
  Version:  "3.0 Mesa 17.2.8" 
  Shading language:  1.30 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
     Version: 3.0
     Supports deprecated functions true 
     is OpenGL ES: false 
krita has opengl true
Available translations QSet("is", "el", "vi", "it", "af", "eo", "nb", "es", "et", "eu", "ne", "ro", "ja", "ar", "nl", "ru", "nn", "fa", "en_US", "wa", "fi", "be", "bg", "se", "uz@cyrillic", "fr", "oc", "sk", "sl", "fy", "br", "bs", "sq", "sv", "ga", "kk", "km", "ko", "ca", "ta", "xh", "gl", "mai", "tg", "th", "pa", "ca@valencia", "cs", "tr", "pl", "cy", "nds", "he", "pt", "da", "hi", "pt_BR", "de", "en_GB", "lt", "lv", "zh_CN", "ug", "hr", "uk", "hu", "ast", "zh_TW", "ia", "hne", "mk", "uz", "mr", "ms")
Available domain translations QSet("is", "el", "vi", "it", "af", "eo", "nb", "es", "et", "eu", "ne", "ro", "ja", "ar", "nl", "ru", "nn", "fa", "en_US", "wa", "fi", "be", "bg", "se", "uz@cyrillic", "fr", "oc", "sk", "sl", "fy", "br", "bs", "sq", "sv", "ga", "kk", "km", "ko", "ca", "ta", "xh", "gl", "mai", "tg", "th", "pa", "ca@valencia", "cs", "tr", "pl", "cy", "nds", "he", "pt", "da", "hi", "pt_BR", "de", "en_GB", "lt", "lv", "zh_CN", "ug", "hr", "uk", "hu", "ast", "zh_TW", "ia", "hne", "mk", "uz", "mr", "ms")
Qt UI languages ("en-US") "en_US.UTF-8"
input profiles were read from ' /tmp/.mount_Krita-WodB9D/usr/share/krita/input '.
Loading Python plugin
Python::setPath. Script paths: ("/home/yemachu/.local/share/krita/", "/tmp/.mount_Krita-WodB9D/usr/share/krita/", "/usr/share/krita/", "/home/yemachu/.local/share/krita/pykrita/", "/tmp/.mount_Krita-WodB9D/usr/share/krita/pykrita/", "/tmp/.mount_Krita-WodB9D/usr/share/pykrita/") true
pythonLibsPath (krita-python-libs) "/tmp/.mount_Krita-WodB9D/usr/lib/krita-python-libs"
Found krita-python-libs at "/tmp/.mount_Krita-WodB9D/usr/lib/krita-python-libs"
pythonLibsPath (sip) "/tmp/.mount_Krita-WodB9D/usr/lib/sip"
Found sip at "/tmp/.mount_Krita-WodB9D/usr/lib/sip"
	 "python3.5" "python3.5"
Setting python paths: "/home/yemachu/.local/share/krita/:/tmp/.mount_Krita-WodB9D/usr/share/krita/:/usr/share/krita/:/home/yemachu/.local/share/krita/pykrita/:/tmp/.mount_Krita-WodB9D/usr/share/krita/pykrita/:/tmp/.mount_Krita-WodB9D/usr/share/pykrita/:/tmp/.mount_Krita-WodB9D/usr/lib/krita-python-libs:/tmp/.mount_Krita-WodB9D/usr/lib/sip:/tmp/.mount_Krita-WodB9D/usr/lib/python3.5/lib-dynload:/tmp/.mount_Krita-WodB9D/usr/lib/python3.5/site-packages:/tmp/.mount_Krita-WodB9D/usr/lib/python3.5/site-packages/PyQt5:/tmp/.mount_Krita-WodB9D/usr/lib/python3.5"
Segmentation fault



===================================
"krita-4.0.4.appimage"; working
===================================

Setting XDG_DATA_DIRS "/tmp/.mount_krita-YqnXZS/usr/bin/../share:/usr/share/cinnamon:/usr/share/gnome:/home/yemachu/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share"
Override language: ""
QApplication: invalid style override passed, ignoring it.
OpenGL Info 
  Vendor:  nouveau 
  Renderer:  "NVA5" 
  Version:  "3.0 Mesa 17.2.8" 
  Shading language:  1.30 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
     Version: 3.0
     Supports deprecated functions true 
     is OpenGL ES: false 
krita has opengl true
Available translations QSet("fi", "be", "bg", "se", "fr", "oc", "sk", "sl", "fy", "br", "bs", "sq", "sv", "ga", "kk", "km", "ko", "ca", "ta", "mai", "xh", "gl", "tg", "th", "pa", "cs", "nds", "tr", "pl", "cy", "pt_BR", "he", "en_GB", "pt", "da", "zh_CN", "hi", "de", "lt", "lv", "ug", "hr", "zh_TW", "uk", "hu", "ast", "hne", "uz@cyrillic", "ia", "mk", "uz", "mr", "ms", "is", "el", "vi", "it", "af", "eo", "nb", "es", "et", "eu", "ne", "ro", "ja", "ar", "en_US", "ca@valencia", "nl", "ru", "nn", "fa", "wa")
Available domain translations QSet("fi", "be", "bg", "se", "fr", "oc", "sk", "sl", "fy", "br", "bs", "sq", "sv", "ga", "kk", "km", "ko", "ca", "ta", "mai", "xh", "gl", "tg", "th", "pa", "cs", "nds", "tr", "pl", "cy", "pt_BR", "he", "en_GB", "pt", "da", "zh_CN", "hi", "de", "lt", "lv", "ug", "hr", "zh_TW", "uk", "hu", "ast", "hne", "uz@cyrillic", "ia", "mk", "uz", "mr", "ms", "is", "el", "vi", "it", "af", "eo", "nb", "es", "et", "eu", "ne", "ro", "ja", "ar", "en_US", "ca@valencia", "nl", "ru", "nn", "fa", "wa")
Qt UI languages ("en-US") "en_US.UTF-8"
QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
input profiles were read from ' /tmp/.mount_krita-YqnXZS/usr/share/krita/input '.
Loading Python plugin
Python::setPath. Script paths: ("/home/yemachu/.local/share/krita/", "/tmp/.mount_krita-YqnXZS/usr/share/krita/", "/usr/share/krita/", "/home/yemachu/.local/share/krita/pykrita/", "/tmp/.mount_krita-YqnXZS/usr/share/krita/pykrita/", "/tmp/.mount_krita-YqnXZS/usr/share/pykrita/") true
pythonLibsPath (krita-python-libs) "/tmp/.mount_krita-YqnXZS/usr/lib/krita-python-libs"
Found krita-python-libs at "/tmp/.mount_krita-YqnXZS/usr/lib/krita-python-libs"
pythonLibsPath (sip) "/tmp/.mount_krita-YqnXZS/usr/lib/sip"
Found sip at "/tmp/.mount_krita-YqnXZS/usr/lib/sip"
	 "python3.5" "python3.5"
Setting python paths: "/home/yemachu/.local/share/krita/:/tmp/.mount_krita-YqnXZS/usr/share/krita/:/usr/share/krita/:/home/yemachu/.local/share/krita/pykrita/:/tmp/.mount_krita-YqnXZS/usr/share/krita/pykrita/:/tmp/.mount_krita-YqnXZS/usr/share/pykrita/:/tmp/.mount_krita-YqnXZS/usr/lib/krita-python-libs:/tmp/.mount_krita-YqnXZS/usr/lib/sip:/tmp/.mount_krita-YqnXZS/usr/lib/python3.5/lib-dynload:/tmp/.mount_krita-YqnXZS/usr/lib/python3.5/site-packages:/tmp/.mount_krita-YqnXZS/usr/lib/python3.5/site-packages/PyQt5:/tmp/.mount_krita-YqnXZS/usr/lib/python3.5"
/tmp/.mount_krita-YqnXZS/usr/lib/krita-python-libs/krita added to PYTHONPATH
Button KoToolBoxButton(0xb0a02f0, name="SvgTextTool") has a conflicting priority
krita.general: Could not find font QVariant(QString, "Source Sans Pro") with style QVariant(QString, "Regular")
krita.general: Could not find font QVariant(QString, "Source Sans Pro") with style QVariant(QString, "Bold")
krita.general: Could not find font QVariant(QString, "Source Sans Pro") with style QVariant(QString, "Regular")
krita.general: Could not find font QVariant(QString, "Source Sans Pro") with style QVariant(QString, "Regular")
krita.general: Could not find font QVariant(QString, "Source Sans Pro") with style QVariant(QString, "Regular")
krita.general: Could not find font QVariant(QString, "Source Sans Pro") with style QVariant(QString, "Light")
krita.general: Could not find font QVariant(QString, "Source Sans Pro") with style QVariant(QString, "Regular")
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/opacity-decrease
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/opacity-increase
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/lightness-increase
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/lightness-decrease
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/zoom-in
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/rotate-canvas-left
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/rotation-reset
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/rotate-canvas-right
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/zoom-out
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/brushsize-decrease
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/brushsize-increase
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/preset-switcher
file:///tmp/.mount_krita-YqnXZS/usr/lib/qml/org/krita/sketch/components/Button.qml:84:9: QML Image: Failed to get image from provider: image://icon/edit-clear
Comment 1 Halla Rempt 2018-06-15 16:27:51 UTC
Um... Don't do that. Just don't.
Comment 2 Yemachu 2018-06-18 15:00:05 UTC
(In reply to Boudewijn Rempt from comment #1)
> Um... Don't do that. Just don't.

I take it that you refer to renaming the appimage (as opposed to posting whatever is written to the standard output). Not renaming Krita indeed solves the issue with it not progressing past the splashscreen, but I find it weird that it only happens with version 4.0.4; older versions I have used didn't have this issue.

Starting the application through a soft-link (created using the command "ln -s <PATH_TO_KRITA>/krita-4.0.4.appimage ~/Desktop/Krita") suffers from the same limitation.
Comment 3 Halla Rempt 2018-06-18 15:01:37 UTC
Yes, don't rename the appimage. Basically, the executable needs to start with krita-* so the translation system can work.