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

Upgrade to FontMetrics >= 0.5 leaves the example Scenic apps in an infinite crash loop on startup. #220

Closed
skovsgaard opened this issue Jun 7, 2021 · 2 comments

Comments

@skovsgaard
Copy link

As of FontMetrics v0.5 it appears the function, from_binary/1 has been removed. However, Scenic still attempts to call this from the Scenic.Cache.Static.FontMetrics module. This causes an infinite series of crashes and restarts during init.

Checklist

  • [ x ] Check other issues and make sure that it is not reported yet.

Versions and Environment

Elixir:

# elixir -v
Elixir 1.11.2 (compiled with Erlang/OTP 23)

Erlang:

# erl -v
Erlang/OTP 23 [erts-11.1.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

Scenic:

# mix deps | grep scenic
* scenic 0.10.4 (Hex package) (mix)
  locked at 0.10.4 (scenic) d4c0b7f2

OS:

Linux 5.11.22-100.fc32.x86_64 #1 SMP Wed May 19 18:58:25 UTC 2021 GNU/Linux

(Fedora Workstation 32)

Steps to reproduce

  1. Run the following commands from the "Getting Started - Scenic v0.10.4 guide":
  2. mix scenic.new.example my_app
  3. cd my_app
  4. mix do deps.get, scenic.run
  5. Observe debug output in terminal and accompanying blank black Scenic window.

Expected Behavior

The Scenic window should produce a working example application and the terminal should at most show info or warn level output.

Actual Behavior

No application is visible in Scenic window and a rapidly recurring error message and stack trace is shown in the terminal.

Stack Trace

%UndefinedFunctionError{arity: 1, function: :from_binary, message: nil, module: FontMetrics, reason: nil}
-->     (font_metrics 0.5.1) FontMetrics.from_binary(<<61, 145, 193, 107, 19, 65, 20, 198, 119, 187, 19, 76, 78, 213, 255, 160, 224, 65, 80, 18, 90, 109, 106, 10, 34, 162, 88, 83, 74, 138, 132, 22, 241, 32, 227, 102, 243, 54, 14, 238, 206, 44, 51, 179, 37, 61, 107, 75, 211, 150, ...>>)
    (scenic 0.10.4) lib/scenic/cache/static/font_metrics.ex:226: Scenic.Cache.Static.FontMetrics.load/3
    (scenic 0.10.4) lib/scenic/cache/static/font_metrics.ex:154: Scenic.Cache.Static.FontMetrics.get/2
    (scenic 0.10.4) lib/scenic/scenes/error.ex:44: Scenic.Scenes.Error.init/2
    (scenic 0.10.4) lib/scenic/scene.ex:882: Scenic.Scene.handle_continue/2
    (stdlib 3.14) gen_server.erl:689: :gen_server.try_dispatch/4
    (stdlib 3.14) gen_server.erl:431: :gen_server.loop/7
    (stdlib 3.14) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
@axelson
Copy link
Collaborator

axelson commented Jun 7, 2021

I think this is fixed by #219, it just hasn't been released on hex yet.

@skovsgaard
Copy link
Author

Seems like it. Pardon my missing that. I'll just close this issue.

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

No branches or pull requests

2 participants