Problem with H2Core...

xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Problem with H2Core...

Post by xXF3RcHoXx »

Hello my fellow remnants, I have an issue that is driving me nuts.

I installed WinXP x86 on a virtual machine just to mod and use H2ST and H2Core.

Everything works nicely as I get consistent rebuilds buuuuut, then here comes the issue:

While rebuilding, most of the time I get an System.OutOFMemoryException, which makes sense, "I ran out of memory", but I ask... how?

I assigned 4 GB RAM (3.5 useable) to my virtual machine, and I sincerely don't understand why I ran out of memory, back in the day I used a 512 MB of RAM computer to rebuild maps (circa 2008) and I never got that exception (yeah, 1 hour rebuilding and super-laggy PC afterwards FTW, but worked)

(Pd. the "consistent rebuilds" I get are actually just the clean map decompiled and rebuilt afterwards, so no extra data added and rebuilding takes around 1 minute or 2)

So what would be the solution? install x64 OS and assing more memory? My laptop has 8 GB.

Also, H2Core apparently works correctly on Win8 x64, but the sanddock controls glitch a lot since I cannot disable desktop composition and it takes usually 1-2 minutes just to open the menu.
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Problem with H2Core...

Post by JacksonCougar »

h2core was terrible with memory management...which for a managed application is kind of funny
xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Re: Problem with H2Core...

Post by xXF3RcHoXx »

So what I could do? :c

Btw, I watched in tskmgr and I noticed H2Core is taking around 1.5 GB of memory right when the unhandled exception occurs... maybe it cannot use more than that, and it worked earlier because my ol' 512-MB-RAM pc would never have that issue?

Fact: to rebuild my mod "Deep Freeze", I had to boot up in safe mode, in Windows XP, in another laptop I had (which only had 3 GB RAM but had XP installed on dual boot)
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Problem with H2Core...

Post by JacksonCougar »

I don't know... I'd need to debug it while it throws the error...
if you have source and a map that I can replicate the error on I'm willing to give it a shot at fixing it
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Problem with H2Core...

Post by Click16 »

I would love to finish my map builder. It really doesn't appear hard to do, but the map file consistently throws things at you that you have to worry about. Sorry about your frustration with H2Core I wish there was a stable/finished alternative.
Image
xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Re: Problem with H2Core...

Post by xXF3RcHoXx »

JacksonCougar wrote:I don't know... I'd need to debug it while it throws the error...
if you have source and a map that I can replicate the error on I'm willing to give it a shot at fixing it
You can do this to replicate:

Decompile deltaapproach
Decompile headlong
open both scenarios in H2Guerilla
transfer biped palette, weapon palette, vehicle palette, characters and change headlong's BSP to deltaapproach_bsp00 (you're really adding a lot of info to the map)
Rebuild in H2core checking really any box and also checking "Keep existing spawns"

It will start processing all the tags, no problem, after processing "global_speaking_chorus", it will start to write "internal model type1/type2 raw"

Seconds after, it will throw the exception.

Sometimes it actually gets to the "Compiling" part and then comes the exception.

H2Core will be using around 1.5 GB of memory at this point.

Thats exactly what I did while doing random rebuilds to test my virtual machine and it's modding consistency.

If succeed, the map file will be around 95 MB
Last edited by xXF3RcHoXx on Thu Apr 09, 2015 4:30 am, edited 3 times in total.
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Re: Problem with H2Core...

Post by xXF3RcHoXx »

JacksonCougar wrote:I don't know... I'd need to debug it while it throws the error...
if you have source and a map that I can replicate the error on I'm willing to give it a shot at fixing it
Plus, after having the decompiled files, you can rebuild as much times as you want and you will get the same error at the same point.

Afterwards, you could try to boot up in safe mode while being on 7 or XP and rebuild there, most likely it will succeed. It took me 4 attempts to rebuild Deep Freeze using this method, I just wanted to have available all the RAM i could get even though H2Core never really used more than 1.5 GB out of 3 GB available on my old laptop
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Problem with H2Core...

Post by JacksonCougar »

I took a look into the source for half a day. Apparently they were trying to track down the same bug I immediately ran into because they had strings to that tag all over the place. Somewhere between saving the file for the tag and re-reading it it changes (shrinks). My first thought is that its just a stream flush issue because they have a fucked up and pointless IO class. Didn't get very much further than that though because the code is really hard to work with
xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Re: Problem with H2Core...

Post by xXF3RcHoXx »

JacksonCougar wrote:I took a look into the source for half a day. Apparently they were trying to track down the same bug I immediately ran into because they had strings to that tag all over the place. Somewhere between saving the file for the tag and re-reading it it changes (shrinks). My first thought is that its just a stream flush issue because they have a fucked up and pointless IO class. Didn't get very much further than that though because the code is really hard to work with
Did you looked at 4-2-7 source? I noticed there is 3-7-7 source available to download but I haven't seen 4-2-7 anywhere.
So, what could I do? install x64 OS on Virtual Machine and assing more RAM?
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Problem with H2Core...

Post by XZodia »

What is it your trying to do anyway? Maybe you could use Mystery instead?
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Re: Problem with H2Core...

Post by xXF3RcHoXx »

XZodia wrote:What is it your trying to do anyway? Maybe you could use Mystery instead?
Yeah I was thinking about that, the thing is I want to mostly rebuild a map with coagulation's BSP and AI added, not much of campaign bsp conversions, I've used mistery a bunch of times and it has worked alright, sometimes map froze, and announcers voice gets randomly pitch shifted :v

But, mostly, I just want to have a "general" or "standarized" method of rebuilding maps which works most of time, that's the reason I do a lot of attemps with several different setups, OS, VM, etc, since I'm not good enough of a "programmer" to make my own rebuilder lol, I have only learned the basics of C language
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Problem with H2Core...

Post by XZodia »

If you want to add AI, you don't need to rebuild, you just need to add the relevant data to the scnr. You can do this by extracting the scnr from a single player map and using Simplicity to remove all the unnecessary data. Then use entity to add your ai scnr to your multiplayer map, and redirect the ai reflexives in the mp scnr to the ai scnr. (I know that sounds complicated but its fairly easy to do, especially since troy added this ability to entity)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Problem with H2Core...

Post by Grimdoomer »

XZodia wrote:If you want to add AI, you don't need to rebuild, you just need to add the relevant data to the scnr. You can do this by extracting the scnr from a single player map and using Simplicity to remove all the unnecessary data. Then use entity to add your ai scnr to your multiplayer map, and redirect the ai reflexives in the mp scnr to the ai scnr. (I know that sounds complicated but its fairly easy to do, especially since troy added this ability to entity)
If he wants them to move around other than jmad swaps he will need to add a tag_block to coagulation's BSP.
Don't snort the magic, we need it for the network.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Problem with H2Core...

Post by XZodia »

Grimdoomer wrote:
XZodia wrote:If you want to add AI, you don't need to rebuild, you just need to add the relevant data to the scnr. You can do this by extracting the scnr from a single player map and using Simplicity to remove all the unnecessary data. Then use entity to add your ai scnr to your multiplayer map, and redirect the ai reflexives in the mp scnr to the ai scnr. (I know that sounds complicated but its fairly easy to do, especially since troy added this ability to entity)
If he wants them to move around other than jmad swaps he will need to add a tag_block to coagulation's BSP.
I see. Well meh.
Someone write a chunk adder for the bsp =P
It could just steal space from the Japanese strings....
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Problem with H2Core...

Post by JacksonCougar »

A huge part of the problem with h2cores unreliability stems from them closing and reopening the streams all over the fucking place. Like literally all over the fucking place. And then they break OO design all over the place too which makes tracking down any bugs really hard. And truth be told those internal layouts look really questionable (ugh! sbsp, etc...).
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Problem with H2Core...

Post by Click16 »

Without reliable plugins for handling padded reflexives, the idea of expanding or shrinking SBSP or LTMP is not something I would want to do. I just started getting back into H2 programming, so maybe I'll try to throw something together

These are all the types I have hard-coded:
Image
Image
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Problem with H2Core...

Post by JacksonCougar »

You can generate cs classes from guerilla.exe with moonfish if you need that kind of thing.
xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Re: Problem with H2Core...

Post by xXF3RcHoXx »

Click16 wrote:Without reliable plugins for handling padded reflexives, the idea of expanding or shrinking SBSP or LTMP is not something I would want to do. I just started getting back into H2 programming, so maybe I'll try to throw something together

These are all the types I have hard-coded:
Image
What sounded really promising was your meta rebuilder :3
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Problem with H2Core...

Post by Grimdoomer »

XZodia wrote:
Grimdoomer wrote:
XZodia wrote:If you want to add AI, you don't need to rebuild, you just need to add the relevant data to the scnr. You can do this by extracting the scnr from a single player map and using Simplicity to remove all the unnecessary data. Then use entity to add your ai scnr to your multiplayer map, and redirect the ai reflexives in the mp scnr to the ai scnr. (I know that sounds complicated but its fairly easy to do, especially since troy added this ability to entity)
If he wants them to move around other than jmad swaps he will need to add a tag_block to coagulation's BSP.
I see. Well meh.
Someone write a chunk adder for the bsp =P
It could just steal space from the Japanese strings....
No it can't, the tag_block data for the bsp and lightmap tags HAVE to be inside the tag. When they are loaded into memory it is done on a "goto offset and read size" basis. If the tag_block data is not inside the bsp meta block then it's not getting copied into ram and the game will freeze.
Don't snort the magic, we need it for the network.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Problem with H2Core...

Post by XZodia »

Grimdoomer wrote:
XZodia wrote:
Grimdoomer wrote:
XZodia wrote:If you want to add AI, you don't need to rebuild, you just need to add the relevant data to the scnr. You can do this by extracting the scnr from a single player map and using Simplicity to remove all the unnecessary data. Then use entity to add your ai scnr to your multiplayer map, and redirect the ai reflexives in the mp scnr to the ai scnr. (I know that sounds complicated but its fairly easy to do, especially since troy added this ability to entity)
If he wants them to move around other than jmad swaps he will need to add a tag_block to coagulation's BSP.
I see. Well meh.
Someone write a chunk adder for the bsp =P
It could just steal space from the Japanese strings....
No it can't, the tag_block data for the bsp and lightmap tags HAVE to be inside the tag. When they are loaded into memory it is done on a "goto offset and read size" basis. If the tag_block data is not inside the bsp meta block then it's not getting copied into ram and the game will freeze.
I meant rather than rather than shifting everything after the strings, you'd only have to shift the data between the bsp and the strings, which should mean you can avoid too much padding nonsense... as only a small number of things are then effected. Similarly, I reckon all of the 'crazy' strings junk could be removed.
I assume its just bsp meta that needs to be added? no raw?
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Problem with H2Core...

Post by Click16 »

Wrote a few extension methods for the Abide_AddOn_API.Halo_2.Halo2Map Class...
Image

Image

Ingame:
Image

Seems like the map file is alright that there is a gaping 5 MiB hole in between the BSP/LTMP Meta and the Strings128 table...

EDIT: OK, never mind. Noticed my character's leg's bitmap data is really screwed up, also after flying around a bit using the Flycam in Yelo, it froze...

EDIT Again:
Allocating 5 MiB to all defined sections...
Image

Looks like an absolute mess in UAT:
Image

But the map loads fine, no freezing...
Image
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Problem with H2Core...

Post by JacksonCougar »

Why did you do that though?
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Problem with H2Core...

Post by Click16 »

JacksonCougar wrote:Why did you do that though?
To see if I can,

Plus, getting AI wouldn't require H2C and H2G. If I can get that AI Pathfinding tag block from a SP map into an MP SBSP, while retarded, the AI will respond.
Image
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Problem with H2Core...

Post by XZodia »

UAT looks correct to me? (ie not a mess)

I assume you must be fixing all the raw pointers for that to work right?
Bitmap corruption could be a padding or LOD issue I think...have you corrected all of the bitmap pointers (i think there is 3? one for each mip map)

@jackson if he can successfully add space to all the tables, he can make a tag builder or sbsp chunk adder.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Problem with H2Core...

Post by JacksonCougar »

Yea, its a start
Post Reply