Opened 16 months ago

Last modified 12 months ago

#6699 new defect

[macOS] Memory issue with 27412 — at Version 7

Reported by: Langbart Owned by:
Priority: Must Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Langbart)

to consistently reproduce (1)

  • add this debug message in chatHelper.js
  • binaries/data/mods/public/simulation/ai/petra/chatHelper.js

    a b PETRA.chatNewDiplomacy = function(gameState, player, newDiplomaticStance)  
    220220
    221221PETRA.chatAnswerRequestDiplomacy = function(gameState, player, requestType, response, requiredTribute)
    222222{
     223    warn(uneval(['debug', gameState, player, requestType, response, requiredTribute]))
    223224    Engine.PostCommand(PlayerID, {
    224225        "type": "aichat",
    225226        "message": "/msg " + gameState.sharedScript.playersData[player].name + " " +
  • start the attached replay from ticket #6654 (~2mins long)
  • the game freezes at the 97th turn
  • forcefully quit the pyrogenesis app
  • check activity monitor for spindump
    • For the case described above, the process is always called spindump to allocate large amounts of memory, but the process can also be called sandboxed or ReportCrash in other situations.

to consistently reproduce (2)

  • pass this to the terminal and run
    pyrogenesis -replay-visual="/Users/paria\ crash"
    
  • the game crashes with the following message

  • check activity monitor for ReportCrash
    • same as above with spindump, if I don`t stop the process manually, the PC becomes unusable with time

bisect

  • conflicting test results, could still have been due to spidermonkey
  • reproducing the steps with the released A26 version did not show any problems, so the problem must be with macOS or somewhere in the development cycle of A27

[27412]

  • with [27411] the game would also freeze, but once I would forcefully close pyrogenesis no extra process would be eating up my memory
    • screenshot below is from the terminal after I forcefully closed pyrogenesis on [27411]

related ticket

Change History (10)

by Langbart, 16 months ago

Attachment: terminal.png added

comment:1 by Stan, 16 months ago

In your case it's printing the game state thousands of times that crashes the game. Is it just a way to make it faster? Can't be vulkan if it happened before. So it's Spidermonley most likely but it's probably cause we're doing something it does not like

in reply to:  1 comment:2 by Langbart, 16 months ago

Replying to Stan‘:

In your case it's printing the game state thousands of times that crashes the game. Is it just a way to make it faster? Can't be vulkan if it happened before. So it's Spidermonley most likely but it's probably cause we're doing something it does not like

the issue is not about the lldb (ignore that), it about an external processing spinning up called spindump.

comment:3 by wraitii, 16 months ago

@langbart -> Did this happen to you in regular play? Or just when adding some debugs?

comment:4 by Stan, 16 months ago

spindump and sandboxd are macOS diagnostic applications apparently.

Last edited 16 months ago by Stan (previous) (diff)

in reply to:  3 comment:5 by Langbart, 16 months ago

Replying to wraitii:

@langbart -> Did this happen to you in regular play? Or just when adding some debugs?

  • I have also noticed it in a regular game but have not found consistently reproducible steps.

comment:6 by Langbart, 16 months ago

Description: modified (diff)

The description was extended by another possibility to reproduce the problem consistently.

by Langbart, 16 months ago

Attachment: term_report.png added

by Langbart, 16 months ago

Attachment: ReportCrash.png added

comment:7 by Langbart, 16 months ago

Description: modified (diff)
  • Remove bisect number
    • conflicting test results, could still have been due to spidermonkey
    • reproducing the steps with the released A26 version did not show any problems, so the problem must be with macOS or somewhere in the development cycle of A27
  • lldb has been removed as it is not needed for the problem.
  • Reproduction steps remain valid
Note: See TracTickets for help on using tickets.