8000 sqf::create_unit invoker_lock crash · Issue #207 · intercept/intercept · GitHub
[go: up one dir, main page]

Skip to content

sqf::create_unit invoker_lock crash #207

@0dr

Description

@0dr

branch: master
self compiled dlls
inside custom plugin
tested on: profiling / performance

When creating multiple units in a tight loop, I've experience weird ass random crashes (access violation) in the invoker_lock.

this crashes the game :

	auto group = intercept::sqf::create_group(intercept::sqf::west());
	for (int i = 0; i < 10; i++) {
		intercept::sqf::create_unit(group, "B_Soldier_GL_F", intercept::sqf::get_pos(intercept::sqf::player()));
	}

while this does not :

	auto group = intercept::sqf::create_group(intercept::sqf::west());
	for (int i = 0; i < 10; i++) {
		intercept::sqf::create_unit(group, "B_Soldier_GL_F", intercept::sqf::get_pos(intercept::sqf::player()), {}, 20.f);
	}

(Both as custom sqf command called from ingame so no intercept::client::invoker_lock)

apparently if one tries to create multiple units too close to one another something fails hard.

Exception thrown at 0x0000000000000000 in arma3_x64.exe: 0xC0000005: Access violation executing location 0x0000000000000000.

(invoker.cpp)
(261)..
    game_value invoker::invoke_raw_nolock(binary_function function_, const game_value &left_arg_, const game_value &right_arg_) noexcept {
        volatile uintptr_t arr[64];//artifical stackpushing
        arr[13] = 5;
        return function_(invoker::sqf_game_state, left_arg_, right_arg_); //<---- crash on return
    }
(265)..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0