Crash when select Buttons tree item
kant2002 opened this issue · comments
I decide to try https://github.com/lytico/xwt/tree/lytico_gtksharp to test GtkSharp/GtkSharp#301
So I run on .NET 6.0 without my patch GtkSharpTest application and it's crashed when select Widgets -> Buttons.
Exception in Gtk# callback delegate
Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NullReferenceException: Object reference not set to an instance of an object.
at Gtk.Widget.DrawnSignalCallback(IntPtr inst, IntPtr arg0, IntPtr gch)
at GLib.ExceptionManager.RaiseUnhandledException(Exception e, Boolean is_terminal)
at Gtk.Widget.DrawnSignalCallback(IntPtr inst, IntPtr arg0, IntPtr gch)
at Gtk.Application.Run()
at Xwt.GtkBackend.GtkEngine.RunApplication() in /home/kant/d/github/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs:line 164
at Xwt.Toolkit.InvokePlatformCode(Action a) in /home/kant/d/github/xwt/Xwt/Xwt/Toolkit.cs:line 534
at Xwt.Application.Run() in /home/kant/d/github/xwt/Xwt/Xwt/Application.cs:line 152
at Samples.App.Run(ToolkitType type) in /home/kant/d/github/xwt/TestApps/Samples/App.cs:line 17
at GtkTest.MainClass.Main(String[] args) in /home/kant/d/github/xwt/TestApps/Gtk3Test
I would like to know, is this something on my system? Something with XWT or something with GtkSharp? Any ideas
:-(
interesting ... i checked out that branch as is, changed Targetframework to net 6.0 and it works:
os: Ubuntu 20.04 focal
GtkSharpTest.csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType></DebugType>
<DefineConstants>TRACE;RELEASE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Xwt\Xwt.csproj" />
<ProjectReference Include="..\Samples\Samples.csproj" />
<ProjectReference Include="..\..\Xwt.GtkSharp\Xwt.GtkSharp.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Gtk3Test\AssemblyInfo.cs">
<Link>AssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\Gtk3Test\Main.cs">
<Link>Main.cs</Link>
</Compile>
</ItemGroup>
</Project>
Im on Gentoo, so if that’s fine I have to debug myself
I did try switch GtkSharp to develop version and hit following errors
~/xwt/Xwt.Gtk/Xwt.GtkBackend/Gtk3ViewPort.cs(88,35): error CS0539: 'GtkViewPort.GetBorder(Border)' in explicit interface declaration is not found among members of the interface that can be implemented [~/xwt/Xwt.GtkSharp/Xwt.GtkSharp.csproj]
~/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkWebKitMini.cs(49,24): error CS0539: 'WebView.GetBorder(Border)' in explicit interface declaration is not found among members of the interface that can be implemented [~/xwt/Xwt.GtkSharp/Xwt.GtkSharp.csproj]
~/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkWebKitMini.cs(33,40): error CS0535: 'WebView' does not implement interface member 'IScrollable.GetBorder(out Border)' [~/xwt/Xwt.GtkSharp/Xwt.GtkSharp.csproj]
~/xwt/Xwt.Gtk/Xwt.GtkBackend/Gtk3ViewPort.cs(30,37): error CS0535: 'GtkViewPort' does not implement interface member 'IScrollableImplementor.GetBorder(out Border)' [~/xwt/Xwt.GtkSharp/Xwt.GtkSharp.csproj]
is this expected?