On Sat, Oct 31, 2020 at 1:50 PM Nihal Gabr <
gabr....@gmail.com> wrote:
>
> Here is the sample of the XML file imported from DM5. Every time we try to import it into subsurface on Windows 10, it crashes.
Right you are.
It crashes in core/parse-xml.c: weight(), because of commit
a5e7f4253ac9 ("Core: dynamically resize weight table") means that the
xml parsing code (line 1333: try_to_fill_dive()) can now be called
with no weightsystem allocated at all, and the line
if (MATCH_STATE("weight", weight,
&dive->weightsystems.weightsystems[dive->
weightsystems.nr -
1].weight))
has "dive->weightsystems.weightsystems[" being NULL, and
"dive->
weightsystems.nr - 1" is -1.
Berthold? I'll forward the test-case to you separately.
Linus