Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on CBA_fnc_execNextFrame and map close #1208

Closed
Madin5 opened this issue Aug 17, 2019 · 10 comments · Fixed by #1209
Closed

crash on CBA_fnc_execNextFrame and map close #1208

Madin5 opened this issue Aug 17, 2019 · 10 comments · Fixed by #1209
Labels
Milestone

Comments

@Madin5
Copy link

Madin5 commented Aug 17, 2019

Arma 3 Version: 1.94.145977 stable
CBA Version: 3.12.1 stable (steam workshop)

Mods:

- CBA_A3

Description:
Arma crash every time when CBA_fnc_execNextFrame is used in loop on map close event.

Steps to reproduce:

systemChatfnc = {
    systemChat str time;
    [
        {
            if (testFnc) then {
                call systemChatfnc
            };
        },
        []
    ]call CBA_fnc_execNextFrame;
};
testFnc = true;
call systemChatfnc;

open and close map. Just before map close, arma will crash.

Where did the issue occur?
Editor (Singleplayer) / Editor (Multiplayer) (only here tested)

RPT log file:
unnecessary, nothing valuable is there, as the arma crashes completely. Tested on 2 PC.
edit:
rpt and mdmp file:
https://github.com/CBATeam/CBA_A3/files/3511987/Arma.3.zip

@dedmen
Copy link
Contributor

dedmen commented Aug 17, 2019

unnecessary, nothing valuable is there, as the arma crashes completely.

Don't think you know what's necessary and what isn't.
Need crash report. rpt,mdmp,bidmp.

@Madin5
Copy link
Author

Madin5 commented Aug 17, 2019

ok, here you go.
I didn't have pc at the moment, so i posted it without it. Also, it's easy to reproduce with provided steps so anyone can do it as wished.

After i test it right now to generate rpt and leave game for a while, i got popup "too many virtual blocks requested" with 51mb+ mdmp. Before i just killed app when it freezes.
Arma 3.zip

@dedmen
Copy link
Contributor

dedmen commented Aug 17, 2019

Too many virtual memory blocks requested

Is that the one you are always getting?
That would have been valuable info.

@PabstMirror
Copy link
Contributor

I'm reproducing and it's something to do with skipped frames

@PabstMirror
Copy link
Contributor

PabstMirror commented Aug 17, 2019

When closing the map, eachFrame skips a frame, which breaks execNext frame
We just keep adding to the array, while in the middle of iterating through it
edit: This also means pfeh/waitAndExec are skipping a frame as well,
but probably not a big deal
there also is a chance this would be an issue when loading saved games

[10303 - 10303] loop start nextFrameBufferA // diag_frameno - GVAR(nextFrameNo)
[10303 - true] execNextFrame running        // diag_frameno - mapVis
[10303 - true] systemChatfnc running
[10303 - 10303] adding to nextFrameBufferB
[10303 - 10303] loop end nextFrameBufferA
[10304 - 10304] loop start nextFrameBufferA
[10304 - true] execNextFrame running
[10304 - true] systemChatfnc running
[10304 - 10304] adding to nextFrameBufferB
[10304 - 10304] loop end nextFrameBufferA
"bad frames!!!" // we missed 10305 when closing map
[10306 - 10305] loop start nextFrameBufferA  // no loop end to this
[10306 - true] execNextFrame running
[10306 - true] systemChatfnc running
[10306 - 10305] adding to nextFrameBufferA
[10306 - true] execNextFrame running
[10306 - true] systemChatfnc running
[10306 - 10305] adding to nextFrameBufferA
[10306 - true] execNextFrame running
[10306 - true] systemChatfnc running
[10306 - 10305] adding to nextFrameBufferA

@Madin5
Copy link
Author

Madin5 commented Aug 17, 2019

"Is that the one you are always getting?" Im not at my pc right now, but yesterday i saw this info couple of times. As i often alt tab game, i didn't connect these two.

But i think PabstMirror found problem by now.

@commy2
Copy link
Contributor

commy2 commented Aug 19, 2019

When closing the map, eachFrame skips a frame, which breaks execNext frame

Does this frame skipping happen with vanilla? It may be some script using removeMissionEventHandler EachFrame from an EachFrame event.

@commy2 commy2 added this to the 3.13 milestone Aug 19, 2019
@Madin5
Copy link
Author

Madin5 commented Aug 19, 2019

Happens even with only CBA, i posted RPT.

You can test it yourself, it's literally ctrl + C ctrl + V one command 😛

@commy2
Copy link
Contributor

commy2 commented Aug 19, 2019

Well, it crashes on a mission called ai_modules and it is not clear that there are no scripts inside that mission, for example ones like the one I described.

@Madin5
Copy link
Author

Madin5 commented Aug 19, 2019

I was testing mod on ai_modules, found out that it crashes on map close. I tried to find where i made some error, strip down every line to literally just empty loop, still crash. Then i open vanilla only with CBA, paste simple loop like in Steps to reproduce aaaand here we are now.

Mission was empty, just one player after i delete everything in pursuit to find this bug.

@commy2 commy2 modified the milestones: 3.13, 3.12.2 Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants