Qt creator using QPrinter crashes on specific device
-
wrote on 19 Sept 2024, 13:40 last edited by MHMart_asc
I have started a new blank QWidget project and added one line in the MainWindow:
QPrinter printer(QPrinter::HighResolution);
When running (in debug mode as well), the program crashes right away:
Disassembler (...CacheCallback) page shows up and points to line 2908, which is the last line in:0x7ffedff0a4c6 <+10470> cmp byte ptr [rbp+20h],0 0x7ffedff0a4ca <+10474> je ntdll!RtlRegisterSecureMemoryCacheCallback+0x28fd (00007ffe`dff0a4dd) 0x7ffedff0a4cc <+10476> mov rcx,qword ptr [rbp+40h] 0x7ffedff0a4d0 <+10480> mov rcx,qword ptr [rcx+160h] 0x7ffedff0a4d7 <+10487> call ntdll!RtlLeaveCriticalSection (00007ffe`dfe3f230) 0x7ffedff0a4dc <+10492> nop 0x7ffedff0a4dd <+10493> add rsp,20h 0x7ffedff0a4e1 <+10497> pop rbp 0x7ffedff0a4e2 <+10498> ret 0x7ffedff0a4e3 <+10499> int 3 0x7ffedff0a4e4 <+10500> int 3 0x7ffedff0a4e5 <+10501> int 3 0x7ffedff0a4e6 <+10502> int 3 0x7ffedff0a4e7 <+10503> int 3 0x7ffedff0a4e8 <+10504> int 3 0x7ffedff0a4e9 <+10505> int 3 0x7ffedff0a4ea <+10506> int 3 0x7ffedff0a4eb <+10507> int 3 0x7ffedff0a4ec <+10508> mov rax,qword ptr gs:[60h] 0x7ffedff0a4f5 <+10517> cmp byte ptr [rax+2],0 0x7ffedff0a4f9 <+10521> je ntdll!RtlRegisterSecureMemoryCacheCallback+0x292a (00007ffe`dff0a50a) 0x7ffedff0a4fb <+10523> mov byte ptr [ntdll!NlsAnsiCodePage+0x147d (00007ffe`dff7ac49)],1 0x7ffedff0a502 <+10530> int 3
include <QPrinter> was added to the main file and
QT += printsupport was added to the project file ofcourse.The same thing does not occur on another computer. So probably it has to do with my setup.
Qt support is slow in responding and only tells me to update my printer drivers.
I removed my actual printers already once and tested, the result was the same.
Then, I installed the one printer I have with the latest drivers and no result here.I also tried multiple resolution settings:
QPrinter printer(QPrinter::ScreenResolution);
QPrinter printer(QPrinter::PrinterResolution);
This is the list of printerdrivers (in Dutch):
Qt version: 6.7.2 (MSVC 2019, x86_64)
Qt Creator version 14.0.1
Windows 10 (64 bit)
HP ProBook 450 15.6 inch G9 Notebook PCDoes anyone have any suggestions?
Appendix:
project file:QT += core gui QT += widgets QT += printsupport greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
mainwindow.cpp:
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QPrinter> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); QPrinter printer(QPrinter::HighResolution); }
Output when using
QLoggingCategory::setFilterRules("qt.*=true");
:15:49:56: Debugging C:\Users\User\Documents\Path\PdfWriterTest\build\Desktop_Qt_6_7_0_MSVC2019_64bit-Debug\debug\PdfWriterTest.exe "-qmljsdebugger=port:51219,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation" ... qt.highdpi: Initializing high-DPI scaling qt.highdpi: Initialization done, high-DPI scaling is active qt.qpa.plugin: init_platform called with pluginNamesWithArguments "windows" platformPluginPath "" platformThemeName "" qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.7.0/msvc2019_64/plugins/platforms" ... qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qdirect2d.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qdirect2d.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qdirect2d.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qdirect2dd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qdirect2dd.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("direct2d") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qminimal.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qminimal.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qminimal.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qminimald.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qminimald.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qoffscreen.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qoffscreen.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qoffscreen.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qoffscreend.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qoffscreend.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qwindows.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qwindows.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qwindows.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qwindowsd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qwindowsd.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "archlevel": 0, "className": "QWindowsIntegrationPlugin", "debug": true, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows") qt.core.plugin.factoryloader: checking directory path "C:/Users/User/Documents/Path/PdfWriterTest/build/Desktop_Qt_6_7_0_MSVC2019_64bit-Debug/debug/platforms" ... qt.qpa.plugin: Attempting to load Qt platform plugin "windows" with arguments QList() qt.core.library: "C:/Qt/6.7.0/msvc2019_64/plugins/platforms/qwindowsd.dll" loaded library qt.qpa.window: QWindowsContext::setProcessDpiAwareness QtWindows::DpiAwareness::PerMonitorVersion2 qt.qpa.window: DpiAwareness= QtWindows::DpiAwareness::PerMonitorVersion2 effective process DPI awareness= QtWindows::DpiAwareness::PerMonitorVersion2 qt.qpa.window: QWindowsContext::registerWindowClass "Qt670dPowerDummyWindow" style=0x0 brush=0x0 icon=false atom=49831 qt.qpa.window: QWindowsContext::registerWindowClass "Qt670dClipboardView" style=0x0 brush=0x0 icon=false atom=49832 qt.qpa.mime: QWindowsClipboard::registerViewer m_clipboardViewer: 0x1a07a0 format listener: true next: 0x0 qt.qpa.screen: Initializing screen manager qt.qpa.window: QWindowsContext::registerWindowClass "Qt670dScreenChangeObserverWindow" style=0x0 brush=0x0 icon=false atom=49833 qt.qpa.screen: Created display change observer 0xc0830 qt.highdpi: Updating high-DPI scaling qt.highdpi: Update done, high-DPI scaling is active qt.qpa.screen: New Monitor: Screen "\\.\DISPLAY1" 1920x1080+0+0 avail: 1920x1030+0+0 physical: 344x193 DPI: 120x120 Depth: 32 Format: QImage::Format_RGB32 hMonitor: 0x10001 device name: \\.\DISPLAY1 manufacturer: Chimei Innolux Corporation model: serial number: primary virtual desktop qt.highdpi: Updating high-DPI scaling qt.highdpi: Update done, high-DPI scaling is active qt.qpa.screen: New Monitor: Screen "HP E273" 1920x1080+916+-1080 avail: 1920x1040+916+-1080 physical: 598x336 DPI: 96x96 Depth: 32 Format: QImage::Format_RGB32 hMonitor: 0x10003 device name: \\.\DISPLAY2 manufacturer: HP Inc. model: HP E273 serial number: CNK8251H15 virtual desktop qt.highdpi: Updating high-DPI scaling qt.highdpi: Update done, high-DPI scaling is active qt.qpa.screen: New Monitor: Screen "HP Z24n G2" 1680x1050+-764+-1054 avail: 1680x1010+-764+-1054 physical: 518x324 DPI: 96x96 Depth: 32 Format: QImage::Format_RGB32 hMonitor: 0x10005 device name: \\.\DISPLAY3 manufacturer: HP Inc. model: HP Z24n G2 serial number: 6CM0202HP0 virtual desktop qt.qpa.plugin: Successfully loaded Qt platform plugin "windows" qt.qpa.theme: Adding platform integration's theme names to list of theme names: QList("windows") qt.qpa.theme: Attempting to create platform theme "windows" via QPlatformThemeFactory::create qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.7.0/msvc2019_64/plugins/platformthemes" ... qt.core.plugin.factoryloader: checking directory path "C:/Users/User/Documents/Path/PdfWriterTest/build/Desktop_Qt_6_7_0_MSVC2019_64bit-Debug/debug/platformthemes" ... qt.qpa.theme: Attempting to create platform theme "windows" via createPlatformTheme qt.qpa.window: QWindowsTheme::refreshFonts NONCLIENTMETRICS(iMenu=19x19, lfCaptionFont=LOGFONT("Segoe UI", lfWidth=0, lfHeight=-12), lfSmCaptionFont=LOGFONT("Segoe UI", lfWidth=0, lfHeight=-12), lfMenuFont=LOGFONT("Segoe UI", lfWidth=0, lfHeight=-12), lfMessageFont=LOGFONT("Segoe UI", lfWidth=0, lfHeight=-12), lfStatusFont=LOGFONT("Segoe UI", lfWidth=0, lfHeight=-12)) qt.qpa.fonts: QWindowsFontDatabaseBase::systemDefaultFont QFont(Segoe UI,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1) qt.qpa.window: QWindowsTheme::refreshIconPixmapSizes QList(QSize(20, 20), QSize(40, 40), QSize(60, 60), QSize(320, 320)) qt.qpa.theme: Successfully created platform theme "windows" qt.qpa.gl: QWindowsIntegration::createPlatformOpenGLContext QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile) qt.qpa.gl: Basic wglCreateContext gives version 4.6 qt.qpa.gl: OpenGL 2.0 entry points available qt.qpa.gl: GPU features: QSet("disable_program_cache") qt.qpa.gl: Disabling program cache: GpuDescription(vendorId=0x8086, deviceId=0x46a8, subSysId=0x8aa1103c, revision=12, driver: "igd10iumd64.dll", version=QVersionNumber(31.0.101.5388), "Intel(R) Iris(R) Xe Graphics""") qt.qpa.gl: QWindowsOpenGLTester::supportedRenderers GpuDescription(vendorId=0x8086, deviceId=0x46a8, subSysId=0x8aa1103c, revision=12, driver: "igd10iumd64.dll", version=QVersionNumber(31.0.101.5388), "Intel(R) Iris(R) Xe Graphics""") 0 renderer: QFlags(0x1|0x20|0x200) qt.qpa.gl: Qt: Using WGL and OpenGL from "opengl32" qt.qpa.window: QWindowsContext::registerWindowClass "Qt670dOpenGLDummyWindow" style=0x0 brush=0x0 icon=false atom=49818 qt.qpa.gl: QOpenGLStaticContext::create OpenGL: "Intel","Intel(R) Iris(R) Xe Graphics" default ContextFormat: v4.6 profile: QSurfaceFormat::CompatibilityProfile options: QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions),SampleBuffers, Extension-API present Extensions: 246 qt.qpa.gl: QWindowsGLContext::QWindowsGLContext WGL extensions: WGL_EXT_depth_float WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_pixel_format WGL_ARB_pbuffer WGL_EXT_extensions_string WGL_EXT_swap_control WGL_ARB_multisample WGL_ARB_pixel_format_float WGL_ARB_framebuffer_sRGB WGL_ARB_create_context WGL_ARB_create_context_profile WGL_EXT_pixel_format_packed_float WGL_EXT_create_context_es_profile WGL_EXT_create_context_es2_profile WGL_NV_DX_interop WGL_NV_DX_interop2 WGL_ARB_robustness_application_isolation WGL_ARB_robustness_share_group_isolation WGL_ARB_create_context_robustness WGL_ARB_context_flush_control qt.qpa.gl: "ARB::choosePixelFormat Attributes: 0x2003 , 0x2027 , 0x2010 , 0x1 , 0x2001 , 0x1 , 0x2014 , 0x18 , 0x2011 , 0x1 , 0x2013 , 0x202b , 0x201b , 0x8 , 0x2023 , 0x8 , 0x2041 , 0x0 , \n obtained px # 5 of 1 \n PIXELFORMATDESCRIPTOR dwFlags=0x8025 PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_SUPPORT_COMPOSITION PFD_DOUBLEBUFFER iPixelType=0 cColorBits=32 cRedBits=8 cRedShift=16 cGreenBits=8 cGreenShift=8 cBlueBits=8 cBlueShift=0 cDepthBits=24 cStencilBits=8 iLayerType=0 cAlphaBits=8 cAlphaShift=24 cAccumBits=64 cAccumRedBits=16 cAccumGreenBits=16 cAccumBlueBits=16 cAccumAlphaBits=16 " qt.qpa.gl: ARB::createContext Creating context version 2 . 0 3 attributes qt.qpa.gl: QWindowsGLContext::QWindowsGLContext 0x2529a65cd00 ARB requested: QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile) obtained # 5 ARB QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::CompatibilityProfile) PIXELFORMATDESCRIPTOR dwFlags=0x8025 PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_SUPPORT_COMPOSITION PFD_DOUBLEBUFFER iPixelType=0 cColorBits=32 cRedBits=8 cRedShift=16 cGreenBits=8 cGreenShift=8 cBlueBits=8 cBlueShift=0 cDepthBits=24 cStencilBits=8 iLayerType=0 cAlphaBits=8 cAlphaShift=24 cAccumBits=64 cAccumRedBits=16 cAccumGreenBits=16 cAccumBlueBits=16 cAccumAlphaBits=16 swap interval: 1 default: ContextFormat: v4.6 profile: QSurfaceFormat::CompatibilityProfile options: QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions) HGLRC= 0x30000 qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.7.0/msvc2019_64/plugins/styles" ... qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/styles/qmodernwindowsstyle.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/styles/qmodernwindowsstyle.dll, metadata= { "IID": "org.qt-project.Qt.QStyleFactoryInterface", "MetaData": { "Keys": [ "windowsvista", "windows11" ] }, "archlevel": 0, "className": "QModernWindowsStylePlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/styles/qmodernwindowsstyle.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/styles/qmodernwindowsstyled.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/styles/qmodernwindowsstyled.dll, metadata= { "IID": "org.qt-project.Qt.QStyleFactoryInterface", "MetaData": { "Keys": [ "windowsvista", "windows11" ] }, "archlevel": 0, "className": "QModernWindowsStylePlugin", "debug": true, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windowsvista", "windows11") qt.core.plugin.factoryloader: checking directory path "C:/Users/User/Documents/Path/PdfWriterTest/build/Desktop_Qt_6_7_0_MSVC2019_64bit-Debug/debug/styles" ... qt.core.library: "C:/Qt/6.7.0/msvc2019_64/plugins/styles/qmodernwindowsstyled.dll" loaded library qt.qpa.backingstore: Check for forced use of QRhi resulted in enable false with api Null qt.qpa.menus: QWindowsTheme::createPlatformMenuBar qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.7.0/msvc2019_64/plugins/iconengines" ... qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/iconengines/qsvgicon.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/iconengines/qsvgicon.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/iconengines/qsvgicon.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/iconengines/qsvgicond.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/iconengines/qsvgicond.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("svg", "svgz", "svg.gz") qt.core.plugin.factoryloader: checking directory path "C:/Users/User/Documents/Path/PdfWriterTest/build/Desktop_Qt_6_7_0_MSVC2019_64bit-Debug/debug/iconengines" ... qt.gui.icon.loader: Initialized icon loader with system theme "" and SVG support true qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats" ... qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qgif.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qgif.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qgif.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qgifd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qgifd.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("gif") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qicns.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qicns.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qicns.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qicnsd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qicnsd.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("icns") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qico.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qico.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qico.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qicod.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qicod.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("ico", "cur") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qjpeg.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qjpeg.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qjpeg.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qjpegd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qjpegd.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("jpg", "jpeg") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qpdf.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qpdf.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qpdf.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qpdfd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qpdfd.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("pdf") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qsvg.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qsvg.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qsvg.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qsvgd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qsvgd.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("svg", "svgz") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtga.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtga.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtga.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtgad.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtgad.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("tga") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtiff.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtiff.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtiff.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtiffd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qtiffd.dll, metadata= { ... "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("tiff", "tif") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwbmp.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwbmp.dll, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "wbmp" ], "MimeTypes": [ "image/vnd.wap.wbmp" ] }, "archlevel": 0, "className": "QWbmpPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwbmp.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwbmpd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwbmpd.dll, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "wbmp" ], "MimeTypes": [ "image/vnd.wap.wbmp" ] }, "archlevel": 0, "className": "QWbmpPlugin", "debug": true, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wbmp") qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwebp.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwebp.dll, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "webp" ], "MimeTypes": [ "image/webp" ] }, "archlevel": 0, "className": "QWebpPlugin", "debug": false, "version": 395008 } qt.core.plugin.factoryloader: "The plugin 'C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwebp.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin qt.core.plugin.factoryloader: looking at "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwebpd.dll" qt.core.plugin.loader: Found metadata in lib C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwebpd.dll, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "webp" ], "MimeTypes": [ "image/webp" ] }, "archlevel": 0, "className": "QWebpPlugin", "debug": true, "version": 395008 } qt.core.plugin.factoryloader: Got keys from plugin meta data QList("webp") qt.core.plugin.factoryloader: checking directory path "C:/Users/User/Documents/Path/PdfWriterTest/build/Desktop_Qt_6_7_0_MSVC2019_64bit-Debug/debug/imageformats" ... qt.core.library: "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qgifd.dll" loaded library .... qt.core.library: "C:/Qt/6.7.0/msvc2019_64/plugins/imageformats/qwebpd.dll" loaded library qt.gui.icc: fromIccProfile: sRGB primaries detected qt.gui.icc: fromIccProfile: sRGB gamma detected qt.gui.icc: fromIccProfile: Description "GIMP built-in sRGB" qt.gui.icc: fromIccProfile: Named colorspace detected: QColorSpace::SRgb qt.widgets.showhide: Setting visibility of QToolButton(0x252977ce1f0, name="qt_menubar_ext_button") with attributes [WA_PendingMoveEvent,WA_PendingResizeEvent,WA_WState_OwnSizePolicy,WA_QuitOnClose,WA_ContentsMarginsRespectsSafeArea] to false via QWidget qt.widgets.showhide: Setting visibility of QToolButton(0x252977ce1f0, name="qt_menubar_ext_button") with attributes [WA_PendingMoveEvent,WA_PendingResizeEvent,WA_WState_OwnSizePolicy,WA_WState_ExplicitShowHide,WA_QuitOnClose,WA_ContentsMarginsRespectsSafeArea] to false via QWidgetPrivate qt.widgets.showhide: Hiding children of QToolButton(0x252977ce1f0, name="qt_menubar_ext_button") spontaneously false qt.widgets.showhide: Setting visibility of QSizeGrip(0x2529769c480) with attributes [WA_PendingMoveEvent,WA_PendingResizeEvent,WA_SetCursor,WA_WState_OwnSizePolicy,WA_QuitOnClose,WA_ContentsMarginsRespectsSafeArea] to false via QWidget qt.widgets.showhide: Setting visibility of QSizeGrip(0x2529769c480) with attributes [WA_PendingMoveEvent,WA_PendingResizeEvent,WA_SetCursor,WA_WState_OwnSizePolicy,WA_WState_ExplicitShowHide,WA_QuitOnClose,WA_ContentsMarginsRespectsSafeArea] to false via QWidgetPrivate qt.widgets.showhide: Hiding children of QSizeGrip(0x2529769c480) spontaneously false qt.text.font.db: Populating font database qt.qpa.fonts: QWindowsFontDatabase::QWindowsFontDatabase Clear type: true gamma: 1.2 qt.text.font.db: Registering family "System" qt.text.font.db: Registering family "Fixedsys" ... qt.qpa.fonts: QWindowsFontDatabaseBase::systemDefaultFont QFont(Segoe UI,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1) qt.text.font.db: Registering family "Segoe UI" qt.qpa.fonts: There's no default EUDC font specified qt.text.font.match: QFontDatabasePrivate::match request: family: Segoe UI [-- any --], script: 2 styleName: -- any -- weight: 400, style: 0 stretch: 0 pixelSize: 12 pitch: * qt.qpa.fonts: "Segoe UI" qt.qpa.fonts: "addFontToDatabase Segoe UI 0 TTF=1 TRUETYPE scalable=1 Size=65535 Style=1 Weight=400 stretch=100 styleName=Cursief" qt.text.font.db: Adding font: familyName "Segoe UI" stylename "Cursief" weight 400 style QFont::StyleItalic pixelSize 0 antialiased false fixed false qt.text.font.match: REMARK: looking for best foundry for family 'Segoe UI' [1] qt.text.font.match: looking for matching style in foundry '-- none --' 4 qt.text.font.match: best style has distance 0x0 qt.text.font.match: found smoothly scalable font (12 pixels) qt.text.font.match: found a match: score 0 best score so far ffffffff qt.qpa.fonts: QWindowsFontDatabase::createEngine "Segoe UI" 9 pt hintingPreference= QFont::PreferDefaultHinting color= false 96 dpi useDirectWrite= true qt.qpa.fonts: QWindowsFontEngineDirectWrite::QWindowsFontEngineDirectWrite 12 qt.qpa.fonts: QWindowsFontDatabase::fontEngine FONTDEF QFontDef(Family="Segoe UI", pointsize=9, pixelsize=12, styleHint=5, weight=400, stretch=100, hintingPreference=0) 0x2529a74a5d0 0x0 qt.accessibility.cache: insert - id: 2147483648 iface: QAccessibleInterface(0x2529a6c44f0 name="PushButton" role=Button obj=QPushButton(0x252977cccc0, name = "pushButton")"focusable|invisible") qt.accessibility.cache: insert - id: 2147483649 iface: QAccessibleInterface(0x2529a6c5bf0 name="print" role=Button obj=QPushButton(0x252977cd300, name = "pushButton_2")"focusable|invisible") qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.7.0/msvc2019_64/plugins/printsupport" ... qt.core.plugin.factoryloader: checking directory path "C:/Users/User/Documents/Path/PdfWriterTest/build/Desktop_Qt_6_7_0_MSVC2019_64bit-Debug/debug/printsupport" ... HEAP[PdfWriterTest.exe]: HEAP: Free Heap block 000002529A6E33D0 modified at 000002529A6E342C after it was freed
-
Hi,
One possibly silly test to do: switch to English and try again.
-
wrote on 23 Sept 2024, 09:35 last edited by
@SGaist Thanks for the good suggestion.
I changed my windows language from Dutch to English, but unfortunately, this doesn't resolve the issue.
I also fixed my qt's language at English but that didn't solve the issue either. -
wrote on 23 Sept 2024, 09:44 last edited by
Hi, I don't have access to exact mirror of your specs, but I built similar test program under Win11, Cmake and mingw. And it runs properly.
I don't have good experience with msvc, there was always something not working, so I avoid it like a plague...But back to your problem: what if you try to initialise QPrinter using QPrinterInfo? Allow it to enumerate printers, then pick one (or all of them one by one)?
-
wrote on 24 Sept 2024, 07:50 last edited by
Support gave me the instructions to delete all my printer drivers. I did that and now it works. With that info I continued with locating the exact problem and it seems that the microsoft print to PDF feature causes a bug.
I would still like to know how to fix this, because it seems to me that this driver is used by multiple users
-
Support gave me the instructions to delete all my printer drivers. I did that and now it works. With that info I continued with locating the exact problem and it seems that the microsoft print to PDF feature causes a bug.
I would still like to know how to fix this, because it seems to me that this driver is used by multiple users
wrote on 24 Sept 2024, 16:49 last edited by@MHMart_asc Initialise your printer making sure that's not the print to pdf option? Like I wrote above.
If your goal is to print to pdf and not to actual printer, you might want to take a look at QPdfWriter instead.
1/6