diff --git a/resources/docs/simulation/SUMMARY.md b/resources/docs/simulation/SUMMARY.md index 0363dff1278..587589109fc 100644 --- a/resources/docs/simulation/SUMMARY.md +++ b/resources/docs/simulation/SUMMARY.md @@ -117,7 +117,8 @@ * [Trucks on the Move](extra/migrating/anylogic/building-the-simulation/trucks-on-the-move.md) * [Full Initialization](extra/migrating/anylogic/building-the-simulation/full-initialization.md) * [Improving our Visualization](extra/migrating/anylogic/building-the-simulation/improving-our-visualization.md) -* [Error Reference & Debugging](extra/error-reference.md) +* [Troubleshooting & Debugging](extra/troubleshooting-1/README.md) + * [Error reference](extra/troubleshooting-1/error-reference.md) * [Determinism](extra/determinism.md) * [Performance](extra/performance.md) * [System Requirements](extra/specs-requirements.md) diff --git a/resources/docs/simulation/extra/troubleshooting-1/README.md b/resources/docs/simulation/extra/troubleshooting-1/README.md new file mode 100644 index 00000000000..cdf72766d5d --- /dev/null +++ b/resources/docs/simulation/extra/troubleshooting-1/README.md @@ -0,0 +1,31 @@ +--- +description: Debugging simulation logic and application crashes +--- + +# Troubleshooting & Debugging + +## Debugging + +{% embed url="https://youtu.be/lqEZk0Xp51U" caption="Debugging tutorial" %} + +A few tips for debugging simulation errors: + +* You can use `console.log()` in JavaScript behaviors or `print()` in Python behaviors to output the value of a variable or an expression to the developer console \(**Ctrl+Shift+J** on Windows, or **Cmd+Option+J** on Mac\). +* The Raw Output panel displays the full state of your simulation, which can be useful for figuring out what's going on. Keep in mind though it generates it for the last completed time-step - if your simulation has an error in the middle of a time-step the Raw Output panel will only show you the state that you entered the time-step with. +* Often it's easiest to debug simulations with the bare minimum number of agents, to make it easier to track what's going on. Try reducing the number you create to simplify. +* Please see the [error reference](error-reference.md) for an explanation of specific errors. + +## Troubleshooting crashes + +Despite out best efforts, sometimes hCore crashes with a screen that looks like this: + +![](../../.gitbook/assets/screenshot-2021-06-15-at-10.24.37.png) + +We hope you never see hCore crash. But if you do, there are a few things you can try: + +1. **Refresh the page** This will usually do the trick. +2. **Clear your browser cache \(saved data\)** Sometimes the files or configuration details that hCore depends on get into a weird state and need to be reset. You can read how to do this on [Chrome](https://support.google.com/accounts/answer/32050), [Firefox](https://support.mozilla.org/en-US/kb/how-clear-firefox-cache), [Edge](https://support.microsoft.com/en-us/microsoft-edge/view-and-delete-browser-history-in-microsoft-edge-00cf7943-a9e1-975a-a33d-ac10ce454ca4). Note that this can also clear saved passwords and other data, so check any settings in the process carefully. You can also **try opening a private/incognito window first** - if it works there, clearing your browser cache is likely to make it work in a regular window. +3. **Try a different browser** Some errors are specific to certain browsers or browser versions. +4. **Close other browser windows or browser tabs** Some errors are caused by resources being unavailable, and closing other browser windows can help free them up. If the error details mention __memory or WebGL this may help. For errors relating to WebGL \(which renders graphics\), [you can also check your browser's support here](https://get.webgl.org/). +5. **Contact us** Please [contact us](https://hash.ai/contact) if you have trouble recovering from a crash, if you encounter them repeatedly, or if there is other useful information we could add to this page. + diff --git a/resources/docs/simulation/extra/error-reference.md b/resources/docs/simulation/extra/troubleshooting-1/error-reference.md similarity index 58% rename from resources/docs/simulation/extra/error-reference.md rename to resources/docs/simulation/extra/troubleshooting-1/error-reference.md index b9c7b1c73e3..cbf14ad1f87 100644 --- a/resources/docs/simulation/extra/error-reference.md +++ b/resources/docs/simulation/extra/troubleshooting-1/error-reference.md @@ -1,10 +1,10 @@ --- -description: Errors and what they mean +description: Errors you may encounter and how to fix them --- -# Error Reference & Debugging +# Error reference -{% embed url="https://youtu.be/lqEZk0Xp51U" caption="Debugging tutorial" %} +You may see a red error message pop up when running a simulation - here's some of the most common, and how to fix them. @@ -26,13 +26,13 @@ description: Errors and what they mean - - @@ -48,11 +48,3 @@ description: Errors and what they mean We're expanding this list with more errors, explanations, and fixes. If you encounter an error that is unclear, [let us know](https://hashpublic.slack.com/archives/C0151PYN1T4). -## Debugging - -A few tips for debugging errors: - -* You can use `console.log()` in JavaScript behaviors or `print()` in Python behaviors to output the value of a variable or an expression to the developer console \(**Ctrl+Shift+J** on Windows, or **Cmd+Option+J** on Mac\). -* The Raw Output panel displays the full state of your simulation, which can be useful for figuring out what's going on. Keep in mind though it generates it for the last completed time-step - if your simulation has an error in the middle of a time-step the Raw Output panel will only show you the state that you entered the time-step with. -* Often it's easiest to debug simulations with the bare minimum number of agents, to make it easier to track what's going on. Try reducing the number you create to simplify. - diff --git a/resources/docs/simulation/extra/troubleshooting.md b/resources/docs/simulation/extra/troubleshooting.md index f146a5fea19..209b9c78b0b 100644 --- a/resources/docs/simulation/extra/troubleshooting.md +++ b/resources/docs/simulation/extra/troubleshooting.md @@ -8,7 +8,7 @@ This page is to help with issues where hCore fails to load, or crashes, with a s ![](../.gitbook/assets/screenshot-2021-06-15-at-10.24.37.png) -If you're looking for help with debugging simulation logic, head over to [debugging](error-reference.md). +If you're looking for help with debugging simulation logic, head over to [debugging](troubleshooting-1/). ### What to try if you encounter a crash
ERROR running simulation: [error] did not match any variant of untagged enum OutboundMessageAll messages must + All messages must have a to and type field this error indicates the type is missing.
D is not a function.Check analysis.json + Check analysis.json - this can indicate you referenced an output that doesn't exist or used an incorrect operation.