Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1029611 // findDeadlockReasonsInStackTracesFile

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3418L/22K).

svoid findDeadlockReasonsInStackTracesFile(File f) {
  LS traces = splitAtEmptyLines(loadTextFile(f));
  S sub = "java.awt.EventQueue";
  LS traces2 = containing(traces, sub);
  print(n2(traces2, "thread") + " with AWT activity.\n");
  
  // put stack trace with most activity within AWT thread first
  // (most likely culprit)
  sortInPlaceByCalculatedFieldDesc(traces2, t -> indexOfLineContaining(t, sub));
    
  print(joinWithEmptyLines(traces2));
}

svoid findDeadlockReasonsInStackTracesFile() {
  File f = latestFileIn(stefansOS_watchDogStackTracesDir());
  if (f == null) ret with print("No watch dog straces found.");
  print(f);
  findDeadlockReasonsInStackTracesFile(f);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029611
Snippet name: findDeadlockReasonsInStackTracesFile
Eternal ID of this version: #1029611/4
Text MD5: d778bd4a0e408d719213389731a7cd59
Transpilation MD5: 430c1450b21fe26f60ecd00d66babe67
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-27 17:29:33
Source code size: 701 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 125 / 198
Version history: 3 change(s)
Referenced in: [show references]