• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

strqfzd911

Second Lieutenant
Nov 25, 2021
176
484

Integrity​

I have verified my game files (on Steam)​

Yes

I have disabled all mods​

Yes

Required​

Summary​

Reproducable Crash

Description​

If you try to loop through two or more random arrays at the same time for more than 100 loops it will cause a CTD.

Each loop, the maghreb_region array throws this error log:
Code:
effectimplementation.cpp:5348: Script error! Script Object Token: "add_base_tax", Error: Effect condition set on the wrong scope: Scope.GetProvince() Gain §G1§W Base Tax in §YProvince(s)§W.

Even though the error log complains about the scope being "incorrect", it still applies the tax development to the provinces correctly. I should note that if we loop only through iberia_region the game will not crash regardless of the number of loops, however adding anymore regions to loop through at the same time will crash the game. Maybe it's trying to multi-thread the tasks and conflicting, causing a crash? Or maybe it's throwing too many error logs and hitting some kind of cap? Just wild guesses.

Steps to reproduce​

Execute the following code in a run file and it will crash the game:

Code:
set_variable = {
    which = testvar
    value = 101 # loop more than 100 times
}
while = {
    limit = {
        check_variable = {
            which = testvar
            value = 1
        }
    }
    subtract_variable = {
        which = testvar
        value = 1
    }

    iberia_region = { # If we loop through iberia only it will not crash.
        type = random
        amount = 1
        add_base_tax = 1
    }
    maghreb_region = { # Issues start when looping through maghreb at the same time.
        type = random
        amount = 1
        add_base_tax = 1
    }
}

Game Version​

1.36.2

OS​

Linux Ubuntu

Additional​

Bug Type​

  • Crash to Desktop

Attachments​

View attachment exception.txt

Screenshot​



 
Last edited: