I see this panic while building the uc22 image. Ubuntu image is built from master. This is trying to build using snapd from master too.
/home/gopath/bin/ubuntu-image snap --image-size 10G --validation=enforce /home/gopath/src/github.com/snapcore/snapd/tests/lib/assertions/developer1-22-signed.model '' --output-dir /tmp/work-dir/images --sector-size 512 --snap /tmp/extra-snaps/pc-kernel.snap --snap /tmp/extra-snaps/snapd-from-deb.snap --snap /tmp/extra-snaps/core22.snap --snap /tmp/extra-snaps/pc_22-0.4_amd64.snap
2023-09-12T18:50:40.2848542Z [0] make_temporary_directories
2023-09-12T18:50:40.2848775Z [1] determine_output_directory
2023-09-12T18:50:40.2848961Z [2] prepare_image
2023-09-12T18:50:40.2849046Z [3] load_gadget_yaml
2023-09-12T18:50:40.2849268Z panic: runtime error: invalid memory address or nil pointer dereference
2023-09-12T18:50:40.2849527Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc9f02d]
2023-09-12T18:50:40.2849538Z
2023-09-12T18:50:40.2849665Z goroutine 1 [running]:
2023-09-12T18:50:40.2850034Z github.com/canonical/ubuntu-image/internal/statemachine.(*StateMachine).postProcessGadgetYaml(0xc0001b5200)
2023-09-12T18:50:40.2850358Z /home/test/src/github.com/canonical/ubuntu-image/internal/statemachine/state_machine.go:286 +0x8ad
2023-09-12T18:50:40.2850901Z github.com/canonical/ubuntu-image/internal/statemachine.(*StateMachine).loadGadgetYaml(0xc0001b5200)
2023-09-12T18:50:40.2851350Z /home/test/src/github.com/canonical/ubuntu-image/internal/statemachine/common_states.go:107 +0x23d
2023-09-12T18:50:40.2851765Z github.com/canonical/ubuntu-image/internal/statemachine.(*StateMachine).Run(0xc0001b5200)
2023-09-12T18:50:40.2852169Z /home/test/src/github.com/canonical/ubuntu-image/internal/statemachine/state_machine.go:415 +0x151
2023-09-12T18:50:40.2852357Z main.executeStateMachine(0xc00039dea0, 0xc00039e1c0, 0xc0001415f0)
2023-09-12T18:50:40.2852815Z /home/test/src/github.com/canonical/ubuntu-image/cmd/ubuntu-image/main.go:52 +0x2ea
2023-09-12T18:50:40.2853020Z main.main()
2023-09-12T18:50:40.2853349Z /home/test/src/github.com/canonical/ubuntu-image/cmd/ubuntu-image/main.go:157 +0x6fa
2023-09-12T18:50:40.2853529Z -----
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https:/ /wiki.ubuntu. com/Bugs/ FindRightPackag e. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.
To change the source package that this bug is filed about visit https:/ /bugs.launchpad .net/ubuntu/ +bug/2035352/ +editstatus and add the package name in the text box next to the word Package.
[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]