-
Notifications
You must be signed in to change notification settings - Fork 346
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
grdcontour hanging #8387
Comments
Link to forum post with script that causes hang: https://forum.generic-mapping-tools.org/t/grdcontour-gets-hung/4697. |
…finite alloc loop. The situation arose when the condition if ((dz = z[this_side] - z[this_side+1]) == 0.0f) continue; was never met by a tiny bit. Comparing to 0.0 is never a good idea. So I made it if (fabs((dz = z[this_side] - z[this_side+1])) < 1e-10) continue; I get 6 grdcontour test failures but they don't seem related to this change (more due to the endless headache of slight different grids). Fixes #8387
maybe related to GenericMappingTools/pygmt#1927 and #6738 |
Can you please try if my fix fixes it too? |
Joaquim, not sure if that was directed to me, but I updated GMT to 6.6.0_09d27ad_2024.03.03 and it still hangs on my system. |
John, it was actually meant to Dongdong but meanwhile I checked that this fix also fixes #6738 so I'll be merging this soon. |
…finite alloc loop. (#8388) The situation arose when the condition if ((dz = z[this_side] - z[this_side+1]) == 0.0f) continue; was never met by a tiny bit. Comparing to 0.0 is never a good idea. So I made it if (fabs((dz = z[this_side] - z[this_side+1])) < 1e-10) continue; I get 6 grdcontour test failures but they don't seem related to this change (more due to the endless headache of slight different grids). Fixes #8387
grdcontour gets hung when fed a grid file that has values very close to zero, but not exactly zero.
Please see the post on the GMT forum page. Data and two-line script were posted there.
System information
gmt --version
): 6.6.0_1443c0c_2024.02.26The text was updated successfully, but these errors were encountered: