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

mcap info crashes #579

Closed
defunctzombie opened this issue Sep 14, 2022 · 1 comment · Fixed by #584
Closed

mcap info crashes #579

defunctzombie opened this issue Sep 14, 2022 · 1 comment · Fixed by #584
Assignees
Labels
bug Something isn't working

Comments

@defunctzombie
Copy link
Contributor

defunctzombie commented Sep 14, 2022

Run mcap info on the attached file. My version crashes.

output.mcap.zip

 mcap info output.mcap
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x104af5c20]

goroutine 1 [running]:
github.com/foxglove/mcap/go/cli/mcap/cmd.printInfo({0x104ed22e8, 0x14000010018}, 0x140003aac30)
	/private/tmp/mcap-20220802-52309-1h62fv4/mcap-releases-mcap-cli-v0.0.16/go/cli/mcap/cmd/info.go:99 +0xd00
github.com/foxglove/mcap/go/cli/mcap/cmd.glob..func7.1(0xe2?, {0x12c58db78?, 0x1400039e2a0})
	/private/tmp/mcap-20220802-52309-1h62fv4/mcap-releases-mcap-cli-v0.0.16/go/cli/mcap/cmd/info.go:138 +0xd8
github.com/foxglove/mcap/go/cli/mcap/utils.WithReader({0x104ed7278, 0x1400003c0c0}, {0x16b9d77e2?, 0x0?}, 0x104ecad80)
	/private/tmp/mcap-20220802-52309-1h62fv4/mcap-releases-mcap-cli-v0.0.16/go/cli/mcap/utils/utils.go:99 +0x358
github.com/foxglove/mcap/go/cli/mcap/cmd.glob..func7(0x1053de2c0?, {0x1400039d290?, 0x1?, 0x1?})
	/private/tmp/mcap-20220802-52309-1h62fv4/mcap-releases-mcap-cli-v0.0.16/go/cli/mcap/cmd/info.go:129 +0xa8
github.com/spf13/cobra.(*Command).execute(0x1053de2c0, {0x1400039d250, 0x1, 0x1})
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 +0x4b8
github.com/spf13/cobra.(*Command).ExecuteC(0x1053dd140)
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x354
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
github.com/foxglove/mcap/go/cli/mcap/cmd.Execute()
	/private/tmp/mcap-20220802-52309-1h62fv4/mcap-releases-mcap-cli-v0.0.16/go/cli/mcap/cmd/root.go:19 +0x2c
main.main()
	/private/tmp/mcap-20220802-52309-1h62fv4/mcap-releases-mcap-cli-v0.0.16/go/cli/mcap/main.go:21 +0x20

This file has a channel with schema_id: 0.

mcap cli version: v0.0.16

@defunctzombie defunctzombie added the bug Something isn't working label Sep 14, 2022
@jtbandes
Copy link
Member

Same error happens with cli v0.0.19

@jtbandes jtbandes self-assigned this Sep 15, 2022
jtbandes added a commit that referenced this issue Sep 16, 2022
**Public-Facing Changes**
Fixed a bug where `mcap info` would crash if a channel had no schema.


**Description**
Fixes #579
jtbandes added a commit that referenced this issue Jul 7, 2023
### Public-Facing Changes

CLI commands `filter`, `compress`, `decompress`, and `recover` no longer fail on schemaless channels (schema id = 0).

### Description

Don't fail when encountering schema ID 0.

Fixes FG-4182

See also:
- #829
- #847
- #579
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants