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

BUG: trying to downcast TCPSocket+ (Crystal::VirtualType) <- TCPSocket (Crystal::NonGenericClassType) #15200

Open
zw963 opened this issue Nov 16, 2024 · 0 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc.

Comments

@zw963
Copy link
Contributor

zw963 commented Nov 16, 2024

Related post: https://forum.crystal-lang.org/t/bug-trying-to-downcast-tcpsocket-crystal-virtualtype-tcpsocket-crystal-nongenericclasstype/7413

Bug Report

Error target procodile failed to compile:
BUG: trying to downcast TCPSocket+ (Crystal::VirtualType) <- TCPSocket (Crystal::NonGenericClassType) (Exception)
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '??'
  from /home/zw963/Crystal/bin/crystal in '__crystal_main'
  from /home/zw963/Crystal/bin/crystal in 'main'
  from /usr/lib/libc.so.6 in '??'
  from /usr/lib/libc.so.6 in '__libc_start_main'
  from /home/zw963/Crystal/bin/crystal in '_start'
  from ???
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues

reproduce

  1. git clone https://github.com/crystal-china/procodile_cr.git
  2. cd procodile_cr
  3. git checkout add_proxy_feature_back
  4. git reset --hard 8a3de19 # only if current git hash is not same
  5. shards build

It’s seem like issue raised from a very unexpected place by this code, but, i have no idea of what happens

@zw963 zw963 added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc.
Projects
None yet
Development

No branches or pull requests

1 participant