Skip to content

WPF - Exception on wakeup from sleep #4426

@ray007

Description

@ray007
  • What version of the product are you using?
    using CefSharp 110.0.280, selfcompiled for media codecs.

  • What architecture x86 or x64?
    x86/x64 - problem occured on x64

  • What version of .Net?
    .Net 4.8.2

  • On what operating system?
    Win10

  • Are you using WinForms, WPF or OffScreen?
    WPF

  • What steps will reproduce the problem?
    hard to reproduce, since it only happens sometimes on wakeup from sleep.
    this morning I caught it with Visual Studio in WriteableBitmapRenderHandler.cs on line 173 calling bitmap.Unlock.

  • Please provide any additional information below.

Exception Message:

Value cannot be null.
Parameter name: sourceBuffer

StackTrace:

   at System.Windows.Media.Imaging.WriteableBitmap.WritePixelsImpl(Int32Rect sourceRect, IntPtr sourceBuffer, Int32 sourceBufferSize, Int32 sourceBufferStride, Int32 destinationX, Int32 destinationY, Boolean backwardsCompat)
   at CefSharp.Wpf.Rendering.WritableBitmapRenderHandler.<>c__DisplayClass8_0.<CreateOrUpdateBitmap>b__0() in C:\devel\cef\CefSharp\CefSharp.Wpf\Rendering\WritableBitmapRenderHandler.cs:line 173
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 980
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 928
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 917
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at Loytec.LWeb.LWeb803.App.Main() in C:\rtc-sandbox\ws_rb_lweb\lweb\src\lweb_802\src\CefSharpApp\lweb802\App.xaml.cs:line 369

Nothing crash related to see in the debug log, just a lot of VERBOSE messages like

[0310/080923.422:VERBOSE1:layout_shift_tracker.cc(362)]  (starting point from 52.562,417.352 to 35.0414,278.085)
[0310/080923.422:VERBOSE1:layout_shift_tracker.cc(353)] in "http://lwebapp.localhost/?pId=Settings0&dist=lweb803#", 000006DD016664D8:LayoutText #text moved from 35.7152,279.432 84.9079x9.43421 to 35.4906,278.983 56.6053x9.43421 (visible from 36,279 57x9 to 35,279 57x9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    wpfWPF Implementation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions