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

Gstreamer bindings #103

Open
OmegaRogue opened this issue Apr 2, 2023 · 19 comments
Open

Gstreamer bindings #103

OmegaRogue opened this issue Apr 2, 2023 · 19 comments

Comments

@OmegaRogue
Copy link

So, I generated gstreamer bindings (outside of the nix environment, I havent been able to figure out how to install gstreamer there properly) and I'm trying to run approximately the same example i wrote with self written bindings, step by step.
There wasn't anything generated for gst_init, which needs to be called before using anything else from gstreamer, and once i built the first part of my example, which just calls self written bindings for gst_init and then uses the generated bindings to check if its initialized, i get these errors:

../pkg/gst/gstbuffer.go:49:2: BufferCopyFlags redeclared in this block
	../pkg/gst/gstbuffer.go:43:6: other declaration of BufferCopyFlags
../pkg/gst/gststructure.go:288:6: NewStructureFromString redeclared in this block
	../pkg/gst/gststructure.go:238:6: other declaration of NewStructureFromString
../pkg/gst/gstallocator.go:165:20: undefined: coreglib.GoPrivateFromObject
../pkg/gst/gstbin.go:332:20: undefined: coreglib.GoPrivateFromObject
../pkg/gst/gstbin.go:366:20: undefined: coreglib.GoPrivateFromObject
../pkg/gst/gstbin.go:398:20: undefined: coreglib.GoPrivateFromObject
../pkg/gst/gstbin.go:430:20: undefined: coreglib.GoPrivateFromObject
../pkg/gst/gstbin.go:444:20: undefined: coreglib.GoPrivateFromObject
../pkg/gst/gstbin.go:472:20: undefined: coreglib.GoPrivateFromObject
../pkg/gst/gstbin.go:500:20: undefined: coreglib.GoPrivateFromObject
../pkg/gst/gstbin.go:500:20: too many errors

Here is the example:

package main

// #cgo pkg-config: gstreamer-1.0 glib-2.0 gstreamer-app-1.0 gstreamer-video-1.0
/*
#include <gst/gst.h>
void gstreamer_init() {
    gst_init(NULL, NULL);
}
*/
import "C"

import (
	"fmt"
	"os"

	"github.com/diamondburned/gotk4/pkg/gio/v2"
	"github.com/diamondburned/gotk4/pkg/gst"
	"github.com/diamondburned/gotk4/pkg/gtk/v4"
)

func main() {
	app := gtk.NewApplication("com.github.diamondburned.gotk4-examples.gtk4.simple", gio.ApplicationFlagsNone)
	app.ConnectActivate(func() { activate(app) })

	if code := app.Run(os.Args); code > 0 {
		os.Exit(code)
	}
}

func activate(app *gtk.Application) {
	C.gstreamer_init()

	fmt.Println(gst.IsInitialized())

	window := gtk.NewApplicationWindow(app)
	window.SetTitle("gotk4 Example")
	window.SetChild(gtk.NewLabel("Hello from Go!"))
	window.SetDefaultSize(400, 300)
	window.Show()
}
@OmegaRogue
Copy link
Author

With a bunch of manual fixes I've been able to get it running, but that doesn't seem like the ideal way to do things

@OmegaRogue
Copy link
Author

in reference to #102:

Adding buildInputs = pkgs: with pkgs; [ gst_all_1.gstreamer ]; into the base attrs of .nix/default.nix should suffice.
I did this:

{ action }:

let src = import ./src.nix;

in import "${src.gotk4-nix}/${action}.nix" {
	base = {
		pname   = "gotk4";
		version = "dev";
		buildInputs = pkgs: with pkgs; [ gst_all_1.gstreamer ];
	};
	pkgs = import "${src.gotk4-nix}/pkgs.nix" {
		sourceNixpkgs = builtins.fetchTarball {
			name   = "gotk4-nixpkgs";
			url    = "https://github.com/NixOS/nixpkgs/archive/fbfb79400a08bf754e32b4d4fc3f7d8f8055cf94.tar.gz";
			sha256 = "0pgyx1l1gj33g5i9kwjar7dc3sal2g14mhfljcajj8bqzzrbc3za";
		};
		useFetched = true;
	};
}

and running go generate ./... gives me this:

2023/04/03 02:17:33 error adding package "gstreamer-1.0": failed to get gir files for "gstreamer-1.0": includeDir has unexpected name "gstreamer-1.0" not 'include'
exit status 1
gotk4.go:3: running "go": exit status 1

@OmegaRogue
Copy link
Author

Also, I added {Name: "gstreamer-1.0"}, to the Packages variable in https://github.com/diamondburned/gotk4/blob/4/gir/cmd/gir-generate/gendata/gendata.go

@diamondburned
Copy link
Owner

Commit b27ae8a should fix the generator to work with this. It should just generate now.

@diamondburned
Copy link
Owner

../pkg/gst/gstbin.go:332:20: undefined: coreglib.GoPrivateFromObject

This is a weird error. I can't find an instance of GoPrivateFromObject anywhere. Are you perhaps on a different branch or an old commit?

@OmegaRogue
Copy link
Author

Yes, i was a few commits behind, everything is mostly working now, except for the error

2023/04/03 20:18:37 error verifying generation: unexpected file/folder "gst"
exit status 1

And a few errors in the generated code, and also a few errors in the existing code:
image

@diamondburned
Copy link
Owner

2023/04/03 20:18:37 error verifying generation: unexpected file/folder "gst"

You'll also have to add "gst" into PkgGenerated as well.

@diamondburned
Copy link
Owner

And a few errors in the generated code, and also a few errors in the existing code:

I'm not sure why your IDE is reporting these as errors. They build fine using the standard compiler.

@OmegaRogue
Copy link
Author

Probably just a false positive. I added the package gst_all_1.gst-plugins-base because that contains some GIR files that I also need bindings for, and got this error:

girgen: skipped: package glib/v2: record Thread
girgen: skipped: package glib/v2: record ThreadPool
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc02dba6328 stack=[0xc02dba6000, 0xc04dba6000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x66f3e6?, 0x81dfe0?})
        /home/omegarogue/go/go1.18/src/runtime/panic.go:992 +0x71
runtime.newstack()
        /home/omegarogue/go/go1.18/src/runtime/stack.go:1101 +0x5cc
runtime.morestack()
        /home/omegarogue/go/go1.18/src/runtime/asm_amd64.s:547 +0x8b

goroutine 137 [running]:
github.com/diamondburned/gotk4/gir/girgen/types.CleanCType({0xc006961ba0?, 0xd?}, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/types.go:297 +0x85 fp=0xc02dba6338 sp=0xc02dba6330 pc=0x5c0f25
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:35 +0x96 fp=0xc02dba6718 sp=0xc02dba6338 pc=0x5cc256
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cf70?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba6790 sp=0xc02dba6718 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba6800?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba6800 sp=0xc02dba6790 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba6878 sp=0xc02dba6800 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba6c58 sp=0xc02dba6878 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cf50?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba6cd0 sp=0xc02dba6c58 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba6d40?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba6d40 sp=0xc02dba6cd0 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba6db8 sp=0xc02dba6d40 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba7198 sp=0xc02dba6db8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cf30?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba7210 sp=0xc02dba7198 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba7280?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba7280 sp=0xc02dba7210 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba72f8 sp=0xc02dba7280 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba76d8 sp=0xc02dba72f8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cf10?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba7750 sp=0xc02dba76d8 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba77c0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba77c0 sp=0xc02dba7750 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba7838 sp=0xc02dba77c0 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba7c18 sp=0xc02dba7838 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cef0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba7c90 sp=0xc02dba7c18 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba7d00?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba7d00 sp=0xc02dba7c90 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba7d78 sp=0xc02dba7d00 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba8158 sp=0xc02dba7d78 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77ced0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba81d0 sp=0xc02dba8158 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba8240?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba8240 sp=0xc02dba81d0 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba82b8 sp=0xc02dba8240 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba8698 sp=0xc02dba82b8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77ceb0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba8710 sp=0xc02dba8698 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba8780?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba8780 sp=0xc02dba8710 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba87f8 sp=0xc02dba8780 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba8bd8 sp=0xc02dba87f8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77ce90?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba8c50 sp=0xc02dba8bd8 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba8cc0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba8cc0 sp=0xc02dba8c50 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba8d38 sp=0xc02dba8cc0 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba9118 sp=0xc02dba8d38 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77ce70?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba9190 sp=0xc02dba9118 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba9200?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba9200 sp=0xc02dba9190 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba9278 sp=0xc02dba9200 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba9658 sp=0xc02dba9278 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77ce30?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba96d0 sp=0xc02dba9658 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba9740?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba9740 sp=0xc02dba96d0 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba97b8 sp=0xc02dba9740 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dba9b98 sp=0xc02dba97b8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77ce10?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dba9c10 sp=0xc02dba9b98 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dba9c80?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dba9c80 sp=0xc02dba9c10 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dba9cf8 sp=0xc02dba9c80 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbaa0d8 sp=0xc02dba9cf8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cde0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbaa150 sp=0xc02dbaa0d8 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbaa1c0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbaa1c0 sp=0xc02dbaa150 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbaa238 sp=0xc02dbaa1c0 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbaa618 sp=0xc02dbaa238 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cdc0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbaa690 sp=0xc02dbaa618 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbaa700?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbaa700 sp=0xc02dbaa690 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbaa778 sp=0xc02dbaa700 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbaab58 sp=0xc02dbaa778 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cda0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbaabd0 sp=0xc02dbaab58 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbaac40?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbaac40 sp=0xc02dbaabd0 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbaacb8 sp=0xc02dbaac40 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbab098 sp=0xc02dbaacb8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cd80?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbab110 sp=0xc02dbab098 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbab180?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbab180 sp=0xc02dbab110 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbab1f8 sp=0xc02dbab180 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbab5d8 sp=0xc02dbab1f8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cd60?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbab650 sp=0xc02dbab5d8 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbab6c0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbab6c0 sp=0xc02dbab650 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbab738 sp=0xc02dbab6c0 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbabb18 sp=0xc02dbab738 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cd40?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbabb90 sp=0xc02dbabb18 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbabc00?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbabc00 sp=0xc02dbabb90 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbabc78 sp=0xc02dbabc00 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbac058 sp=0xc02dbabc78 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cd10?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbac0d0 sp=0xc02dbac058 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbac140?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbac140 sp=0xc02dbac0d0 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbac1b8 sp=0xc02dbac140 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbac598 sp=0xc02dbac1b8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cce0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbac610 sp=0xc02dbac598 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbac680?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbac680 sp=0xc02dbac610 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbac6f8 sp=0xc02dbac680 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbacad8 sp=0xc02dbac6f8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77ccc0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbacb50 sp=0xc02dbacad8 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbacbc0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbacbc0 sp=0xc02dbacb50 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbacc38 sp=0xc02dbacbc0 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbad018 sp=0xc02dbacc38 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cca0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbad090 sp=0xc02dbad018 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbad100?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbad100 sp=0xc02dbad090 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbad178 sp=0xc02dbad100 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbad558 sp=0xc02dbad178 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cc70?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbad5d0 sp=0xc02dbad558 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbad640?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbad640 sp=0xc02dbad5d0 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbad6b8 sp=0xc02dbad640 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbada98 sp=0xc02dbad6b8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cc50?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbadb10 sp=0xc02dbada98 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbadb80?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbadb80 sp=0xc02dbadb10 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbadbf8 sp=0xc02dbadb80 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbadfd8 sp=0xc02dbadbf8 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cc30?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbae050 sp=0xc02dbadfd8 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbae0c0?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbae0c0 sp=0xc02dbae050 pc=0x5d44a5
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam.func1(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:365
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convertParam(0xc008eca140, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:376 +0x1de fp=0xc02dbae138 sp=0xc02dbae0c0 pc=0x5d50fe
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocArrayConverter(0xc008eca140, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:44 +0x159 fp=0xc02dbae518 sp=0xc02dbae138 pc=0x5cc319
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).gocConvert(0xc00b77cc10?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/go-c.go:24 +0x18f fp=0xc02dbae590 sp=0xc02dbae518 pc=0x5cc0ef
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc02dbae600?, 0xc001e614b0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:230 +0x1a5 fp=0xc02dbae600 sp=0xc02dbae590 pc=0x5d44a5
created by github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:240 +0x28a

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0x1?)
        /home/omegarogue/go/go1.18/src/runtime/sema.go:56 +0x25
sync.(*WaitGroup).Wait(0xc00b537801?)
        /home/omegarogue/go/go1.18/src/sync/waitgroup.go:136 +0x52
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages(0xc006ab1980, {0x7fff6789e0bd, 0x6}, {0x831600, 0xa, 0xc00009d6f0?}, {0x82b6f0, 0x1, 0x1})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:258 +0x62d
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.Generate({_, _, _}, {{0x677c23, 0x22}, {0x831600, 0xa, 0xa}, {0x0, 0x0, ...}, ...})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genmain.go:183 +0x950
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.Run({{0x677c23, 0x22}, {0x831600, 0xa, 0xa}, {0x0, 0x0, 0x0}, 0xc0002c1a10, 0x0, ...})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genmain.go:152 +0x118
main.main()
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/main.go:20 +0xbd

goroutine 28 [runnable]:
fmt.(*pp).free(0xc009833930?)
        /home/omegarogue/go/go1.18/src/fmt/print.go:146 +0xe8
fmt.Fprint({0x6caa40, 0xc003c5ee70}, {0xc0181f2690, 0x1, 0x1})
        /home/omegarogue/go/go1.18/src/fmt/print.go:234 +0x8e
text/template.(*state).printValue(0xc0181f2aa8, {0x6cce18?, 0xc0001d97d0}, {0x625a00?, 0xc008ab02e8?, 0x0?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:1018 +0x173
text/template.(*state).walk(0xc0181f2aa8, {0x659ba0?, 0xc008ab02a0?, 0x659ba0?}, {0x6cce18?, 0xc0001d97d0})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:263 +0x25c
text/template.(*state).walk(0xc0181f2aa8, {0x659ba0?, 0xc008ab02a0?, 0x861060?}, {0x6cd130?, 0xc000149da0?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:274 +0x415
text/template.(*state).walkIfOrWith(0xc0181f2aa8, 0x13, {0x633d00?, 0xc009324c90?, 0xc009324cc0?}, 0x7f57997d5800?, 0xaa?, 0x0)
        /home/omegarogue/go/go1.18/src/text/template/exec.go:302 +0x1ce
text/template.(*state).walk(0xc0181f2aa8, {0x633d00?, 0xc009324c90?, 0xc0181f29d8?}, {0x6cd3b8?, 0xc0000c70c0?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:285 +0x154
text/template.(*state).walk(0xc0181f2aa8, {0x633d00?, 0xc009324c90?, 0x203002?}, {0x6cd130?, 0xc000149ce0?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:274 +0x415
text/template.(*Template).execute(0xc000120cc0, {0x6caa40?, 0xc003c5ee70?}, {0x633d00?, 0xc009324c90?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:218 +0x2c5
text/template.(*Template).Execute(...)
        /home/omegarogue/go/go1.18/src/text/template/exec.go:201
github.com/diamondburned/gotk4/gir/girgen/pen.(*Pen).WriteTmpl(0xc00cd9bff0, 0xc009324c90?, {0x633d00, 0xc009324c90})
        /home/omegarogue/src/gotk4/gir/girgen/pen/pen.go:94 +0x69
github.com/diamondburned/gotk4/gir/girgen/generators.generateInterfaceGenerator({0x6cd5a8?, 0xc006b00d00}, 0xc009801c00)
        /home/omegarogue/src/gotk4/gir/girgen/generators/class-interface.go:321 +0xd5a
github.com/diamondburned/gotk4/gir/girgen/generators.GenerateInterface({0x6cd5a8?, 0xc006b00d00}, 0xc0008f1700?)
        /home/omegarogue/src/gotk4/gir/girgen/generators/class-interface.go:248 +0x12c
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).Generate(0xc006b00d00)
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:302 +0xb85
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.WriteNamespace(0xc006b00d00, {0x7fff6789e0bd?, 0x1?})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:100 +0x17f
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1.1()
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:241 +0x4d
created by github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:240 +0x28a

goroutine 26 [runnable]:
reflect.Value.FieldByIndex({0x65eac0?, 0xc004b67ba0?, 0x99?}, {0xc00b970cb0?, 0x1?, 0x1?})
        /home/omegarogue/go/go1.18/src/reflect/value.go:1251 +0x29f
reflect.Value.FieldByName({0x65eac0?, 0xc004b67ba0?, 0xc00e35a130?}, {0x668bf1?, 0xc008a20650?})
        /home/omegarogue/go/go1.18/src/reflect/value.go:1299 +0x14c
github.com/diamondburned/gotk4/gir/girgen/cmt.getField({0x65eac0?, 0xc004b67ba0?, 0x0?}, {0x668bf1?, 0x0?})
        /home/omegarogue/src/gotk4/gir/girgen/cmt/cmt.go:65 +0x2f
github.com/diamondburned/gotk4/gir/girgen/cmt.GetInfoFields({0x65eac0?, 0xc004b67ba0?})
        /home/omegarogue/src/gotk4/gir/girgen/cmt/cmt.go:93 +0x14c
github.com/diamondburned/gotk4/gir/girgen/cmt.goDoc({0x65eac0?, 0xc004b67ba0?}, 0x0, {0x8651e0, 0x0, 0x0})
        /home/omegarogue/src/gotk4/gir/girgen/cmt/cmt.go:212 +0x5e
github.com/diamondburned/gotk4/gir/girgen/cmt.GoDoc({0x65eac0?, 0xc004b67ba0?}, 0xc0063a5c20?, {0x8651e0?, 0x2?, 0xc006b44b78?})
        /home/omegarogue/src/gotk4/gir/girgen/cmt/cmt.go:208 +0x28
reflect.Value.call({0x632920?, 0x684b28?, 0x62f0c0?}, {0x668b21, 0x4}, {0xc007df9950, 0x2, 0x6cde80?})
        /home/omegarogue/go/go1.18/src/reflect/value.go:556 +0x845
reflect.Value.Call({0x632920?, 0x684b28?, 0xc005bce380?}, {0xc007df9950, 0x2, 0x2})
        /home/omegarogue/go/go1.18/src/reflect/value.go:339 +0xbf
text/template.safeCall({0x632920?, 0x684b28?, 0xc005bce380?}, {0xc007df9950?, 0x6cde80?, 0x625340?})
        /home/omegarogue/go/go1.18/src/text/template/funcs.go:368 +0x9d
text/template.(*state).evalCall(0xc00e35b578, {0x65eac0?, 0xc005bce380?, 0x7?}, {0x632920?, 0x684b28?, 0x6cde80?}, 0x0, {0x6ccf38, 0xc000238720}, ...)
        /home/omegarogue/go/go1.18/src/text/template/exec.go:781 +0x87c
text/template.(*state).evalFunction(0xc00e35b578, {0x65eac0?, 0xc005bce380?, 0xc0002006c0?}, 0x1?, {0x6ccf38, 0xc000238720}, {0xc00020c680, 0x3, 0x4}, ...)
        /home/omegarogue/go/go1.18/src/text/template/exec.go:601 +0x209
text/template.(*state).evalCommand(0xc00e35b578, {0x65eac0?, 0xc005bce380?, 0xc00e35b578?}, 0x650140?, {0x634b40?, 0x8651e0?, 0x58dace?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:488 +0xea
text/template.(*state).evalPipeline(0xc00e35b578, {0x65eac0?, 0xc005bce380?, 0xc012424280?}, 0xc0002132c0)
        /home/omegarogue/go/go1.18/src/text/template/exec.go:457 +0x145
text/template.(*state).walk(0xc00e35b578, {0x65eac0?, 0xc005bce380?, 0x58cbc5?}, {0x6cce18?, 0xc000238780})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:261 +0x225
text/template.(*state).walk(0xc00e35b578, {0x65eac0?, 0xc005bce380?, 0x650140?}, {0x6cd130?, 0xc0002386c0?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:274 +0x415
text/template.(*state).walkRange.func2({0x625340?, 0x824660?, 0xc012424280?}, {0x65eac0?, 0xc005bce380?, 0x650140?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:373 +0x17d
text/template.(*state).walkRange(0xc00e35b578, {0x650140?, 0xc012424280?, 0xc012424280?}, 0xc00020c700)
        /home/omegarogue/go/go1.18/src/text/template/exec.go:381 +0x573
text/template.(*state).walk(0xc00e35b578, {0x650140?, 0xc012424280?, 0xc006a546e0?}, {0x6cd250?, 0xc00020c700?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:277 +0x28d
text/template.(*state).walk(0xc00e35b578, {0x650140?, 0xc012424280?, 0xc00a62be60?}, {0x6cd130?, 0xc000204f90?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:274 +0x415
text/template.(*Template).execute(0xc00020c2c0, {0x6caa40?, 0xc0071c9830?}, {0x650140?, 0xc012424280?})
        /home/omegarogue/go/go1.18/src/text/template/exec.go:218 +0x2c5
text/template.(*Template).Execute(...)
        /home/omegarogue/go/go1.18/src/text/template/exec.go:201
github.com/diamondburned/gotk4/gir/girgen/pen.(*Pen).WriteTmpl(0xc0011cdf80, 0x0?, {0x650140, 0xc012424280})
        /home/omegarogue/src/gotk4/gir/girgen/pen/pen.go:94 +0x69
github.com/diamondburned/gotk4/gir/girgen/generators.GenerateRecord({0x6cd5a8?, 0xc006b00c00}, 0xc00e35bd20?)
        /home/omegarogue/src/gotk4/gir/girgen/generators/record.go:173 +0x296
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).Generate(0xc006b00c00)
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:316 +0x8c5
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.WriteNamespace(0xc006b00c00, {0x7fff6789e0bd?, 0x1?})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:100 +0x17f
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1.1()
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:241 +0x4d
created by github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:240 +0x28a

goroutine 161 [runnable]:
github.com/diamondburned/gotk4/gir.Repositories.findFullType.func1({0xc0044dccc0?, 0x10?}, {0xc0039878a8?, 0x14?})
        /home/omegarogue/src/gotk4/gir/gir.go:527 +0x58
github.com/diamondburned/gotk4/gir.SearchNamespace(0xc000603a00, 0xc0174303d8)
        /home/omegarogue/src/gotk4/gir/gir.go:564 +0x5e3
github.com/diamondburned/gotk4/gir.Repositories.findFullType({0xc005538a00, 0x24, 0x41}, {0xc003500b88, 0x18})
        /home/omegarogue/src/gotk4/gir/gir.go:527 +0x185
github.com/diamondburned/gotk4/gir.Repositories.FindFullType.func1()
        /home/omegarogue/src/gotk4/gir/gir.go:505 +0x3b
golang.org/x/sync/singleflight.(*Group).doCall.func2(0xc0174304a6, 0xc008a5c300, 0x60?)
        /home/omegarogue/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:193 +0x6f
golang.org/x/sync/singleflight.(*Group).doCall(0x633700?, 0xc0066c16e0?, {0xc003500b88?, 0x18?}, 0x642c00?)
        /home/omegarogue/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:195 +0xa5
golang.org/x/sync/singleflight.(*Group).Do(0x835640, {0xc003500b88, 0x18}, 0xc017430578?)
        /home/omegarogue/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:108 +0x154
github.com/diamondburned/gotk4/gir.Repositories.FindFullType({0xc005538a00, 0x24, 0x41}, {0xc003500b88, 0x18})
        /home/omegarogue/src/gotk4/gir/gir.go:504 +0xeb
github.com/diamondburned/gotk4/gir.Repositories.FindType({0xc005538a00, 0x24, 0x41}, 0xc00927f940, {0xc002cada40?, 0x100000000002e?})
        /home/omegarogue/src/gotk4/gir/gir.go:493 +0x195
github.com/diamondburned/gotk4/gir/girgen/types.Find({0x6cd4f8, 0xc0073f5000}, {0xc002cada40, 0x16})
        /home/omegarogue/src/gotk4/gir/girgen/types/generator.go:57 +0x96
github.com/diamondburned/gotk4/gir/girgen/types.fileFilter.Filter({{0x66c1b0?, 0x0?}}, {0x6cd4f8?, 0xc0073f5000?}, {0xc002cada40?, 0xc005fa6d08?}, {0xc002cada40?, 0xc0174307b8?})
        /home/omegarogue/src/gotk4/gir/girgen/types/filter.go:531 +0x45
github.com/diamondburned/gotk4/gir/girgen/types.Filter({0x6cd4f8, 0xc0073f5000}, {0xc002cada40, 0x16}, {0xc005fa6d08, 0x12})
        /home/omegarogue/src/gotk4/gir/girgen/types/filter.go:400 +0xe4
github.com/diamondburned/gotk4/gir/girgen/types.FilterSub({0x6cd4f8, 0xc0073f5000}, {0xc00b640d00, 0x7}, {0xc005fbd630, 0xa}, {0xc005fa6d08, 0x12})
        /home/omegarogue/src/gotk4/gir/girgen/types/filter.go:422 +0x105
github.com/diamondburned/gotk4/gir/girgen/generators/callable.(*Generator).Use(0xc006852c20, 0xc006852a80, 0xc00601a7d8)
        /home/omegarogue/src/gotk4/gir/girgen/generators/callable/callable.go:134 +0x1c5
github.com/diamondburned/gotk4/gir/girgen/generators/iface.(*Methods).setMethods(0xc006852b18, 0xc006852a80, {0xc006018000, 0x52, 0x1?})
        /home/omegarogue/src/gotk4/gir/girgen/generators/iface/method.go:83 +0x1f1
github.com/diamondburned/gotk4/gir/girgen/generators/iface.(*Generator).Use(0xc006852a80, {0x6300a0, 0xc007216000})
        /home/omegarogue/src/gotk4/gir/girgen/generators/iface/iface.go:290 +0x28c
github.com/diamondburned/gotk4/gir/girgen/generators.GenerateClass({0x6cd5a8?, 0xc0073f5000}, 0xc005e92000?)
        /home/omegarogue/src/gotk4/gir/girgen/generators/class-interface.go:255 +0x10b
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).Generate(0xc0073f5000)
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:309 +0xa25
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.WriteNamespace(0xc0073f5000, {0x7fff6789e0bd?, 0x0?})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:100 +0x17f
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1.1()
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:241 +0x4d
created by github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:240 +0x28a

goroutine 100 [runnable]:
github.com/diamondburned/gotk4/gir.Repositories.findFullType.func1({0xc001415a10?, 0xa?}, {0xc001415a80?, 0xd?})
        /home/omegarogue/src/gotk4/gir/gir.go:527 +0x58
github.com/diamondburned/gotk4/gir.SearchNamespace(0xc0026671e0, 0xc0106324e8)
        /home/omegarogue/src/gotk4/gir/gir.go:558 +0x6e3
github.com/diamondburned/gotk4/gir.Repositories.findFullType({0xc005538a00, 0x24, 0x41}, {0xc00306bd00, 0x20})
        /home/omegarogue/src/gotk4/gir/gir.go:527 +0x185
github.com/diamondburned/gotk4/gir.Repositories.FindFullType.func1()
        /home/omegarogue/src/gotk4/gir/gir.go:505 +0x3b
golang.org/x/sync/singleflight.(*Group).doCall.func2(0xc0106325b6, 0xc0087dd5c0, 0x60?)
        /home/omegarogue/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:193 +0x6f
golang.org/x/sync/singleflight.(*Group).doCall(0x633700?, 0xc0066c16e0?, {0xc00306bd00?, 0x20?}, 0x642c00?)
        /home/omegarogue/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:195 +0xa5
golang.org/x/sync/singleflight.(*Group).Do(0x835640, {0xc00306bd00, 0x20}, 0xc010632688?)
        /home/omegarogue/go/pkg/mod/golang.org/x/[email protected]/singleflight/singleflight.go:108 +0x154
github.com/diamondburned/gotk4/gir.Repositories.FindFullType({0xc005538a00, 0x24, 0x41}, {0xc00306bd00, 0x20})
        /home/omegarogue/src/gotk4/gir/gir.go:504 +0xeb
github.com/diamondburned/gotk4/gir.Repositories.FindType({0xc005538a00, 0x24, 0x41}, 0xc007884460, {0xc00306a200?, 0x44dc2e?})
        /home/omegarogue/src/gotk4/gir/gir.go:493 +0x195
github.com/diamondburned/gotk4/gir/girgen/types.Find({0x6cd4f8, 0xc007040b80}, {0xc00306a200, 0x1e})
        /home/omegarogue/src/gotk4/gir/girgen/types/generator.go:57 +0x96
github.com/diamondburned/gotk4/gir/girgen/types.fileFilter.Filter({{0x66b44d?, 0x0?}}, {0x6cd4f8?, 0xc007040b80?}, {0xc00306a200?, 0xc0020b3d00?}, {0xc00306a200?, 0xc0106328c8?})
        /home/omegarogue/src/gotk4/gir/girgen/types/filter.go:531 +0x45
github.com/diamondburned/gotk4/gir/girgen/types.Filter({0x6cd4f8, 0xc007040b80}, {0xc00306a200, 0x1e}, {0xc0020b3d00, 0x1e})
        /home/omegarogue/src/gotk4/gir/girgen/types/filter.go:400 +0xe4
github.com/diamondburned/gotk4/gir/girgen/types.FilterSub({0x6cd4f8, 0xc007040b80}, {0xc0007741d0, 0x9}, {0xc00091de40, 0x10}, {0xc0020b3d00, 0x1e})
        /home/omegarogue/src/gotk4/gir/girgen/types/filter.go:422 +0x105
github.com/diamondburned/gotk4/gir/girgen/types.FilterMethod(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/filter.go:427
github.com/diamondburned/gotk4/gir/girgen/generators/iface.(*Methods).setMethods(0xc005e1ae98?, 0xc005e1ae00?, {0xc0026bc000?, 0x17?, 0x1?})
        /home/omegarogue/src/gotk4/gir/girgen/generators/iface/method.go:76 +0x17e
github.com/diamondburned/gotk4/gir/girgen/generators/iface.(*Generator).Use(0xc005e1ae00, {0x6300a0, 0xc0068541c0})
        /home/omegarogue/src/gotk4/gir/girgen/generators/iface/iface.go:290 +0x28c
github.com/diamondburned/gotk4/gir/girgen/generators.GenerateClass({0x6cd5a8?, 0xc007040b80}, 0x0?)
        /home/omegarogue/src/gotk4/gir/girgen/generators/class-interface.go:255 +0x10b
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).Generate(0xc007040b80)
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:309 +0xa25
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.WriteNamespace(0xc007040b80, {0x7fff6789e0bd?, 0x0?})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:100 +0x17f
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1.1()
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:241 +0x4d
created by github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:240 +0x28a

goroutine 179 [runnable]:
regexp.(*inputString).step(0xc0124cace0?, 0x5?)
        /home/omegarogue/go/go1.18/src/regexp/regexp.go:389 +0x8d
regexp.(*Regexp).tryBacktrack(0xc0000e01e0, 0xc0124cac60, {0x6cccf8?, 0xc0124cace0}, 0x6?, 0xc00961f330?)
        /home/omegarogue/go/go1.18/src/regexp/backtrack.go:218 +0xb42
regexp.(*Regexp).backtrack(0xc0000e01e0, {0x0, 0x0, 0x0}, {0xc005221a08, 0x6}, 0x0, 0x10?, {0xc00b93bbe0, 0x0, ...})
        /home/omegarogue/go/go1.18/src/regexp/backtrack.go:353 +0x325
regexp.(*Regexp).doExecute(0xc0051bb7c0?, {0x0?, 0x0}, {0x0, 0x0, 0x0}, {0xc005221a08, 0x6}, 0xc006c96000?, 0x2, ...)
        /home/omegarogue/go/go1.18/src/regexp/exec.go:535 +0x272
regexp.(*Regexp).replaceAll(0xc0000e01e0, {0x0, 0x0, 0x0}, {0xc005221a08, 0x6}, 0x2, 0xc00961f4f0)
        /home/omegarogue/go/go1.18/src/regexp/regexp.go:623 +0x1a5
regexp.(*Regexp).ReplaceAllStringFunc(0x4?, {0xc005221a08?, 0xa?}, 0xc006f3b630?)
        /home/omegarogue/go/go1.18/src/regexp/regexp.go:601 +0x5d
github.com/diamondburned/gotk4/gir/girgen/strcases.PascalToGo({0xc005221a08, 0x6})
        /home/omegarogue/src/gotk4/gir/girgen/strcases/strcases.go:149 +0xd1
github.com/diamondburned/gotk4/gir/girgen/types.(*Resolved).ImplName(0xc00cfd7e00)
        /home/omegarogue/src/gotk4/gir/girgen/types/resolve.go:542 +0xae
github.com/diamondburned/gotk4/gir/girgen/types.(*Resolved).Name(...)
        /home/omegarogue/src/gotk4/gir/girgen/types/resolve.go:532
github.com/diamondburned/gotk4/gir/girgen/types.(*Resolved).ImplType(0xc00cfd7e00, 0x1)
        /home/omegarogue/src/gotk4/gir/girgen/types/resolve.go:592 +0xbb
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*ValueConverted).resolveTypeInner(0xc00cddf498, 0xc014fcd9a0, 0xc006f37600)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/valueconverted.go:453 +0x51f
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*ValueConverted).resolveType(0xc00cddf498, 0xc014fcd9a0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/valueconverted.go:198 +0x3b8
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0xc00cddf340?, 0xc00cddf498)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:217 +0x3e
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).ConvertAll(0xc014fcd9a0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:146 +0xce
github.com/diamondburned/gotk4/gir/girgen/generators/callable.(*Generator).renderDynamicLinkedBlock(0xc0169c9a20)
        /home/omegarogue/src/gotk4/gir/girgen/generators/callable/callable.go:330 +0x891
github.com/diamondburned/gotk4/gir/girgen/generators/callable.(*Generator).renderBlock(0xc0169c9a20)
        /home/omegarogue/src/gotk4/gir/girgen/generators/callable/callable.go:204 +0x45
github.com/diamondburned/gotk4/gir/girgen/generators/callable.(*Generator).Use(0xc0169c9a20, 0xc0169c9880, 0xc006f98118)
        /home/omegarogue/src/gotk4/gir/girgen/generators/callable/callable.go:154 +0x30d
github.com/diamondburned/gotk4/gir/girgen/generators/iface.(*Methods).setMethods(0xc0169c9918, 0xc0169c9880, {0xc006f98000, 0x21, 0x1?})
        /home/omegarogue/src/gotk4/gir/girgen/generators/iface/method.go:83 +0x1f1
github.com/diamondburned/gotk4/gir/girgen/generators/iface.(*Generator).Use(0xc0169c9880, {0x6300a0, 0xc005198000})
        /home/omegarogue/src/gotk4/gir/girgen/generators/iface/iface.go:290 +0x28c
github.com/diamondburned/gotk4/gir/girgen/generators.GenerateClass({0x6cd5a8?, 0xc006ab1380}, 0x0?)
        /home/omegarogue/src/gotk4/gir/girgen/generators/class-interface.go:255 +0x10b
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).Generate(0xc006ab1380)
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:309 +0xa25
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.WriteNamespace(0xc006ab1380, {0x7fff6789e0bd?, 0x0?})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:100 +0x17f
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1.1()
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:241 +0x4d
created by github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:240 +0x28a

goroutine 83 [runnable]:
text/tabwriter.(*Writer).write0(0xc0078568f0?, {0xc00892ab00?, 0x31, 0x2c0?})
        /home/omegarogue/go/go1.18/src/text/tabwriter/tabwriter.go:253 +0xa5
text/tabwriter.(*Writer).writeLines(0xc0078568f0, 0x0?, 0x100000040d045?, 0x2)
        /home/omegarogue/go/go1.18/src/text/tabwriter/tabwriter.go:321 +0x269
text/tabwriter.(*Writer).format(0xc0078568f0, 0x53e9aa?, 0x60?, 0x2)
        /home/omegarogue/go/go1.18/src/text/tabwriter/tabwriter.go:409 +0x1cd
text/tabwriter.(*Writer).flushNoDefers(0xc0078568f0)
        /home/omegarogue/go/go1.18/src/text/tabwriter/tabwriter.go:520 +0x12c
text/tabwriter.(*Writer).Write(0xc0078568f0, {0xc008c08000, 0x7c73, 0xa000})
        /home/omegarogue/go/go1.18/src/text/tabwriter/tabwriter.go:554 +0x3f4
go/printer.(*Config).fprint(0xc007f6f830, {0x6caa40?, 0xc0087cd5c0}, 0xc?, {0x635220, 0xc00adc4b00}, 0xc0087cd5f0)
        /home/omegarogue/go/go1.18/src/go/printer/printer.go:1352 +0x2b4
go/printer.(*Config).Fprint(...)
        /home/omegarogue/go/go1.18/src/go/printer/printer.go:1378
go/format.format(0xc00894e000?, 0x7832?, 0xc007dec900?, 0xc007f6f801?, {0xc00894e000?, 0x1?, 0x4e8895?}, {0x40000006, 0x8, 0x0})
        /home/omegarogue/go/go1.18/src/go/format/internal.go:105 +0x9e
go/format.Source({0xc00894e000, 0x7832, 0x8527})
        /home/omegarogue/go/go1.18/src/go/format/format.go:116 +0xf7
github.com/diamondburned/gotk4/gir/girgen.(*GoFileGenerator).Generate(0xc00a3e1900)
        /home/omegarogue/src/gotk4/gir/girgen/file.go:272 +0xc14
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).Generate.func2({0x6cd7d0, 0xc00a3e1900})
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:350 +0x5d
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).Generate(0xc008eb0b80)
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:362 +0x542
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.WriteNamespace(0xc008eb0b80, {0x7fff6789e0bd?, 0x0?})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:100 +0x17f
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1.1()
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:241 +0x4d
created by github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:240 +0x28a

goroutine 101 [runnable]:
regexp.(*bitState).push(...)
        /home/omegarogue/go/go1.18/src/regexp/backtrack.go:134
regexp.(*Regexp).tryBacktrack(0xc0000e01e0, 0xc00993e160, {0x6cccf8?, 0xc00993e1e0}, 0x40af07?, 0x4e5cc9?)
        /home/omegarogue/go/go1.18/src/regexp/backtrack.go:188 +0x463
regexp.(*Regexp).backtrack(0xc0000e01e0, {0x0, 0x0, 0x0}, {0xc0049cccf0, 0x15}, 0x0, 0x10?, {0xc00bb14f20, 0x0, ...})
        /home/omegarogue/go/go1.18/src/regexp/backtrack.go:353 +0x325
regexp.(*Regexp).doExecute(0x40d045?, {0x0?, 0x0}, {0x0, 0x0, 0x0}, {0xc0049cccf0, 0x15}, 0x7f57c0fd1fe8?, 0x2, ...)
        /home/omegarogue/go/go1.18/src/regexp/exec.go:535 +0x272
regexp.(*Regexp).replaceAll(0xc0000e01e0, {0x0, 0x0, 0x0}, {0xc0049cccf0, 0x15}, 0x2, 0xc00224b208)
        /home/omegarogue/go/go1.18/src/regexp/regexp.go:623 +0x1a5
regexp.(*Regexp).ReplaceAllStringFunc(0x19?, {0xc0049cccf0?, 0x0?}, 0x0?)
        /home/omegarogue/go/go1.18/src/regexp/regexp.go:601 +0x5d
github.com/diamondburned/gotk4/gir/girgen/strcases.PascalToGo({0xc0049cccf0, 0x15})
        /home/omegarogue/src/gotk4/gir/girgen/strcases/strcases.go:149 +0xd1
github.com/diamondburned/gotk4/gir/girgen/types.(*Resolved).PublicName(0xc009cd5900)
        /home/omegarogue/src/gotk4/gir/girgen/types/resolve.go:564 +0xfb
github.com/diamondburned/gotk4/gir/girgen/types.(*Resolved).PublicType(0xc009cd5900, 0x0)
        /home/omegarogue/src/gotk4/gir/girgen/types/resolve.go:621 +0x1e5
github.com/diamondburned/gotk4/gir/girgen/types.GoPublicType({0x6cd4f8?, 0xc00475e100?}, 0xc007305824?)
        /home/omegarogue/src/gotk4/gir/girgen/types/resolve.go:506 +0x45
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).CanGenerate(0xc00475e100, 0xc009cd5900)
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:87 +0x6e
github.com/diamondburned/gotk4/gir/girgen/types.Resolve({0x6cd550, 0xc0089b41e0}, {{{0xc003971fb0, 0x29}, {0xc0049d9f18, 0x4}}, {0xc007305820, 0x19}, {0xc0049caca0, 0x19}, ...})
        /home/omegarogue/src/gotk4/gir/girgen/types/resolve.go:882 +0x96d
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*ValueConverted).resolveTypeInner(0xc00731b680, 0xc009fc6dc0, 0xc0049e1500)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/valueconverted.go:383 +0x1ce
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*ValueConverted).resolveType(0xc00731b680, 0xc009fc6dc0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/valueconverted.go:198 +0x3b8
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).convert(0x0?, 0xc00731b680)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:217 +0x3e
github.com/diamondburned/gotk4/gir/girgen/types/typeconv.(*Converter).ConvertAll(0xc009fc6dc0)
        /home/omegarogue/src/gotk4/gir/girgen/types/typeconv/typeconv.go:146 +0xce
github.com/diamondburned/gotk4/gir/girgen/generators/callable.(*Generator).renderDynamicLinkedBlock(0xc0059aba20)
        /home/omegarogue/src/gotk4/gir/girgen/generators/callable/callable.go:330 +0x891
github.com/diamondburned/gotk4/gir/girgen/generators/callable.(*Generator).renderBlock(0xc0059aba20)
        /home/omegarogue/src/gotk4/gir/girgen/generators/callable/callable.go:204 +0x45
github.com/diamondburned/gotk4/gir/girgen/generators/callable.(*Generator).Use(0xc0059aba20, 0xc0059ab880, 0xc0049c4b40)
        /home/omegarogue/src/gotk4/gir/girgen/generators/callable/callable.go:154 +0x30d
github.com/diamondburned/gotk4/gir/girgen/generators/iface.(*Methods).setVirtuals(0xc0059ab900, 0xc0059ab880, {0xc0049c4900, 0x5, 0x2?})
        /home/omegarogue/src/gotk4/gir/girgen/generators/iface/method.go:125 +0x2c5
github.com/diamondburned/gotk4/gir/girgen/generators/iface.(*Generator).Use(0xc0059ab880, {0x630340, 0xc001e0e000})
        /home/omegarogue/src/gotk4/gir/girgen/generators/iface/iface.go:291 +0x2b5
github.com/diamondburned/gotk4/gir/girgen/generators.GenerateInterface({0x6cd5a8?, 0xc00475e100}, 0x0?)
        /home/omegarogue/src/gotk4/gir/girgen/generators/class-interface.go:244 +0x10b
github.com/diamondburned/gotk4/gir/girgen.(*NamespaceGenerator).Generate(0xc00475e100)
        /home/omegarogue/src/gotk4/gir/girgen/namespace.go:302 +0xb85
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.WriteNamespace(0xc00475e100, {0x7fff6789e0bd?, 0x0?})
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:100 +0x17f
github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1.1()
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:241 +0x4d
created by github.com/diamondburned/gotk4/gir/cmd/gir-generate/genmain.GeneratePackages.func1
        /home/omegarogue/src/gotk4/gir/cmd/gir-generate/genmain/genutil.go:240 +0x28a
exit status 2
gotk4.go:3: running "go": exit status 1
make[1]: *** [Makefile:4: gen] Error 1
make[1]: Leaving directory '/home/omegarogue/src/gotk4'

@diamondburned
Copy link
Owner

Interesting. Is this a recursive type definition? Maybe add more logging there.

@OmegaRogue
Copy link
Author

Where would I add logging? I'm not seeing anything relevant in the log output. Maybe there are too many types being generated? When I start it with the debugger enabled, it seems like there are a bit over 200 Goroutines active when it crashes

@OmegaRogue
Copy link
Author

I've narrowed down the error to one GIR Namespace that I've excluded for now and that's working fine.
I'm getting an error cannot convert unsafe.Pointer(handle) (value of type unsafe.Pointer) to type C.ulong in one of the generated files, and I already have a fix for that, changing

_arg1 = (C.guintptr)(unsafe.Pointer(handle))

to

_arg1 = (C.guintptr)(handle)

in https://github.com/OmegaRogue/gotk4-gstreamer/blob/main/pkg/gstvideo/videooverlay.go
but I can't figure out how to properly do this without manually modifying the file after generation

@diamondburned
Copy link
Owner

Can you paste the relevant XML section(s) for these functions?

@OmegaRogue
Copy link
Author

<method name="set_window_handle"
              c:identifier="gst_video_overlay_set_window_handle">
        <doc xml:space="preserve"
             filename="gst-libs/gst/video/videooverlay.c"
             line="330">This will call the video overlay's set_window_handle method. You
should use this method to tell to an overlay to display video output to a
specific window (e.g. an XWindow on X11). Passing 0 as the  @handle will
tell the overlay to stop using that window and create an internal one.</doc>
        <source-position filename="gst-libs/gst/video/videooverlay.h"
                         line="92"/>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="overlay" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="gst-libs/gst/video/videooverlay.c"
                 line="332">a #GstVideoOverlay to set the window on.</doc>
            <type name="VideoOverlay" c:type="GstVideoOverlay*"/>
          </instance-parameter>
          <parameter name="handle" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="gst-libs/gst/video/videooverlay.c"
                 line="333">a handle referencing the window.</doc>
            <type name="guintptr" c:type="guintptr"/>
          </parameter>
        </parameters>
      </method>
<method name="got_window_handle"
              c:identifier="gst_video_overlay_got_window_handle">
        <doc xml:space="preserve"
             filename="gst-libs/gst/video/videooverlay.c"
             line="355">This will post a "have-window-handle" element message on the bus.

This function should only be used by video overlay plugin developers.</doc>
        <source-position filename="gst-libs/gst/video/videooverlay.h"
                         line="98"/>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="overlay" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="gst-libs/gst/video/videooverlay.c"
                 line="357">a #GstVideoOverlay which got a window</doc>
            <type name="VideoOverlay" c:type="GstVideoOverlay*"/>
          </instance-parameter>
          <parameter name="handle" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="gst-libs/gst/video/videooverlay.c"
                 line="358">a platform-specific handle referencing the window</doc>
            <type name="guintptr" c:type="guintptr"/>
          </parameter>
        </parameters>
      </method>
 <virtual-method name="set_window_handle" invoker="set_window_handle">
        <doc xml:space="preserve"
             filename="gst-libs/gst/video/videooverlay.c"
             line="330">This will call the video overlay's set_window_handle method. You
should use this method to tell to an overlay to display video output to a
specific window (e.g. an XWindow on X11). Passing 0 as the  @handle will
tell the overlay to stop using that window and create an internal one.</doc>
        <source-position filename="gst-libs/gst/video/videooverlay.h"
                         line="69"/>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="overlay" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="gst-libs/gst/video/videooverlay.c"
                 line="332">a #GstVideoOverlay to set the window on.</doc>
            <type name="VideoOverlay" c:type="GstVideoOverlay*"/>
          </instance-parameter>
          <parameter name="handle" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="gst-libs/gst/video/videooverlay.c"
                 line="333">a handle referencing the window.</doc>
            <type name="guintptr" c:type="guintptr"/>
          </parameter>
        </parameters>
      </virtual-method>
``

@diamondburned
Copy link
Owner

Hmm, maybe the C function definition in the code is wrong. It happens sometimes.

Maybe try using ModifyCallable?

@OmegaRogue
Copy link
Author

i really dont see anything that could be wrong there

&gir.CallableAttrs{
    Name:        "got_window_handle",
    CIdentifier: "gst_video_overlay_got_window_handle",
    ShadowedBy:  "",
    Shadows:     "",
    Throws:      false,
    MovedTo:     "",
    Parameters:  &gir.Parameters{
        XMLName:           xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"parameters"},
        InstanceParameter: &gir.InstanceParameter{
            XMLName:        xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"instance-parameter"},
            ParameterAttrs: gir.ParameterAttrs{
                Name:              "overlay",
                Direction:         "",
                Scope:             "",
                Closure:           (*int)(nil),
                Destroy:           (*int)(nil),
                CallerAllocates:   false,
                Skip:              false,
                Optional:          false,
                Nullable:          false,
                TransferOwnership: gir.TransferOwnership{TransferOwnership:"none"},
                AnyType:           gir.AnyType{
                    Type: &gir.Type{
                        XMLName:        xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"type"},
                        Name:           "VideoOverlay",
                        CType:          "GstVideoOverlay*",
                        Introspectable: (*bool)(nil),
                        DocElements:    gir.DocElements{},
                        Types:          nil,
                    },
                    Array: (*gir.Array)(nil),
                },
                Doc: &gir.Doc{
                    XMLName:  xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"doc"},
                    Filename: "gst-libs/gst/video/videooverlay.c",
                    String:   "a #GstVideoOverlay which got a window",
                    Line:     357,
                },
            },
        },
        Parameters: {
            {
                XMLName:        xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"parameter"},
                ParameterAttrs: gir.ParameterAttrs{
                    Name:              "handle",
                    Direction:         "",
                    Scope:             "",
                    Closure:           (*int)(nil),
                    Destroy:           (*int)(nil),
                    CallerAllocates:   false,
                    Skip:              false,
                    Optional:          false,
                    Nullable:          false,
                    TransferOwnership: gir.TransferOwnership{TransferOwnership:"none"},
                    AnyType:           gir.AnyType{
                        Type: &gir.Type{
                            XMLName:        xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"type"},
                            Name:           "guintptr",
                            CType:          "guintptr",
                            Introspectable: (*bool)(nil),
                            DocElements:    gir.DocElements{},
                            Types:          nil,
                        },
                        Array: (*gir.Array)(nil),
                    },
                    Doc: &gir.Doc{
                        XMLName:  xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"doc"},
                        Filename: "gst-libs/gst/video/videooverlay.c",
                        String:   "a platform-specific handle referencing the window",
                        Line:     358,
                    },
                },
            },
        },
    },
    ReturnValue: &gir.ReturnValue{
        XMLName:           xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"return-value"},
        Scope:             "",
        Closure:           (*int)(nil),
        Destroy:           (*int)(nil),
        Introspectable:    false,
        Nullable:          false,
        Skip:              false,
        AllowNone:         false,
        TransferOwnership: gir.TransferOwnership{TransferOwnership:"none"},
        DocElements:       gir.DocElements{},
        AnyType:           gir.AnyType{
            Type: &gir.Type{
                XMLName:        xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"type"},
                Name:           "none",
                CType:          "void",
                Introspectable: (*bool)(nil),
                DocElements:    gir.DocElements{},
                Types:          nil,
            },
            Array: (*gir.Array)(nil),
        },
    },
    InfoAttrs:    gir.InfoAttrs{},
    InfoElements: gir.InfoElements{
        DocElements: gir.DocElements{
            Doc: &gir.Doc{
                XMLName:  xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"doc"},
                Filename: "gst-libs/gst/video/videooverlay.c",
                String:   "This will post a \"have-window-handle\" element message on the bus.\n\nThis function should only be used by video overlay plugin developers.",
                Line:     355,
            },
            DocDeprecated:  (*gir.DocDeprecated)(nil),
            SourcePosition: &gir.SourcePosition{
                XMLName:  xml.Name{Space:"http://www.gtk.org/introspection/core/1.0", Local:"source-position"},
                Filename: "gst-libs/gst/video/videooverlay.h",
                Line:     98,
                Column:   0,
            },
        },
        Annotations: nil,
    },
}

@diamondburned
Copy link
Owner

I'm thinking either the code generator is not capable (yet?) of properly handing uintptr generation, In that case, you might want to look at ./gir/girgen/types/typeconv/go-c.go:498.

You can also change the parameter to be a different (but equivalent) type that the generator can handle. Assuming the CType is indeed uintptr, then a cast of C.guintptr(unsafe.Pointer(v)) should work fine. However, the C headers might be defining something weird. In that case, it might be better to just override the parameter type with an actual ulong.

@OmegaRogue
Copy link
Author

I'm thinking either the code generator is not capable (yet?) of properly handing uintptr generation, In that case, you might want to look at ./gir/girgen/types/typeconv/go-c.go:498.

You can also change the parameter to be a different (but equivalent) type that the generator can handle. Assuming the CType is indeed uintptr, then a cast of C.guintptr(unsafe.Pointer(v)) should work fine. However, the C headers might be defining something weird. In that case, it might be better to just override the parameter type with an actual ulong.

has anything changed about this in the past year?

@diamondburned
Copy link
Owner

diamondburned commented Mar 23, 2024

Sorry, I've not been working on this until now. Could you try commit 541c72d?

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