Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when select Buttons tree item #27

Open
kant2002 opened this issue Jan 22, 2022 · 3 comments
Open

Crash when select Buttons tree item #27

kant2002 opened this issue Jan 22, 2022 · 3 comments

Comments

@kant2002
Copy link

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

@lytico
Copy link
Owner

lytico commented Jan 26, 2022

:-(
interesting ... i checked out that branch as is, changed Targetframework to net 6.0 and it works:

os: Ubuntu 20.04 focal

grafik

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>

@kant2002
Copy link
Author

Im on Gentoo, so if that’s fine I have to debug myself

@kant2002
Copy link
Author

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?

kant2002 added a commit to kant2002/xwt that referenced this issue Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants