question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SP5: The specified window isn't an OpenGL window

See original GitHub issue

Bug Report

Issue: when I run a test project with .net framework 4.6.2 and set to build x64 taeget, it will crash

System.Windows.Markup.XamlParseException:“对类型“SkiaSharp.Views.WPF.SKGLElement”的构造函数执行符合指定的绑定约束的调用时引发了异常。”
GraphicsContextException: The specified window isn't an OpenGL window

( I tested it is ok on .net 6.0 )

Reproducing:

  1. follow WPF demo in this repo, create a WPF .net framework project
  2. add nuget pack to this project, version 5.0.2 beta
  3. add <ScottPlot:WpfPlot Name="WpfPlot" /> to MainWindow.xaml
  4. add a target x64 and change Any CPU to this
  5. run, then crash at InitializeComponent()

whole project here: ScottPlotTest.zip

System Details

  • ScottPlot Version: 5.0.2 beta
  • Operating System: Windows 10
  • Application Type: WPF
  • .NET Version: .net framework 4.6.2

last version(5.0.1 beta) works well

Issue Analytics

  • State:closed
  • Created 6 months ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

SDL_GL_CreateContext fails on MacOS Big Sur #4428
It works on MacOS Catalina and on Ubuntu. The error msg is: "Unable to create context: The specified window isn't an OpenGL window"....
Read more >
Context creation fails - c++
So now when I execute the project, first I make the window (this is succesfull) and then I call the mainLoop procedure (from...
Read more >
Context is NULL with SDL_CreateWindowFrom Win32
According to this thread it seems that creating OpenGL contexts from foreign windows isn't currently supported in SDL.
Read more >
[SDL 1.3] Create Opengl Context without window?
Hi is it possible to create an opengl context in SDL 1.3 without a window? E.g. Create SDL Window Get Opengl Context from...
Read more >
Difference between window and context? : r/opengl
A window is something you can draw to (a drawable). A context is kind of the "machine" that is doing the drawing. It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found