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

cargo xtask run results in white screen #538

Closed
rowr111 opened this issue May 9, 2024 · 9 comments
Closed

cargo xtask run results in white screen #538

rowr111 opened this issue May 9, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@rowr111
Copy link
Contributor

rowr111 commented May 9, 2024

When I try to start the emulator using cargo xtask run all I see is a white screen. Example log and screenshot below.
I got latest from upstream/main and I did rustup update before this, FYI.

example

PS D:\code\xous-core> cargo xtask run hello
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.43s
     Running `target\debug\xtask.exe run hello`
No change to the target locale language of en
    Command: cargo build --release --package xous-ticktimer --package xous-log --package xous-names --package xous-susres --package graphics-server --package early_settings --package keyboard --package spinor --package llio --package com --package net --package dns --package gam --package ime-frontend --package ime-plugin-shell --package codec --package modals --package root-keys --package trng --package [email protected] --package jtag --package status --package shellchat --package pddb --package usb-device-xous --package hello --features timestamp --features pddbtest --features ditherpunk --features tracking-alloc --features tls --features hosted
warning: [email protected]: Reading D:\code\xous-core/**/i18n.json
warning: [email protected]: Reading external D:\code\sigchat/**/i18n.json
warning: [email protected]: "D:\\code\\xous-core\\apps\\app-loader\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\apps\\ball\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\apps\\hello\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\apps\\hidv2\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\apps\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\apps\\mtxchat\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\apps\\mtxcli\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\apps\\repl\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\apps\\vault\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\libs\\chat\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\libs\\tls\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\services\\gam\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\services\\ime-frontend\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\services\\modals\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\services\\net\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\services\\pddb\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\services\\root-keys\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\services\\shellchat\\locales\\i18n.json"
warning: [email protected]: "D:\\code\\xous-core\\services\\status\\locales\\i18n.json"
   Compiling gam v0.1.0 (D:\code\xous-core\services\gam)
   Compiling xous-ticktimer v0.1.32 (D:\code\xous-core\services\xous-ticktimer)
   Compiling modals v0.1.0 (D:\code\xous-core\services\modals)
   Compiling ime-frontend v0.1.0 (D:\code\xous-core\services\ime-frontend)
   Compiling usb-device-xous v0.1.0 (D:\code\xous-core\services\usb-device-xous)
   Compiling hello v0.1.0 (D:\code\xous-core\apps\hello)
   Compiling root-keys v0.1.0 (D:\code\xous-core\services\root-keys)
   Compiling pddb v0.1.0 (D:\code\xous-core\services\pddb)
   Compiling net v0.1.0 (D:\code\xous-core\services\net)
   Compiling userprefs v0.1.0 (D:\code\xous-core\libs\userprefs)
   Compiling dns v0.1.0 (D:\code\xous-core\services\dns)
   Compiling tls v0.1.0 (D:\code\xous-core\libs\tls)
   Compiling status v0.1.0 (D:\code\xous-core\services\status)
   Compiling shellchat v0.1.0 (D:\code\xous-core\services\shellchat)
warning: struct `StdoutTracker` is never constructed
  --> services\shellchat\src\main.rs:68:8
   |
68 | struct StdoutTracker {
   |        ^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default
warning: `shellchat` (bin "shellchat") generated 1 warning
    Finished `release` profile [optimized] target(s) in 31.49s
Starting hosted mode...
    Command: cargo run --release -- D:\code\xous-core/target/release/xous-ticktimer.exe D:\code\xous-core/target/release/xous-log.exe D:\code\xous-core/target/release/xous-names.exe D:\code\xous-core/target/release/xous-susres.exe D:\code\xous-core/target/release/graphics-server.exe D:\code\xous-core/target/release/early_settings.exe D:\code\xous-core/target/release/keyboard.exe D:\code\xous-core/target/release/spinor.exe D:\code\xous-core/target/release/llio.exe D:\code\xous-core/target/release/com.exe D:\code\xous-core/target/release/net.exe D:\code\xous-core/target/release/dns.exe D:\code\xous-core/target/release/gam.exe D:\code\xous-core/target/release/ime-frontend.exe D:\code\xous-core/target/release/ime-plugin-shell.exe D:\code\xous-core/target/release/codec.exe D:\code\xous-core/target/release/modals.exe D:\code\xous-core/target/release/root-keys.exe D:\code\xous-core/target/release/trng.exe D:\code\xous-core/target/release/[email protected] D:\code\xous-core/target/release/jtag.exe D:\code\xous-core/target/release/status.exe D:\code\xous-core/target/release/shellchat.exe D:\code\xous-core/target/release/pddb.exe D:\code\xous-core/target/release/usb-device-xous.exe D:\code\xous-core/target/release/hello.exe
warning: trait `SerialWrite` is never used
 --> kernel\src\io.rs:5:11
  |
5 | pub trait SerialWrite {
  |           ^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: trait `SerialRead` is never used
  --> kernel\src\io.rs:11:11
   |
11 | pub trait SerialRead {
   |           ^^^^^^^^^^

warning: `xous-kernel` (bin "xous-kernel") generated 2 warnings
    Finished `release` profile [optimized] target(s) in 0.34s
     Running `D:\code\xous-core\target\release\xous-kernel.exe D:\code\xous-core/target/release/xous-ticktimer.exe D:\code\xous-core/target/release/xous-log.exe D:\code\xous-core/target/release/xous-names.exe D:\code\xous-core/target/release/xous-susres.exe D:\code\xous-core/target/release/graphics-server.exe D:\code\xous-core/target/release/early_settings.exe D:\code\xous-core/target/release/keyboard.exe D:\code\xous-core/target/release/spinor.exe D:\code\xous-core/target/release/llio.exe D:\code\xous-core/target/release/com.exe D:\code\xous-core/target/release/net.exe D:\code\xous-core/target/release/dns.exe D:\code\xous-core/target/release/gam.exe D:\code\xous-core/target/release/ime-frontend.exe D:\code\xous-core/target/release/ime-plugin-shell.exe D:\code\xous-core/target/release/codec.exe D:\code\xous-core/target/release/modals.exe D:\code\xous-core/target/release/root-keys.exe D:\code\xous-core/target/release/trng.exe D:\code\xous-core/target/release/[email protected] D:\code\xous-core/target/release/jtag.exe D:\code\xous-core/target/release/status.exe D:\code\xous-core/target/release/shellchat.exe D:\code\xous-core/target/release/pddb.exe D:\code\xous-core/target/release/usb-device-xous.exe D:\code\xous-core/target/release/hello.exe`
KERNEL: Xous server listening on 127.0.0.1:55184
KERNEL: Starting initial processes:
  PID  |  Command
-------+------------------
 2 |  D:\code\xous-core/target/release/xous-ticktimer.exe
 3 |  D:\code\xous-core/target/release/xous-log.exe
 4 |  D:\code\xous-core/target/release/xous-names.exe
 5 |  D:\code\xous-core/target/release/xous-susres.exe
 6 |  D:\code\xous-core/target/release/graphics-server.exe
 7 |  D:\code\xous-core/target/release/early_settings.exe
 8 |  D:\code\xous-core/target/release/keyboard.exe
 9 |  D:\code\xous-core/target/release/spinor.exe
 10 |  D:\code\xous-core/target/release/llio.exe
 11 |  D:\code\xous-core/target/release/com.exe
 12 |  D:\code\xous-core/target/release/net.exe
 13 |  D:\code\xous-core/target/release/dns.exe
 14 |  D:\code\xous-core/target/release/gam.exe
 15 |  D:\code\xous-core/target/release/ime-frontend.exe
 16 |  D:\code\xous-core/target/release/ime-plugin-shell.exe
 17 |  D:\code\xous-core/target/release/codec.exe
 18 |  D:\code\xous-core/target/release/modals.exe
 19 |  D:\code\xous-core/target/release/root-keys.exe
 20 |  D:\code\xous-core/target/release/trng.exe
 21 |  D:\code\xous-core/target/release/[email protected]
 22 |  D:\code\xous-core/target/release/jtag.exe
'D:\code\xous-core/target/release/[email protected]' is not recognized as an internal or external command,
operable program or batch file.
 23 |  D:\code\xous-core/target/release/status.exe
 24 |  D:\code\xous-core/target/release/shellchat.exe
 25 |  D:\code\xous-core/target/release/pddb.exe
 26 |  D:\code\xous-core/target/release/usb-device-xous.exe
 27 |  D:\code\xous-core/target/release/hello.exe
LOG: my PID is 3
LOG: Creating the reader thread
LOG: Running the output
LOG: Xous Logging Server starting up...
LOG: Server listening on address SID([1937076088LOG: my PID is 3
, 1735355437, 1919251245, 544367990])
LOG: Counter tick: 0
INFO:xous_names: my PID is 4 (services\xous-names\src\main.rs:350)
INFO:xous_names: started (services\xous-names\src\main.rs:365)
INFO:xous_susres: my PID is 5 (services\xous-susres\src\main.rs:602)
INFO:graphics_server: my PID is 6 (services\graphics-server\src\main.rs:157)
INFO:early_settings: my PID is 7 (services\early_settings\src\main.rs:74)
INFO:spinor: my PID is 9 (services\spinor\src\main.rs:809)
INFO:keyboard: my PID is 8 (services\keyboard\src\main.rs:763)
INFO:llio: my PID is 10 (services\llio\src\main.rs:255)
INFO:xous_ticktimer: my PID is 2 (services\xous-ticktimer\src\main.rs:22)
INFO:xous_ticktimer: **************************************************************** (services\xous-ticktimer\src\main.rs:26)
INFO:xous_ticktimer: Welcome to Xous v0.9.15-982-gfe7ee955 (services\xous-ticktimer\src\main.rs:27)
INFO:xous_ticktimer: Built on Thu, 9 May 2024 23:24:06 +0900 (services\xous-ticktimer\src\main.rs:28)
INFO:xous_ticktimer: **************************************************************** (services\xous-ticktimer\src\main.rs:29)
INFO:xous_ticktimer: Server started with SID SID([1801677172, 1701669236, 1702047090, 1919252082]) (services\xous-ticktimer\src\main.rs:41)
INFO:ime_plugin_shell: my PID is 16 (services\ime-plugin-shell\src\main.rs:15)
INFO:codec: my PID is 17 (services\codec\src\main.rs:28)
INFO:modals: my PID is 18 (services\modals\src\main.rs:79)
INFO:dns: my PID is 13 (services\dns\src\main.rs:456)
INFO:ime_frontend: my PID is 15 (services\ime-frontend\src\main.rs:810)
INFO:jtag: my PID is 22 (services\jtag\src\main.rs:510)
INFO:shellchat: my PID is 24 (services\shellchat\src\main.rs:407)
INFO:net: my PID is 12 (services\net\src\main.rs:139)
INFO:gam: my PID is 14 (services\gam\src\main.rs:51)
INFO:trng: my PID is 20 (services\trng\src\main.rs:621)
INFO:hello: Hello world PID is 27 (apps\hello\src\main.rs:114)
INFO:com: my PID is 11 (services\com\src\main.rs:321)
INFO:usb_device_xous::main_hosted: my PID is 26 (services\usb-device-xous\src\main_hosted.rs:17)
INFO:root_keys: my PID is 19 (services\root-keys\src\main.rs:579)
INFO:status: my PID is 23 (services\status\src\main.rs:197)
INFO:pddb: my PID is 25 (services\pddb\src\main.rs:463)
INFO:trng::implementation: hosted mode TRNG is *not* random, it is a deterministic LFSR (services\trng\src\main.rs:572)
INFO:trng::implementation: hosted mode TRNG is *not* random, it is a deterministic LFSR (services\trng\src\main.rs:572)
INFO:trng::implementation: hosted mode TRNG is *not* random, it is a deterministic LFSR (services\trng\src\main.rs:572)
INFO:root_keys: Boot FPGA key source: Efuse (services\root-keys\src\main.rs:593)
INFO:gam::contexts: acquiring connection to IMEF... (services\gam\src\contexts.rs:129)
INFO:pddb: Heap limit increased to: 2097152 (services\pddb\src\main.rs:620)
INFO:xous_names: _Status bar GID receiver_ server has unregistered (services\xous-names\src\main.rs:431)
INFO:gam: ******************************************************************************** (services\gam\src\main.rs:126)
INFO:gam: USAGE: (services\gam\src\main.rs:127)
INFO:gam:    `Home` key to bring up menu; arrow keys to go up/down; `Home` to select again (services\gam\src\main.rs:128)
INFO:gam:    `F1`-`F4` to pick predictions; `F5` and `F6` generate test unicode characters (services\gam\src\main.rs:129)
INFO:gam:    Otherwise type in the GUI window; `help` for the current command list (services\gam\src\main.rs:130)
INFO:gam:    ^C in the console window (this window) to quit (services\gam\src\main.rs:131)
INFO:gam: ******************************************************************************** (services\gam\src\main.rs:132)
INFO:shellchat::cmds: SoC git rev v0.0.0-0-g0 (services\shellchat\src\cmds.rs:242)
INFO:shellchat::cmds: _|TT|_PDDB.DNA,0,_|TE|_ (services\shellchat\src\cmds.rs:243)
WARN:usb_device_xous::main_hosted: SoC not compatible with HID, ignoring USB message: Envelope { sender: Sender { data: 387645441 }, body: Borrow(MemoryMessage { id: 11, buf: MemoryRange { addr: 2434568704000, size: 4096 }, offset: Some(8), valid: Some(4096) }) } (services\usb-device-xous\src\main_hosted.rs:59)
ERR :com: Timeout during interrupt vector fetch. EC may not be responsive. Returning error vector.... (services\com\src\main.rs:1154)
INFO:shellchat::cmds: EC gateware git commit: deaddead, dirty (services\shellchat\src\cmds.rs:251)
INFO:shellchat::cmds: EC sw tag: v0.9.5-0 (services\shellchat\src\cmds.rs:253)
ERR :com: Timeout during interrupt vector fetch. EC may not be responsive. Returning error vector.... (services\com\src\main.rs:1154)
INFO:shellchat::cmds: WF200 fw rev 173.173.173 (services\shellchat\src\cmds.rs:255)
ERR :status: EC firmware package did not validate (services\status\src\main.rs:466)
WARN:net: We had a bogus MAC address from the EC, filling in a temporary fake one to avoid panics: [2, 61, cb, 74, 4c, 2b] (services\net\src\main.rs:206)
INFO:status: No backup header found (services\status\src\main.rs:544)
INFO:status: Staged gateware version: SemVer { maj: 0, min: 0, rev: 0, extra: 0, commit: None } (services\status\src\main.rs:550)
INFO:status: checking gateware signature... (services\status\src\main.rs:585)
INFO:status: Guttering Some(Quit) (services\status\src\main.rs:266)
INFO:status: |status: starting main loop (services\status\src\main.rs:703)
INFO:pddb: Requesting login password (services\pddb\src\main.rs:2313)
INFO:pddb: Attempting to mount the PDDB (services\pddb\src\main.rs:2379)
INFO:pddb::backend::hw: decrypted: 8164, FastSpace size: 8164 (services\pddb\src\backend\hw.rs:1318)
INFO:pddb::backend::hw: space_log_addrs len: 1 (services\pddb\src\backend\hw.rs:1344)
INFO:pddb::backend::hw: System BasisRoot record found, generating cache entry (services\pddb\src\backend\hw.rs:1954)
INFO:pddb::backend::basis: Basis .System found and reconstructed (services\pddb\src\backend\basis.rs:1435)
INFO:pddb: PDDB mount operation finished successfully (services\pddb\src\main.rs:2383)
INFO:pddb: _|TT|_PDDB.MOUNTED,_|TE|_ (services\pddb\src\main.rs:719)
INFO:pddb: PDDB post-mount caching stats: 4096 heap, 1144 cache (services\pddb\src\main.rs:772)
INFO:status: audio enable state: false (services\status\src\main.rs:851)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:net::connection_manager: EC rev v0.9.5-0 is incompatible with connection manager (services\net\src\connection_manager.rs:104)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
WARN:llio: Time offsets are not initialized, can't report local time (services\llio\src\lib.rs:44)
@bunnie
Copy link
Member

bunnie commented May 9, 2024

Looks like a regression introduced in Rust 1.78. Steps to reproduce:

Here's the steps to reproduce:

  1. update rust to 1.78.0

  2. do cargo xtask run

  3. expected: see the UI appear in the window. actual: you get a blank screen.

  4. do rustup toolchain install 1.77.2

  5. run cargo +1.77.2 xtask run

  6. expected: same error as in 1.78.0 (if this was a code bug). actual: the UI works just fine

So it seems like the issue is the toolchain, since there was no change to the code between the runs...

It works on Renode and hardware, fwiw. just hosted mode is broken. The hosted mode bug could even be specific to Windows, I don't have a linux host to test this on conveniently at the moment.

@bunnie bunnie added the bug Something isn't working label May 9, 2024
@bunnie
Copy link
Member

bunnie commented May 9, 2024

@xobs any ideas on what could be causing this?

@bunnie bunnie self-assigned this May 9, 2024
@bunnie
Copy link
Member

bunnie commented May 9, 2024

The problem seems to be specifically something in between the graphics-server, minifb, and the actual windows subsystem.

graphics-server seems to be receiving messages normally, and it can process key hits etc. What seems to be happening is none of the graphics ever get updated to the screen. I tried updating to the latest minifb on crates.io but didn't see any change...

@bunnie
Copy link
Member

bunnie commented May 9, 2024

Huh, other users have reported this problem on windows 11: emoon/rust_minifb#351

@xobs
Copy link
Member

xobs commented May 9, 2024

Does it fix things if you update the minifb dependency as they specified?

minifb = { git = "https://github.com/emoon/rust_minifb.git", rev = "633e6cd4f8f55fd9cbedc461976dde0f408bea35" }

@bunnie
Copy link
Member

bunnie commented May 9, 2024

OK yes, I can confirm that using the gitrev of an unreleased minifb causes the bug to go away:

git = "https://github.com/emoon/rust_minifb.git", rev = "633e6cd4f8f55fd9cbedc461976dde0f408bea35"

I'll swap that pin over to the git repo directly this weekend if no release is made by then.

@bunnie
Copy link
Member

bunnie commented May 9, 2024

Alright, I have a patch to this, I'll make a PR for it once I'm in a region of the world that's not blocking both ssh and vpn. 😬

bunnie added a commit that referenced this issue May 10, 2024
This is the work-around suggested at

emoon/rust_minifb#351

until a new release is tagged.
bunnie added a commit that referenced this issue May 12, 2024
bunnie added a commit that referenced this issue May 12, 2024
@bunnie
Copy link
Member

bunnie commented May 12, 2024

#539 should improve the situation. If it fixes it for you @rowr111 , please go ahead and close the issue (no hurries tho, just letting you know).

@rowr111
Copy link
Contributor Author

rowr111 commented May 14, 2024

yup all good now, thank you!

@rowr111 rowr111 closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants