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] Saving large mesh (100+ points) causes Marlin to reboot and corrupt EEPROM #21186

Closed
hakimio opened this issue Feb 25, 2021 · 16 comments
Closed

Comments

@hakimio
Copy link
Contributor

hakimio commented Feb 25, 2021

Bug Description

Trying to save a larger than 100 points mesh to EEPROM causes Marlin to restart corrupting EEPROM.

Configuration Files

Marlin config.zip

Steps to Reproduce

  1. Generate a ABL mesh with more than 100 points (ie 12x12 or bigger) (G29)
  2. Try to save the mesh (M500)

Expected behavior:

The mesh should be saved successfully.

Actual behavior:

Marlin restarts corrupting the EEPROM.

Additional Information

Most likely caused by watchdog (haven't tried disabling yet). Would be nice if watchdog would be disabled when saving the mesh to EEPROM or any other kind of large amount of data.

I am using MKS Robin Nano v2 board now, the same happens with v1 as well.

@ellensp
Copy link
Contributor

ellensp commented Feb 25, 2021

// Following prevents Marlin reboot when writing large mesh
// #define WATCHDOG_DURATION_8S
^^^^^^^^^^^^^^^^^^^^^
Enable this

@hakimio
Copy link
Contributor Author

hakimio commented Feb 25, 2021

I was just planning to test it out. Would be nice if WATCHDOG_DURATION_8S was at least added to the default Configuration_adv.h config. I only found out about this setting by googling for similar issues (#20070).

@ellensp
Copy link
Contributor

ellensp commented Feb 25, 2021

12x12 mesh is insane for 99.99% of users. You don't set a parameter like WATCHDOG_DURATION_8S as default when it doesn't apply to 99.99% of users

@hakimio
Copy link
Contributor Author

hakimio commented Feb 25, 2021

I am not saying to enable it by default. I am just saying to at least add it commented out.

// #define WATCHDOG_DURATION_8S

@hakimio
Copy link
Contributor Author

hakimio commented Feb 26, 2021

Related issue: #20449
Related PR: #20510

@hakimio
Copy link
Contributor Author

hakimio commented Feb 26, 2021

@sjasonsmith can you look into this when you have some time?

@ellensp
Copy link
Contributor

ellensp commented Feb 27, 2021

Your pr has been merged, presuming this is resolved.

@ellensp ellensp closed this as completed Feb 27, 2021
@hakimio
Copy link
Contributor Author

hakimio commented Feb 27, 2021

@ellensp the PR was for a different board which I don't use. Reopen please. And it wasn't my PR.

@ellensp ellensp reopened this Feb 27, 2021
@ellensp
Copy link
Contributor

ellensp commented Feb 27, 2021

Did WATCHDOG_DURATION_8S not fix it?

@hakimio
Copy link
Contributor Author

hakimio commented Feb 27, 2021

It is a valid workaround but:

  1. it's not a solution, but a hack,
  2. It's hard to find this setting. I don't understand why you can't include it in the default config (disabled).
  3. @sjasonsmith has a better solution but it's only for some specific boards. It should be applied to all EEPROM implementations.

@ellensp
Copy link
Contributor

ellensp commented Feb 27, 2021

not all eeproms are that slow.

@hakimio
Copy link
Contributor Author

hakimio commented Feb 27, 2021

Let's keep this open at least until @sjasonsmith decides if his solution should be applied to other boards.
So far it seems to be an issue with MKS Robin Nano and BTT SKR boards apart from Creality V4 which was fixed already.

@nanotuxi
Copy link

Would enabeling
#define OPTIMIZED_MESH_STORAGE // Store mesh with less precision to save EEPROM space
improve the situation? (not tested yet)

@hakimio
Copy link
Contributor Author

hakimio commented Feb 28, 2021

@nanotuxi if you read the whole thread, you'll see that we have already found possible solutions/workarounds. We are just discussing which one should be used.

@hakimio
Copy link
Contributor Author

hakimio commented Mar 24, 2021

@ellensp I've created a PR #21436 to address the issue.

@hakimio hakimio closed this as completed Mar 26, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants