guild icon
Toit
#Error message unclear with alpha.47
Thread channel in help
Rikke
Rikke 01/05/2023 01:27 PM
I just updated toit from alpha.35 to alpha.47, and now every error message is the same.

I got this error message with a modified primitive function, because I entered a wrong argument. Now I'm getting this and I know the problem is related to the UART. I'm decoding with the snapshot used to generate the bin file. Don't know if this is a bug, or my update went wrong. I've reinstalled toit with same outcome.

(error message in next message because of discord thread character limit)
Rikke
Rikke 01/05/2023 01:27 PM
Decoding by `jag`, device has version <2.0.0-alpha.47> ****************************************************************************** EXCEPTION error. OUT_OF_BOUNDS 0: List_.[] <sdk>/core/collections.toit:1780:24 1: SourceSegment.read_string_ /home/runner/work/toit/toit/tools/snapshot.toit:1335:28 2: MethodSegment.read_pubsub_entry_ /home/runner/work/toit/toit/tools/snapshot.toit:1398:14 3: MethodSegment.read_pubsub_info_.<block> /home/runner/work/toit/toit/tools/snapshot.toit:1405:33 4: Array_.<block> <sdk>/core/collections.toit:830:31 5: SmallInteger_.repeat <sdk>/core/numbers.toit:1194:3 6: Array_ <sdk>/core/collections.toit:830:10 7: List <sdk>/core/collections.toit:177:31 8: MethodSegment.read_pubsub_info_ /home/runner/work/toit/toit/tools/snapshot.toit:1405:12 9: MethodSegment.read_element_ /home/runner/work/toit/toit/tools/snapshot.toit:1421:20 10: MapSegment.read_content_.<block> /home/runner/work/toit/toit/tools/snapshot.toit:1370:18 11: SmallInteger_.repeat <sdk>/core/numbers.toit:1194:3 12: MapSegment.read_content_ /home/runner/work/toit/toit/tools/snapshot.toit:1369:12 13: SourceSegment.content /home/runner/work/toit/toit/tools/snapshot.toit:1328:33 14: MapSegment.content /home/runner/work/toit/toit/tools/snapshot.toit:1374:26 15: Program /home/runner/work/toit/toit/tools/snapshot.toit:87:68 16: SnapshotBundle.decode /home/runner/work/toit/toit/tools/snapshot.toit:198:12 17: handle_system_message /home/runner/work/toit/toit/tools/system_message.toit:44:22 18: decode_system_message /home/runner/work/toit/toit/tools/system_message.toit:89:3 19: main.<lambda> /home/runner/work/toit/toit/tools/system_message.toit:75:16 20: Command.run <pkg:pkg-cli>/cli.toit:127:33 21: main /home/runner/work/toit/toit/tools/system_message.toit:76:11 ----
floitsch
floitsch 01/05/2023 01:28 PM
How do you decode the error messages?
Rikke
Rikke 01/05/2023 01:28 PM
I'm using erics script ar p ../output/test.snapshot uuid | hexdump -e '4/1 "%02x" "-" 2/1 "%02x" "-" 2/1 "%02x" "-" 2/1 "%02x" "-" 6/1 "%02x" ".snapshot"'
floitsch
floitsch 01/05/2023 01:29 PM
ok. that gives you the correct snapshot (hopefully).
floitsch
floitsch 01/05/2023 01:29 PM
But then you call a tool to get the stacktrace.
floitsch
floitsch 01/05/2023 01:29 PM
Looks like it's tools/system_message.toit.
floitsch
floitsch 01/05/2023 01:29 PM
Is that tool up to date?
floitsch
floitsch 01/05/2023 01:30 PM
The system_message tool must be aligned with the snapshot.
floitsch
floitsch 01/05/2023 01:30 PM
It's not (always) possible to use a system_message tool from one version with the snapshot of another.
Rikke
Rikke 01/05/2023 01:30 PM
I updated all my packages and reinstalled toit by cloning a new one on git. How do I update the system_message tool
floitsch
floitsch 01/05/2023 01:30 PM
It comes with the toit checkout.
floitsch
floitsch 01/05/2023 01:31 PM
Is the snapshot that makes problems compiled with the latest toit, or still from an older Toit version?
Rikke
Rikke 01/05/2023 01:32 PM
Its compiled with alpha 47
Rikke
Rikke 01/05/2023 01:33 PM
I'm using the /toit/build/host/sdk/bin/toit.compile to make the snapshot
floitsch
floitsch 01/05/2023 01:33 PM
can you send me the snapshot?
floitsch
floitsch 01/05/2023 01:33 PM
Rikke
Rikke 01/05/2023 01:34 PM
Sure, give me a second
floitsch
floitsch 01/05/2023 01:34 PM
(and maybe the base-64 message).
Rikke
Rikke 01/05/2023 01:37 PM
Sent
floitsch
floitsch 01/05/2023 01:38 PM
EXCEPTION error. DIVISION_BY_ZERO 0: SmallInteger_./ <sdk>/core/numbers.toit:1120:36 1: update_states ../src/status_monitor.toit:106:50 2: wifi_monitor.<lambda> ../src/status_monitor.toit:71:9
floitsch
floitsch 01/05/2023 01:38 PM
That's what I get.
floitsch
floitsch 01/05/2023 01:38 PM
Is that realistic?
Rikke
Rikke 01/05/2023 01:39 PM
Yes, I guess my jag is broken. I will try and reinstall. Thank you
floitsch
floitsch 01/05/2023 01:39 PM
can you do a jag version ?
Rikke
Rikke 01/05/2023 01:39 PM
Version: v1.7.12 SDK version: v2.0.0-alpha.44 Build date: 2022-12-02T14:21:56Z
floitsch
floitsch 01/05/2023 01:40 PM
Try to update your Jaguar.
floitsch
floitsch 01/05/2023 01:40 PM
I just tried it with jag v1.7.14 and there it worked.
Rikke
Rikke 01/05/2023 01:40 PM
Okay, thanks
floitsch
floitsch 01/05/2023 01:40 PM
Similarly, if you use system_message.toit you need to update it.
Rikke
Rikke 01/05/2023 01:41 PM
I've never used system_message.toit
floitsch
floitsch 01/05/2023 01:41 PM
ok.
floitsch
floitsch 01/05/2023 01:41 PM
it's the tool that jag decode uses.
floitsch
floitsch 01/05/2023 01:41 PM
If you update jag it should automatically use a newer version.
Rikke
Rikke 01/05/2023 02:36 PM
Now that my jag works, I found a little mistake in the wifi.toit
****************************************************************************** Decoding by `jag`, device has version <2.0.0-alpha.47> ****************************************************************************** As check failed: an int (100) is not a string. 0: string.+ <sdk>/core/string.toit:399:14 1: WifiInterface_.signal_strength <sdk>/net/wifi.toit:153:31 2: update_states ../src/status_monitor.toit:90:47 3: wifi_monitor.<lambda> ../src/status_monitor.toit:71:9 ******************************************************************************
Thesignal_strength call has changed since alpha 35, and now it actually asks for the SSID and not RSSI.
signal_strength -> float: info := (client_ as WifiServiceClient).ap_info handle_ rssi := info[WIFI_SCAN_SSID_] // RSSI is usually in the range [-100..-35]. rssi = min 65 (max 0 rssi + 100) return rssi / 65.0
Changing the rssi := info[WIFI_SCAN_SSID_] to rssi := info[WIFI_SCAN_RSSI_] works :๐Ÿ™‚: the wifi.toit is found under /lib/net/wifi.toit
floitsch
floitsch 01/05/2023 02:38 PM
Thanks!
floitsch
floitsch 01/05/2023 02:41 PM
Do you have a github login, so I can mention you in the commit message?
Rikke
Rikke 01/05/2023 02:42 PM
my username is rikke-rp
Rikke
Rikke 01/05/2023 02:44 PM
Perfect :๐Ÿ‘:
40 messages in total