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

Diggy debug grid print #1037

Open
anisghaoui opened this issue Feb 15, 2020 · 10 comments · May be fixed by #1039
Open

Diggy debug grid print #1037

anisghaoui opened this issue Feb 15, 2020 · 10 comments · May be fixed by #1039

Comments

@anisghaoui
Copy link

Currently, if you enable the debug grid in 0.18.6 it will systematically produce a fatal error.

@BlueRock2
Copy link
Contributor

BlueRock2 commented Feb 15, 2020

Just to confirm, you are referring to map_gen\maps\diggy\config.lua:
enable_stress_grid = true? or enable_mask_debug = true? The stress grid works for me but enabling the mask debug crashes. It indicates arg surface is a null value line 445 in diggy_cave_collapse.lua. A value for surface should be set from RS.get_surface() on line 439. That function in redmew_surface.lua has a comment that it is not safe to call outside of events which may be relevant. But I am not smart enough to fix it. Maybe someone else can. If the reason you are trying to turn on debugging for cave collapses in the first place is due to diggy cave collapses not working right in 0.18, Make sure you have the latest version as there was a diggy 0.18 patch merged just this morning. Even though the updates were just for the particle system, we were seeing some weird side effects in unexpected collapses, biters not spawning or bot mining issues before the patch. I suspect the display of the debug mask may have been broken for a while as these files weren't touched during the update of diggy to 0.18.

@anisghaoui
Copy link
Author

I do have an incorrect behaviour of the collapse. Robots not been able to mine rocks .

@BlueRock2
Copy link
Contributor

Yes this was an issue when running diggy code prior to today (the RedMew S6 server was testing the 0.18 update for about a week) but the actual update ( PR #1032 ) was not merged until about 7 hours ago. If you re-download Refactorio/Redmew now it should work now.

@anisghaoui anisghaoui changed the title Diggy bebug grid print Diggy debug grid print Feb 16, 2020
@anisghaoui
Copy link
Author

Back to report !

The robots can correctly mine rocks now.
The stress grid is displayed correctly with the correct values.
The mask debug still gives a fatal error.

Thank you, have a nice day.

@BlueRock2
Copy link
Contributor

It may be some time before there is an approved fix for the diggy mask debug display issue. If you want to view the mask debug information before then I found an temporary fix in diggy_cave_collapse.lua that worked for me. I moved the code block (lines 438-448) and inserted it between lines 428 and 429. This makes the mask info display at the origin right after you destroy your first rock. I am pretty new here, and it isn't a very elegant solution but it works.

@SimonFlapse
Copy link
Member

The error happens because the surface doesn't exist yet when the function is called the first time. I've done some testing too, but it doesn't seem to be updating. To be honest I'm not really sure of what the mask debugging option does.

@anisghaoui
Copy link
Author

His quick fix stops it from crashing.

@SimonFlapse
Copy link
Member

Sounds good, I might push a temporary fix for the crashing, although I'm not sure the debugging option works at all.

@SimonFlapse SimonFlapse linked a pull request Feb 18, 2020 that will close this issue
@anisghaoui
Copy link
Author

The displayed grid is correct and accurate.

@SimonFlapse
Copy link
Member

SimonFlapse commented Feb 18, 2020

The displayed grid is correct and accurate.

Could you provide an image for reference? Thanks :D Got one already

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

Successfully merging a pull request may close this issue.

3 participants