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

Graphviz generator crashes on sizeof<> expressions #966

Closed
jtbandes opened this issue May 19, 2022 · 3 comments
Closed

Graphviz generator crashes on sizeof<> expressions #966

jtbandes opened this issue May 19, 2022 · 3 comments
Milestone

Comments

@jtbandes
Copy link
Contributor

jtbandes commented May 19, 2022

The following definition crashes the graphviz generator:

meta:
  id: asdf
  file-extension: asdf

seq:
  - id: x
    size: sizeof<xx>
    
types:
  xx:
    seq:
      - id: a
        type: u1

I believe the problem is that this match doesn't handle sizeofs.

This is preventing log/mcap.ksy from having a svg generated at https://formats.kaitai.io/mcap/

@jtbandes
Copy link
Contributor Author

@generalmimon Thanks for fixing this! I still see a crash when I test it out on ide.kaitai.io, but guessing this just means the new version hasn't been deployed yet. Looking forward to it :)

@generalmimon
Copy link
Member

@jtbandes:

I still see a crash when I test it out on ide.kaitai.io, but guessing this just means the new version hasn't been deployed yet.

Correct. As noted at https://doc.kaitai.io/user_guide.html#web-ide, https://ide.kaitai.io/ hosts the latest "stable" Web IDE and compiler version, so it uses the released KSC 0.10.

https://ide.kaitai.io/devel/ is supposed to have the latest development version of KSC, but unfortunately it has a half-year old compiler at this point. In the past, there used to be a script that automatically triggered a rebuild of the Web IDE when a new version of KSC was available, but it was written for Travis CI and we migrated to GitHub Actions since then (see kaitai-io/kaitai_struct_webide@0a79a8e), but we haven't migrated the script that would trigger the Web IDE rebuild yet. I want to get around to it someday, but I don't know when that will be.

In the meantime, you can build the compiler from source (but checkout the default master branch, not serialization) to try out the development version of KSC before it is released.

@jtbandes
Copy link
Contributor Author

jtbandes commented Aug 15, 2024

Here's a proposal for how to migrate the auto-rebuild behavior:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants