Code Monkey home page Code Monkey logo

Comments (12)

koekeishiya avatar koekeishiya commented on August 26, 2024

Can you compile a debug version and just run it in a terminal. The debug output generated by yabai itself may be enough to locate a potential bug, or at least help narrowing the search space.

To create a debug version simply clone the repo and run make. To run with debug output, launch as follows: yabai --verbose. When it crashes, simply copy and paste the last debug prints into this issue.

from yabai.

capaldo avatar capaldo commented on August 26, 2024

When I try to compile I get this output:

rm -rf ./bin
mkdir -p ./bin
clang src/manifest.m -std=c99 -Wall -g -O0 -fvisibility=hidden -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge -framework IOKit -o bin/yabai
src/manifest.m:1:10: fatal error: 'ScriptingBridge/ScriptingBridge.h' file not found
#include <ScriptingBridge/ScriptingBridge.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [bin/yabai] Error 1

from yabai.

dominiklohmann avatar dominiklohmann commented on August 26, 2024

Is ScriptingBridge.framework not available at either /System/Library/Frameworks/ or $(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ on your computer?

Do you have any paths or flags for clang or make set in your shell configuration that could affect the compilation?

Also I still don't quite understand—maybe you can clarify—are you saying that yabai does not crash when run through a debugger? Because if it crashes with the debugger attached you should be able to get a backtrace from it.

from yabai.

capaldo avatar capaldo commented on August 26, 2024

Is ScriptingBridge.framework not available at either /System/Library/Frameworks/ or $(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ on your computer?

Do you have any paths or flags for clang or make set in your shell configuration that could affect the compilation?

Also I still don't quite understand—maybe you can clarify—are you saying that yabai does not crash when run through a debugger? Because if it crashes with the debugger attached you should be able to get a backtrace from it.

I fixed it by running sudo xcode-select --reset.

Got this error running initially:
unknown value 'on' given to command 'focus_follows_mouse' for domain 'config'

from yabai.

capaldo avatar capaldo commented on August 26, 2024

Closed the issue on accident.

from yabai.

capaldo avatar capaldo commented on August 26, 2024

So same issue. Nothing prints out. All that happens is that window stop focusing and output stops printing.

from yabai.

capaldo avatar capaldo commented on August 26, 2024

Got this printing out under system reports:

Date/Time:       2019-06-21 21:21:58 -0400
End time:        2019-06-21 21:23:26 -0400
OS Version:      Mac OS X 10.14.5 (Build 18F132)
Architecture:    x86_64h
Report Version:  28
Incident Identifier: 98C8ABD8-682D-4AAE-AED4-2837CF0630A3

Data Source:     Microstackshots
Shared Cache:    0xdfa6000 A566A46C-9472-3581-9C9E-8D1DC81BF065

Command:         yabai
Path:            /usr/local/Cellar/yabai/HEAD-05c3f29/bin/yabai
Version:         ??? (???)
PID:             25048

Event:           cpu usage
Action taken:    none
CPU:             90 seconds cpu time over 93 seconds (96% cpu average), exceeding limit of 50% cpu over 180 seconds
CPU limit:       90s
Limit duration:  180s
CPU used:        90s
Duration:        88.41s
Steps:           36

Hardware model:  MacBookPro14,2
Active cpus:     4

Fan speed:       2611 rpm

Heaviest stack for the target process:
  20  start + 1 (libdyld.dylib + 91093) [0x7fff657d63d5]
  20  ??? (yabai + 140058) [0x104c3a31a]
  20  CFRunLoopRun + 40 (CoreFoundation + 239314) [0x7fff398a16d2]
  20  CFRunLoopRunSpecific + 455 (CoreFoundation + 239806) [0x7fff398a18be]
  20  __CFRunLoopRun + 2524 (CoreFoundation + 242924) [0x7fff398a24ec]
  20  __CFRunLoopDoSource1 + 527 (CoreFoundation + 341237) [0x7fff398ba4f5]
  20  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41 (CoreFoundation + 341399) [0x7fff398ba597]
  20  __CFMachPortPerform + 246 (CoreFoundation + 341657) [0x7fff398ba699]
  20  eventTapMessageHandler(__CFMachPort*, void*, long, void*) + 132 (SkyLight + 1207393) [0x7fff5eb0cc61]
  20  _XPostEventTapData + 277 (SkyLight + 160816) [0x7fff5ea0d430]
  20  processEventTapData(void*, unsigned int, unsigned int, unsigned int, unsigned char*, unsigned int) + 631 (SkyLight + 1208118) [0x7fff5eb0cf36]
  19  ??? (yabai + 142000) [0x104c3aab0]


Powerstats for:  yabai [25048] [unique pid 622685]
UUID:            9DA20FCD-ACC4-33C9-A33E-31D0CAE42E36
Path:            /usr/local/Cellar/yabai/HEAD-05c3f29/bin/yabai
Architecture:    x86_64
Parent:          UNKNOWN [1]
UID:             501
Footprint:       3892 KB
Start time:      2019-06-21 21:21:58 -0400
End time:        2019-06-21 21:23:26 -0400
Num samples:     36 (100%)
CPU Time:        166.493s
Note:            Unresponsive
Primary state:   19 samples Non-Frontmost App, Non-Suppressed, User mode, Effective Thread QoS Utility, Requested Thread QoS Utility, Override Thread QoS Unspecified
User Activity:   0 samples Idle, 36 samples Active
Power Source:    0 samples on Battery, 36 samples on AC
  20  start + 1 (libdyld.dylib + 91093) [0x7fff657d63d5]
    20  ??? (yabai + 140058) [0x104c3a31a]
      20  CFRunLoopRun + 40 (CoreFoundation + 239314) [0x7fff398a16d2]
        20  CFRunLoopRunSpecific + 455 (CoreFoundation + 239806) [0x7fff398a18be]
          20  __CFRunLoopRun + 2524 (CoreFoundation + 242924) [0x7fff398a24ec]
            20  __CFRunLoopDoSource1 + 527 (CoreFoundation + 341237) [0x7fff398ba4f5]
              20  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41 (CoreFoundation + 341399) [0x7fff398ba597]
                20  __CFMachPortPerform + 246 (CoreFoundation + 341657) [0x7fff398ba699]
                  20  eventTapMessageHandler(__CFMachPort*, void*, long, void*) + 132 (SkyLight + 1207393) [0x7fff5eb0cc61]
                    20  _XPostEventTapData + 277 (SkyLight + 160816) [0x7fff5ea0d430]
                      20  processEventTapData(void*, unsigned int, unsigned int, unsigned int, unsigned char*, unsigned int) + 631 (SkyLight + 1208118) [0x7fff5eb0cf36]
                        19  ??? (yabai + 142000) [0x104c3aab0]
                          1   <Kernel mode>
                        1   ??? (yabai + 142004) [0x104c3aab4]
  16  thread_start + 13 (libsystem_pthread.dylib + 9229) [0x7fff659c940d]
    16  _pthread_start + 66 (libsystem_pthread.dylib + 25161) [0x7fff659cd249]
      16  _pthread_body + 126 (libsystem_pthread.dylib + 13035) [0x7fff659ca2eb]
        16  ??? (yabai + 24175) [0x104c1de6f]
          13  ??? (yabai + 140896) [0x104c3a660]
            13  <Requested Thread QoS Default>
          3   ??? (yabai + 140900) [0x104c3a664]
            3   <Requested Thread QoS Default>

  Binary Images:
           0x104c18000 -                ???  yabai                                  <9DA20FCD-ACC4-33C9-A33E-31D0CAE42E36>  /usr/local/Cellar/yabai/HEAD-05c3f29/bin/yabai
        0x7fff39867000 -     0x7fff39cabfff  com.apple.CoreFoundation 6.9 (1575.12) <64C38BF2-1869-33C8-B1B6-DCA9C824C0E4>  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
        0x7fff5e9e6000 -     0x7fff5ec94fff  com.apple.SkyLight 1.600.0 (340.26)    <CD2A7069-6CEA-3737-9E9D-7AE2FED912AB>  /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
        0x7fff657c0000 -     0x7fff657ecfff  libdyld.dylib (655.1.1)                <002418CC-AD11-3D10-865B-015591D24E6C>  /usr/lib/system/libdyld.dylib
        0x7fff659c7000 -     0x7fff659d1fff  libsystem_pthread.dylib (330.250.2)    <2D5C08FF-484F-3D59-9132-CE1DCB3F76D7>  /usr/lib/system/libsystem_pthread.dylib

from yabai.

koekeishiya avatar koekeishiya commented on August 26, 2024

That crash report doesn't really contain much useful information. The best advice I can give is what I said in my post above.

Edit:

So same issue. Nothing prints out. All that happens is that window stop focusing and output stops printing.

If running yabai --verbose prints nothing at all when ran in a terminal, there has to be something going on with your system, and not a problem with yabai itself.

from yabai.

capaldo avatar capaldo commented on August 26, 2024
Jun 22 12:02:25 com.apple.xpc.launchd[1] (homebrew.mxcl.yabai): This service is defined to be constantly running and is inherently inefficient.
Jun 22 12:53:53 com.apple.xpc.launchd[1] (homebrew.mxcl.yabai[1207]): Service exited due to SIGTERM | sent by loginwindow[95]

Found the culprit now I have to figure out what exactly is happening that triggers this.

from yabai.

dominiklohmann avatar dominiklohmann commented on August 26, 2024

This service is defined to be constantly running and is inherently inefficient.

This means that the process spawned by the launch agent has both the key KeepAlive set and is crashing frequently, thus draining resources. launchd has a heuristic that disables these launch agents.

homebrew.mxcl.yabai is the launch agent spawned by brew services start yabai. Run brew services stop yabai to disable it, and then run yabai --verbose from the command line as explained above.

from yabai.

capaldo avatar capaldo commented on August 26, 2024

So I found the issue (I think). I haven't had any issues for about 2 hours.

Its due to running a script to grab the desktops/windows.

from yabai.

capaldo avatar capaldo commented on August 26, 2024

Thank you for your guys' help as usual.

from yabai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.