Bug 386523 - Crash when using pixel brush
Summary: Crash when using pixel brush
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-04 14:24 UTC by Scott Petrovic
Modified: 2018-01-02 17:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Petrovic 2017-11-04 14:24:38 UTC
I was doing some painting in master this morning (got a fresh build from appveyor 2 hours ago) after all the multi-threading stuff got added. Everything seemed fine with my normal brushes. I did switch to a pixel type brush (sharpness is usually added to those)...and shortly after using that I got this crash.

Using the Pixel Art Square brush. this happen very frequently on the first stroke with that brush. On my Surface Pro 4


-------------------

Error occurred on Saturday, November 4, 2017 at 09:00:13.

krita.exe caused an Access Violation at location 00007FFD00D47750 in module libkritaimage.dll Reading from location 0000000000000020.

AddrPC           Params
00007FFD00D47750 7FFFFFFF00000000 000000001E4C69A1 0000000000000000  libkritaimage.dll! ??   [C:/dev/krita/libs/image/kis_fixed_paint_device.cpp @ 68]
    66:     return m_data.size() / m_colorSpace->pixelSize();
    67: }
>   68: 
    69: 
    70: quint32 KisFixedPaintDevice::pixelSize() const
00007FFD00C4320B 0000000014628A38 0000000034E11128 0000000046018F10  libkritaimage.dll!splitDabsIntoRects  [C:/dev/krita/libs/image/KisRenderedDab.h @ 42]
00007FFD0E5575B4 000000001E822840 0000000078A0FC60 0000000000000000  kritadefaultpaintops.dll!doAsyncronousUpdate  [C:/dev/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.cpp @ 238]
00007FFCFA017EDD 0000000000000000 0000000034B25720 0000000000000000  libkritaui.dll!tryDoUpdate  [C:/dev/krita/libs/ui/tool/strokes/freehand_stroke.cpp @ 250]
00007FFCFA01847D 0000000000000001 0000000034E4E590 0000000000000001  libkritaui.dll!doStrokeCallback  [C:/dev/krita/libs/ui/tool/strokes/freehand_stroke.cpp @ 221]
00007FFD00E902D8 0000000000000000 000000006FD01BBC 0000000000000010  libkritaimage.dll!run  [C:/dev/krita/libs/image/kis_base_node.h @ 317]
   315:      * be multithreaded
   316:      */
>  317:     virtual void accept(KisProcessingVisitor &visitor, KisUndoAdapter *undoAdapter) {
   318:         Q_UNUSED(visitor);
   319:         Q_UNUSED(undoAdapter);
000000006889BEB9 0000000034E4E580 000000004648B780 0000000045B29630  Qt5Core.dll!QThreadPoolPrivate::startThread
000000006889DB5C 0000000003386140 0000000000000000 0000000000000000  Qt5Core.dll!QThread::setTerminationEnabled
00007FFD2E52B2BA 00007FFD2E580670 0000000045B29630 0000000000000000  msvcrt.dll!_beginthreadex
00007FFD2E52B38C 0000000000000000 0000000000000000 0000000000000000  msvcrt.dll!_endthreadex
00007FFD2EAC8364 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk
00007FFD2EEB7091 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart

krita.exe
ntdll.dll   	6.2.14393.1715
KERNEL32.DLL	6.2.14393.1198
KERNELBASE.dll	6.2.14393.1770
msvcrt.dll  	7.0.14393.0
libkritaglobal.dll
libkritaui.dll
USER32.dll  	6.2.14393.1770
win32u.dll  	6.2.14393.51
GDI32.dll   	6.2.14393.206
gdi32full.dll	6.2.14393.1770
libkritawidgetutils.dll
libKF5I18n.dll
Qt5Core.dll 	5.6.1.0
ADVAPI32.dll	6.2.14393.0
sechost.dll 	6.2.14393.1613
RPCRT4.dll  	6.2.14393.1770
ole32.dll   	6.2.14393.1715
combase.dll 	6.2.14393.1715
ucrtbase.dll	6.2.14393.1770
bcryptPrimitives.dll	6.2.14393.1715
SHELL32.dll 	6.2.14393.1770
cfgmgr32.dll	6.2.14393.0
windows.storage.dll	6.2.14393.1770
Qt5Gui.dll  	5.6.1.0
powrprof.dll	6.2.14393.0
shlwapi.dll 	6.2.14393.0
Qt5Widgets.dll	5.6.1.0
kernel.appcore.dll	6.2.14393.0
shcore.dll  	6.2.14393.953
profapi.dll 	6.2.14393.0
WS2_32.dll  	6.2.14393.206
libgcc_s_seh-1.dll
libstdc++-6.dll
libkritacolor.dll
libkritacommand.dll
libkritaflake.dll
libkritaimage.dll
libkritaimpex.dll
libkritalibbrush.dll
libkritaodf.dll
libkritapigment.dll
libkritaplugin.dll
libkritapsd.dll
libkritastore.dll
libkritaversion.dll
libkritawidgets.dll
libexiv2.dll
PSAPI.DLL   	6.2.14393.0
libKF5Completion.dll
libKF5ConfigCore.dll
libKF5ConfigGui.dll
libKF5CoreAddons.dll
libKF5GuiAddons.dll
libKF5ItemViews.dll
libKF5WidgetsAddons.dll
Qt5Multimedia.dll	5.6.1.0
Qt5Network.dll	5.6.1.0
Qt5PrintSupport.dll	5.6.1.0
Qt5Xml.dll  	5.6.1.0
libwinpthread-1.dll	1.0.0.0
comdlg32.dll	6.2.14393.479
libHalf.dll
libpng16.dll
libKF5WindowSystem.dll
MPR.dll     	6.2.14393.1613
OPENGL32.dll	6.2.14393.0
libintl.DLL 	0.18.0.0
Qt5Svg.dll  	5.6.1.0
libfftw3-3.dll
Qt5Concurrent.dll	5.6.1.0
libexpat.dll
iconv.dll
libz.dll    	1.2.8.0
libKF5Archive.dll
NETAPI32.dll	6.2.14393.0
USERENV.dll 	6.2.14393.0
DNSAPI.dll  	6.2.14393.1770
NSI.dll     	6.2.14393.0
IPHLPAPI.DLL	6.2.14393.953
COMCTL32.dll	5.82.14393.447
WINSPOOL.DRV	6.2.14393.1715
GLU32.dll   	6.2.14393.0
DDRAW.dll   	6.2.14393.953
bcrypt.dll  	6.2.14393.576
DCIMAN32.dll	6.2.14393.0
NETUTILS.DLL	6.2.14393.0
LOGONCLI.DLL	6.2.14393.0
SAMCLI.DLL  	6.2.14393.0
IMM32.DLL   	6.2.14393.0
qwindows.dll	5.6.1.0
OLEAUT32.dll	6.2.14393.1378
msvcp_win.dll	6.2.14393.0
WINMM.dll   	6.2.14393.0
WINMMBASE.dll	6.2.14393.0
uxtheme.dll 	6.2.14393.0
tiptsf.dll  	6.2.14393.1715
dwmapi.dll  	6.2.14393.206
ig9icd64.dll	21.20.16.4627
WTSAPI32.dll	6.2.14393.0
igc64.dll   	21.20.16.4627
MSCTF.dll   	6.2.14393.1770
clbcatq.dll 	2001.12.10941.16384
kimg_exr.dll
libIlmImf.dll
libIex.dll
libIlmThread.dll
libImath.dll
kimg_kra.dll
kimg_ora.dll
kimg_pcx.dll
kimg_pic.dll
kimg_psd.dll
kimg_ras.dll
kimg_rgb.dll
kimg_tga.dll
kimg_xcf.dll
qdds.dll    	5.6.1.0
qgif.dll    	5.6.1.0
qicns.dll   	5.6.1.0
qico.dll    	5.6.1.0
qjpeg.dll   	5.6.1.0
qsvg.dll    	5.6.1.0
qtiff.dll   	5.6.1.0
qwbmp.dll   	5.6.1.0
qwebp.dll   	5.6.1.0
dataexchange.dll	6.2.14393.206
d3d11.dll   	6.2.14393.953
dcomp.dll   	6.2.14393.1378
dxgi.dll    	6.2.14393.953
twinapi.appcore.dll	6.2.14393.1715
exchndl.dll 	0.8.1.0
mgwhelp.dll 	0.8.1.0
VERSION.dll 	6.2.14393.0
dbghelp.dll 	6.3.9600.17298
uiautomationcore.dll	7.2.14393.479
sxs.dll     	6.2.14393.0
OLEACC.dll  	7.2.14393.1715
twinapi.dll 	6.2.14393.953
PROPSYS.dll 	7.0.14393.0
LINKINFO.dll	6.2.14393.0
kritalcmsengine.dll
liblcms2.dll
krita_colorspaces_extensions.dll
krita_shape_image.dll
krita_shape_text.dll
libkritatextlayout.dll
libkritatext.dll
krita_flaketools.dll
krita_karbontools.dll
krita_tool_basicflakes.dll
libkritabasicflakes.dll
krita_shape_vector.dll
libkritavectorimage.dll
krita_shape_artistictext.dll
krita_shape_paths.dll
krita_filtereffects.dll
kritachalkpaintop.dll
libkritalibpaintop.dll
kritacolorsmudgepaintop.dll
kritacurvepaintop.dll
kritadefaultpaintops.dll
kritadeformpaintop.dll
kritadynapaintop.dll
kritaexperimentpaintop.dll
kritafilterop.dll
kritagridpaintop.dll
kritahairypaintop.dll
kritahatchingpaintop.dll
kritaparticlepaintop.dll
kritaroundmarkerpaintop.dll
kritasketchpaintop.dll
kritaspraypaintop.dll
kritatangentnormalpaintop.dll
kritaasccdl.dll
kritablurfilter.dll
kritacolorsfilters.dll
kritaconvertheighttonormalmap.dll
kritaconvolutionfilters.dll
kritadodgeburn.dll
kritaedgedetection.dll
kritaembossfilter.dll
kritaexample.dll
kritaextensioncolorsfilters.dll
kritafastcolortransferfilter.dll
kritagradientmap.dll
kritahalftone.dll
kritaimageenhancement.dll
kritaindexcolors.dll
kritalevelfilter.dll
kritanoisefilter.dll
kritanormalize.dll
kritaoilpaintfilter.dll
kritaphongbumpmap.dll
kritapixelizefilter.dll
kritaposterize.dll
kritaraindropsfilter.dll
kritarandompickfilter.dll
kritaroundcornersfilter.dll
kritasmalltilesfilter.dll
kritasobelfilter.dll
kritathreshold.dll
kritaunsharpfilter.dll
kritawavefilter.dll
kritacolorgenerator.dll
kritapatterngenerator.dll
kritadefaulttools.dll
libboost_system-mgw54-mt-1_61.dll
kritarulerassistanttool.dll
kritaselectiontools.dll
kritatoolSmartPatch.dll
kritatoolcrop.dll
kritatooldyna.dll
kritatoollazybrush.dll
kritatoolpolygon.dll
kritatoolpolyline.dll
kritatooltext.dll
kritatooltransform.dll
kritaanimationdocker.dll
krita_docker_defaults.dll
kritaarrangedocker.dll
kritaartisticcolorselector.dll
kritachanneldocker.dll
kritacolorselectorng.dll
qsvgicon.dll	5.6.1.0
kritacolorslider.dll
kritacompositiondocker.dll
kritadefaultdockers.dll
kritadigitalmixer.dll
kritagriddocker.dll
kritahistogramdocker.dll
kritahistorydocker.dll
kritaimagedocker.dll
kritalutdocker.dll
libOpenColorIO.dll
kritaoverviewdocker.dll
kritapalettedocker.dll
kritapatterndocker.dll
kritapresetdocker.dll
kritapresethistory.dll
kritasmallcolorselector.dll
kritaspecificcolorselector.dll
kritatasksetdocker.dll
kritatouchdocker.dll
libkritaqml.dll
Qt5Qml.dll  	5.6.1.0
Qt5QuickWidgets.dll	5.6.1.0
Qt5Quick.dll	5.6.1.0
edputil.dll 	6.2.14393.1358
kritaanimationrenderer.dll
kritabigbrother.dll
kritabuginfo.dll
kritaclonesarray.dll
kritacolorrange.dll
kritacolorspaceconversion.dll
kritahistogram.dll
kritaimagesize.dll
kritaimagesplit.dll
kritalayergroupswitcher.dll
kritalayersplit.dll
kritametadataeditor.dll
kritamodifyselection.dll
kritaoffsetimage.dll
kritaqmic.dll
kritaresourcemanager.dll
kritarotateimage.dll
kritaseparatechannels.dll
kritashearimage.dll
kritawaveletdecompose.dll
qtquick2plugin.dll	5.6.1.0
Ninput.dll  	6.2.14393.0
SAMLIB.dll  	6.2.14393.82
WININET.dll 	11.0.14393.1770
iertutil.dll	11.0.14393.1715
SspiCli.dll 	6.2.14393.1770
ondemandconnroutehelper.dll	6.2.14393.351
winhttp.dll 	6.2.14393.1770
mswsock.dll 	6.2.14393.0
WINNSI.DLL  	6.2.14393.0
urlmon.dll  	11.0.14393.1770
rasadhlp.dll	6.2.14393.0
fwpuclnt.dll	6.2.14393.0

Windows 6.2.9200
DrMingw 0.8.1
Comment 1 Scott Petrovic 2017-11-04 15:12:49 UTC
evidently I didn't realize I had to have the latest source code to give accurate debugging info on the windows appveyor build. The backtrace

*** This bug has been marked as a duplicate of bug 386498 ***
Comment 2 Alvin Wong 2017-11-06 16:00:50 UTC
I'm not entirely convinced that this is the same issue as Bug 386498. The crash module of this backtrace is libkritaimage.dll. Incidentally, I also got one crash with the fault module being libkritaimage.dll (out of 22 crashes) when testing the pre alpha 2 build on Windows. I don't think we can rule out the possibility of this being a different crash yet.
Comment 3 Alvin Wong 2017-11-06 16:03:14 UTC
Great, on my 23rd crash I got this:

---

Error occurred on Tuesday, November 7, 2017 at 00:01:45.

krita.exe caused an Access Violation at location 00007FF91BB84C80 in module libkritaimage.dll Reading from location 0000000000000020.

AddrPC           Params
00007FF91BB84C80 0000000000000001 00007FF97108DBEC 00000000258D60C0  libkritaimage.dll! ??   [C:/dev/4/64/krita/libs/image/kis_fixed_paint_device.cpp @ 68]
00007FF91BA82D32 0000000000000000 0000000049F62068 0000000000000000  libkritaimage.dll!splitDabsIntoRects  [C:/dev/4/64/krita/libs/image/KisRenderedDab.h @ 42]
00007FF9184E7542 00007FF91D6010C0 0000000057D2FCC8 0000000025BDCCB0  kritadefaultpaintops.dll!doAsyncronousUpdate  [C:/dev/4/64/krita/plugins/paintops/defaultpaintops/brush/kis_brushop.cpp @ 238]
00007FF91D1D1AED 00000000259B9120 0000000057D2FD90 0000000000000000  libkritaui.dll!tryDoUpdate  [C:/dev/4/64/krita/libs/ui/tool/strokes/freehand_stroke.cpp @ 250]
00007FF91D1D2074 0000000025B6B440 00000000000004A0 0000000025803A50  libkritaui.dll!doStrokeCallback  [C:/dev/4/64/krita/libs/ui/tool/strokes/freehand_stroke.cpp @ 229]
00007FF91BCCC442 000000001F840B40 00007FF91CDC93E0 000000001F840B40  libkritaimage.dll!run  [C:/dev/4/64/krita/libs/image/kis_base_node.h @ 320]
00007FF91CA8CF61 0000000025BDCCA0 00000000258DD400 0000000000000000  Qt5Core.dll!QThreadPoolPrivate::clear
00007FF91CA90AA6 0000000000000000 0000000000000000 0000000000000000  Qt5Core.dll!QThreadStorageData::finish
00007FF974561FE4 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk
00007FF974C7EF91 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart
Comment 4 Dmitry Kazakov 2017-11-24 22:16:37 UTC
Git commit d123397f6118a038e182e9e51a959bf7372c4cb9 by Dmitry Kazakov.
Committed on 24/11/2017 at 22:16.
Pushed by dkazakov into branch 'master'.

Fix a crash in the multithreaded brush

The cached value of 'lastDabJobInQueue' was calculated incorrectly.

Ref T7309
Related: bug 386498, bug 386497

The fix might also affect the crash in 386523, but I'm not sure about it

M  +3    -1    plugins/paintops/defaultpaintops/brush/KisDabRenderingQueue.cpp

https://commits.kde.org/krita/d123397f6118a038e182e9e51a959bf7372c4cb9
Comment 5 Halla Rempt 2018-01-02 15:07:39 UTC
Scott, 

does this still happen for you or is it fixed?
Comment 6 Scott Petrovic 2018-01-02 17:59:03 UTC
This is fixed now. This ticket was originally created when Dmitry first merged the multi-threaded brush into master... closing