https://bugs.documentfoundation.org/show_bug.cgi?id=169876

--- Comment #12 from Mike Kaganski <[email protected]> ---
Hmm, I intended to write that I don't get the problem with software rendering,
and then I got a crash.

I got at least three different manifestations to now, and all of them look
related to HDC management.

With sw rendering, I see a crash because of unhandled exception in VCL Main
thread:

> vcruntime140d.dll!_CxxThrowException(void * pExceptionObject, const 
> _s__ThrowInfo * pThrowInfo) Line 79       C++
> vcllo.dll!VirtualDevice::ImplInitVirDev(const OutputDevice * pOutDev, __int64 
> nDX, __int64 nDY, const SystemGraphicsData * pData) Line 168    C++
> vcllo.dll!VirtualDevice::VirtualDevice(const OutputDevice * pCompDev, 
> DeviceFormat eFormatAndAlpha, OutDevType eOutDevType) Line 216  C++
> vcllo.dll!VirtualDevice::VirtualDevice(const OutputDevice & rCompDev, 
> DeviceFormat eFormat) Line 102  C++
> vcllo.dll!VclPtr<VirtualDevice>::Create<OutputDevice &>(OutputDevice & 
> <arg_0>) Line 143      C++
> vcllo.dll!vcl::BufferDevice::BufferDevice(const VclPtr<vcl::Window> & 
> pWindow, OutputDevice & rRenderContext) Line 15 C++
> vcllo.dll!MenuBarWindow::Paint(OutputDevice & rRenderContext, const 
> tools::Rectangle & __formal) Line 886     C++
> vcllo.dll!PaintHelper::DoPaint(const vcl::Region * pRegion) Line 316  C++
> vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, 
> ImplPaintFlags nPaintFlags) Line 618        C++
> vcllo.dll!PaintHelper::~PaintHelper() Line 553        C++
> vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, 
> ImplPaintFlags nPaintFlags) Line 624        C++
> vcllo.dll!vcl::Window::ImplCallOverlapPaint() Line 645        C++
> vcllo.dll!vcl::Window::ImplHandlePaintHdl(Timer * __formal) Line 668  C++
> vcllo.dll!vcl::Window::LinkStubImplHandlePaintHdl(void * instance, Timer * 
> data) Line 649     C++
> vcllo.dll!Link<Timer *,void>::Call(Timer * data) Line 105     C++
> vcllo.dll!Timer::Invoke() Line 75     C++
> vcllo.dll!Scheduler::CallbackTaskScheduling() Line 614        C++
> vcllo.dll!SalTimer::CallCallback() Line 53    C++
> vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 169      C++
> vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 
> 481     C++
> vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool 
> bHandleAllCurrentEvents) Line 537  C++
> vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 389 C++
> vcllo.dll!Application::Yield() Line 502       C++
> vcllo.dll!Application::Execute() Line 365     C++
> sofficeapp.dll!desktop::Desktop::Main() Line 1681     C++
> vcllo.dll!ImplSVMain() Line 230       C++
> vcllo.dll!SVMain() Line 249   C++
> sofficeapp.dll!soffice_main() Line 122        C++
> soffice.bin!sal_main() Line 51        C
> soffice.bin!main(int argc, char * * argv) Line 49     C
> soffice.bin!invoke_main() Line 79     C++
> soffice.bin!__scrt_common_main_seh() Line 288 C++
> soffice.bin!__scrt_common_main() Line 331     C++
> soffice.bin!mainCRTStartup(void * __formal) Line 17   C++
> kernel32.dll!BaseThreadInitThunk()    Unknown
> ntdll.dll!RtlUserThreadStart()        Unknown

The problem is null in pOutDev->mpGraphics, even after AcquireGraphics. pOutDev
is vcl::WindowOutputDevice there. And its mxOwnerWindow->mpWindowImpl->mpFrame
has mbGraphicsAcquired true, mpThreadGraphics null, and mpLocalGraphics
non-empty.

It is curious that WinSalFrame::AcquireGraphics() returns null when already
acquired! It may be what happens here.

Another problem - but IMO related - I saw with Vulcan. There, a loop in
WindowOutputDevice::AcquireGraphics() was calling it, "while ( !mpGraphics )" -
but again, it was always returning nullptr exactly because the frame's
AcquireGraphics saw it's already initialized.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to