[GRASS-dev] [GRASS GIS] #1736: wxNVIZ volume display crashes Mac
GRASS GIS
trac at osgeo.org
Thu Aug 29 20:14:06 PDT 2013
#1736: wxNVIZ volume display crashes Mac
-----------------------+----------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.4
Component: wxGUI | Version: svn-releasebranch64
Keywords: | Platform: MacOSX
Cpu: OSX/Intel |
-----------------------+----------------------------------------------------
Changes (by annakrat):
* milestone: 6.4.3 => 6.4.4
Comment:
Update: crash happens when drawing isosurfaces both on Mac and Linux
(tested on G7). It does not happen always, I think it depends on data.
Testing data from Helena are
[http://skagit.meas.ncsu.edu/~helena/grasswork/JR_7408MR_2m_t70.asci.zip
here]. Try e.g. isosurface of value 10. This is the relevant part of Mac
report:
{{{
0 libgrass_ogsf.7.0.svn.dylib 0x077aaf09 gvl_read_char + 41
(gvl_calc.c:770)
1 libgrass_ogsf.7.0.svn.dylib 0x077b0d59 gvld_isosurf + 3577
(gvld.c:329)
2 libgrass_ogsf.7.0.svn.dylib 0x077afea6 gvld_vol + 134
(gvld.c:54)
3 libgrass_ogsf.7.0.svn.dylib 0x0777a4ed GVL_draw_vol + 45
(GVL2.c:410)
4 libgrass_nviz.7.0.svn.dylib 0x0787c2af Nviz_draw_all_vol + 63
(draw.c:186)
5 libgrass_nviz.7.0.svn.dylib 0x0787c399 Nviz_draw_all + 153
(draw.c:241)
}}}
The problem is (as debugger in Qt shows) that variable 'crnt_ev' in gvld.c
on line 320 is 12:
{{{
pos[i] = edge_pos[crnt_ev];
}}}
but 'edge_pos' is a field with size 12 (see line 111) so it reads wrong
data. The value of the variable 'crnt_ev' comes from a big look-up table
(mc33_table.h, line 340). So either the size of the field 'edge_pos' is
wrong or the table is wrong. On line 323 in gvld.c 'crnt_ev' is tested on
value 12 so it seems that 12 is valid?
The marching cubes algorithm is unfortunately too complicated and there
are almost no comments in the code so I have no idea what all the numbers
mean. I tried to set the size of the field 'edge_pos' to 13 and
isosurfaces don't crash anymore (tested on Linux only) and look normally.
But I have no idea if they are drawn correctly. Any ideas?
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1736#comment:26>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list