Bug 423129 - ASSERT (krita): "d->canvas == canvas" when opening old file and then creating new canvas
Summary: ASSERT (krita): "d->canvas == canvas" when opening old file and then creatin...
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 4.3.0-beta2
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-17 22:48 UTC by Frans Slothouber
Modified: 2020-06-18 17:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frans Slothouber 2020-06-17 22:48:39 UTC
SUMMARY

Krita crashes with message

QObject::startTimer: Timers cannot have negative intervals
/tmp/.mount_krita-kseFjp/usr/lib/krita-python-libs/krita added to PYTHONPATH
QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
ASSERT (krita): "d->canvas == canvas" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/ui/input/kis_input_manager_p.cpp, line 239
./start.sh: line 6: 94679 Aborted                 ./krita-4.3.0-beta2-x86_64.appimage


Happens 80% of the time I try it.


STEPS TO REPRODUCE
1. Open existing file, zoom in, zoom out
2. File/New create


OBSERVED RESULT

Crash

EXPECTED RESULT

No Crash

SOFTWARE/OS VERSIONS

Linux Ubuntu 20.04 + dwm


ADDITIONAL INFORMATION


Krita

 Version: 4.3.0-beta2
 Languages: C
 Hidpi: false

Qt

  Version (compiled): 5.12.8
  Version (loaded): 5.12.8

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.4.0-37-generic
  Pretty Productname: Ubuntu 20.04 LTS
  Product Type: ubuntu
  Product Version: 20.04
  Desktop: 

OpenGL Info
 
  Vendor:  "Intel" 
  Renderer:  "Mesa Intel(R) HD Graphics 520 (SKL GT2)" 
  Version:  "4.6 (Compatibility Profile) Mesa 20.0.4" 
  Shading language:  "4.60" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 15297 Mb
  Number of Cores: 4
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 900
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Display Information
Number of screens: 2
	Screen: 0
		Name: eDP-1
		Depth: 24
		Scale: 1
		Resolution in pixels: 1920x1080
		Manufacturer: BOE
		Model: 
		Refresh Rate: 60
	Screen: 1
		Name: DP-2
		Depth: 24
		Scale: 1
		Resolution in pixels: 1280x1024
		Manufacturer: Eizo Nanao Corporation
		Model: L565-
		Refresh Rate: 60





Krita Version: 4.3.0-beta2, Qt version compiled: 5.12.8, loaded: 5.12.8. Process ID: 95021
-- -- -- -- -- -- -- --
18 Jun 2020 00:37:59 +0200: Importing application/x-krita to application/x-krita. Location: /home/frans/Documents/Personal/Krita/Project/MapCrunch/swiss1.kra. Real location: /home/frans/Documents/Personal/Krita/Project/MapCrunch/swiss1.kra. Batchmode: 0
18 Jun 2020 00:38:00 +0200: Loaded image from application/x-krita. Size: 3508 * 2480 pixels, 4.16667 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 20
18 Jun 2020 00:38:00 +0200: Importing application/x-krita to application/x-krita. Location: /home/frans/Documents/Personal/Krita/Project/MapCrunch/swiss1.kra. Real location: /home/frans/Documents/Personal/Krita/Project/MapCrunch/swiss1.kra. Batchmode: 0
18 Jun 2020 00:38:01 +0200: Loaded image from application/x-krita. Size: 3508 * 2480 pixels, 4.16667 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 20
18 Jun 2020 00:38:07 +0200: Created image "Unnamed", 3840 * 2160 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 2
18 Jun 2020 00:38:07 +0200: ASSERT (krita): "d->canvas == canvas" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/ui/input/kis_input_manager_p.cpp, line 239
Comment 1 Frans Slothouber 2020-06-17 22:50:32 UTC
Would add /home/frans/Documents/Personal/Krita/Project/MapCrunch/swiss1.kra but it is 48Meg.
Comment 2 Frans Slothouber 2020-06-17 22:53:55 UTC
Also fails for another file   (18Meg)

Krita Version: 4.3.0-beta2, Qt version compiled: 5.12.8, loaded: 5.12.8. Process ID: 95414
-- -- -- -- -- -- -- --
18 Jun 2020 00:51:18 +0200: Importing image/png to application/x-krita. Location: /home/frans/Documents/Personal/Krita/Project/366Drawings/dark.png. Real location: /home/frans/Documents/Personal/Krita/Project/366Drawings/dark.png. Batchmode: 0
18 Jun 2020 00:51:18 +0200: Loaded image from image/png. Size: 3410 * 2420 pixels, 8.3333 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 2
18 Jun 2020 00:51:27 +0200: Created image "Unnamed", 3840 * 2160 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 2
18 Jun 2020 00:51:27 +0200: ASSERT (krita): "d->canvas == canvas" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/ui/input/kis_input_manager_p.cpp, line 239
Comment 3 Halla Rempt 2020-06-18 08:46:44 UTC
Could you please also check with the final release? See https://krita.org/en/item/krita-4-3-0-released/ -- there is no assert on line 239 in the code for that build...
Comment 4 Frans Slothouber 2020-06-18 17:26:00 UTC
Retested with the final release and the assert does not occur.  

However it now also does not occur with krita-4.3.0-beta2 anymore. 
So I am afraid it is a Heisenbug.