UPDATE: It turns out that, firstly, the utility only works with individual scenarios, not with Campaigns. Secondly, when I exported the scenarios from the Campaigns and tried to extract scripts from each map separately, it gave me a ton of strange errors, mostly of the form "command not found + a bunch of unreadable characters," and at some point, it crashed. As for the maps themselves, the first one does have some questionable scripts, but the second one has no scripts at all. Both maps open normally in the editor and in the game. Also, the first map was previously successfully processed in H4Util (there were warnings somewhere, but the result was normal). So, the problem is not in the scripts themselves (at least, not only in them). What else could it be?
UPDATE 2: The problem was solved by re-downloading H4Util from a different website. It was simply missing one file, and because of this, when there were certain objects on the map, it apparently went into an infinite loop/recursion, consumed all the memory, and crashed. Unfortunately, I don't remember where I got the bad version, but I know that the version from here http://www.celestialheavens.com/viewpage.php?id=157 is good.