Artikash / Textractor

Extracts text from video games and visual novels. Highly extensible.
GNU General Public License v3.0
2.09k stars 203 forks source link

100% CPU load by Textractor in new Aokana release #231

Closed Mars132 closed 4 years ago

Mars132 commented 4 years ago

https://vndb.org/r59201 using Textractor v4.7.0

The fresh steam release of Aokana doesn't work well with Textractor. Textractor starts hogging 100% of CPU and gives a ton of threads I couldn't even inspect, because everything froze. Would be nice if you could look into that.

P.S. the same happens to at least one more Unity game. In RJ228027 if you reach a bed scene everything goes the same pattern with 100% CPU load from Textractor. I was able to run Textractor 4.5.1 with no trouble for the same two games (threads with garbage were omnipresent, but at least I could find the needed one), so my uneducated guess is v4.6.0 might have broken it.

Also, thanks for developing Textractor, been a huge lifesaver to me so far. Was really happy when you made it auto attach to saved processes.

FabioManoel1977 commented 4 years ago

I guess those games uses the same engine, or a variant of the same engine, that I mentioned in issue #229

see the 2 videos and compare, I guess is the same game engine.

This same game engine is used in countless games, but recently it became more evident because several new games uses the same engine, and never any text hook software was able to successfully hook texts from this engine nicely without any issues, not AGTH, not ITH, not VNR or ITHVNR. I hope Artikash can finally solve this equation and make finally all those games being hooked without the need of specified H-CODES. To rely in H-CODES nowadays is a pain in the ass because very few people nowadays can make H-CODES, and the few people that can make H-CODES are not interested in waste time making codes for those games... I play hentai games long 15 years and I have several games that uses this engine and I am always begging for people make hcode for those games and no one cares to make... And I am too lazy ( or too dumb ) to learn japanese language or learn how make those hcodes...

But, you have luck, Mars132, since someone already makes a h-code for your game: /HS8:20@3B280:蒼の彼方のフォーリズムPerfect Edition.exe

But I hope that besides it Artikash really try to study this game engine and makes it compatible with textractore, still several games using same game engine without a hcode... I have not the same luck of Mars132, no one cares to make hcode for the games that I want to play...

scese250 commented 4 years ago

But, you have luck, Mars132, since someone already makes a h-code for your game: /HS8:20@3B280:蒼の彼方のフォーリズムPerfect Edition.exe

That Hcode is for japanese release, this is a port made on Unity by Nekonyan.

I can capture the text but it has garbage and with the fitler it's readable

Artikash commented 4 years ago

Should be fixed in 4.7.1.

Mars132 commented 4 years ago

4.7.1 worked well, 4.7.2 overloads CPU and crashes Aokana on Unity.

Artikash commented 4 years ago

Cannot reproduce, but I have a guess for what's going on. Please try replacing your texthook.dll with this and lmk if it's fixed. texthook.zip

Mars132 commented 4 years ago

Replaced, looks good so far.

scese250 commented 4 years ago

The reason you're getting overloads CPU and crashes is because there's so many thread that the extensions like "Remove repeated X" hang out the game, at least that what happend to me.

Artikash commented 4 years ago

Try 4.7.3. It uses mostly the same code as the texthook.dll I attached above, but not exactly so it might be broken again.

Mars132 commented 4 years ago

The result is quite identical, seems like it works.

The small gripe is that I can only attach after loading a save, otherwise it triggers 12-60% of permanent ghost CPU load from Textractor. Loading an another save after successfully attaching brings the same ghost load, as if attached too early. Not a dealbreaker for me, just keeping informed.

Thanks.

Artikash commented 4 years ago

The CPU load is probably from the 'Remove Repeated Phrases' extension since it's quite computationally difficult to detect which phrases are repeated (formally, O(n^2)). Maybe remove that extension while playing Aokana.