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

Silent error with no feedback #182

Open
mckeed opened this issue Sep 14, 2024 · 1 comment
Open

Silent error with no feedback #182

mckeed opened this issue Sep 14, 2024 · 1 comment
Labels

Comments

@mckeed
Copy link

mckeed commented Sep 14, 2024

I hit a syntax error that kaitai-struct-compiler doesn't handle well. Here's a minimal example:

meta:
  id: test
  file-extension: test
seq:
  - id: test
    size: 0
instances:
  str:
    value: test.to_s() # illegal

The problem is the web IDE does not show an error message for this, so it's not obvious at first that something is wrong. If you already had a successful parse in the window, it looks like it's still working until you notice that nothing is updating any more. Very frustrating.

The js console shows

[Error] scala.scalajs.runtime.UndefinedBehaviorError: An undefined behavior was detected: undefined is not an instance of io.kaitai.struct.exprlang.Ast$expr

from raven.js. I can share a longer stack trace if that'd be helpful.

@generalmimon
Copy link
Member

@mckeed Interesting, thanks for reporting. I've never seen this error, but it's apparently no longer reproducible at https://ide.kaitai.io/devel/ (which is the latest development version, see https://doc.kaitai.io/user_guide.html#web-ide), so I'm not sure this issue is directly actionable.

Perhaps we could look into how this situation happened with the stable Web IDE (or actually the stable KSC 0.10, because this is an error originating in the compiler) and verify that we don't have this problem anywhere else in the code. The Web IDE should also do a better job of handling even unexpected exceptions like this.

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

No branches or pull requests

2 participants