Project-Cartographer / H2Codez

A mod to restore and add functionality to the Halo 2 Editing Kit.
https://num0005.github.io/h2codez_docs/
36 stars 7 forks source link

Crashing from packaged maps using shared reference removal. #6

Open General-101 opened 6 years ago

General-101 commented 6 years ago

Putting this here for reference in the future.

I've been working on the resource maps and found that a map packaged with H2Codez and the shared reference cause a crash when loaded ingame. I tried to see what was causing it and it seems to be something related to H2Tool_Commands.cpp.

void H2Tool_Extras::apply_shared_tag_removal_scheme() { BYTE patching_offsets_list[] = { CAST_PTR(BYTE, 0x5887DF),//_postprocess_animation_data CAST_PTR(BYTE, 0x588C21),//_build_cache_file_prepare_sound_gestalt CAST_PTR(BYTE, 0x588D52),//_build_cache_file_add_tags CAST_PTR(BYTE, 0x588DCD),//_build_cache_file_add_sound_samples CAST_PTR(BYTE, 0x588E37),//_build_cache_file_sound_gestalt CAST_PTR(BYTE ,0x588E99),//_build_cache_file_add_geometry_blocks CAST_PTR(BYTE ,0x58908E),//_language_packing CAST_PTR(BYTE ,0x5890A7),//_build_cache_file_add_language_packs CAST_PTR(BYTE ,0x589105),//_build_cache_file_add_bitmap_pixels //CAST_PTR(BYTE *,0x589181),//_build_cache_file_add_tags };

BYTE patch[1] = { 0x0 };
for (int x = 0; x < NUMBEROF(patching_offsets_list); x++)           WriteBytesASM((DWORD)(patching_offsets_list[x] + 1), patch, 1);//patching push 1 -> push 0

}

Commenting out line 253 like so fixes the crash but doesn't add the tags to the map like it would before it seems. I do not believe this is a tag issue but I haven't done a lot of testing.

General-101 commented 5 years ago

Confirmed to be tag related in some way. Cause unknown at the moment.

General-101 commented 5 years ago

Related to the ugh! tag in some way I think.