MacOS Catalina Build Issues

I figured I’d move this out of GitHub issue #3791 since it’s not really related to it.

I’ve tried dozens of rebuilds since upgrading to MacOS Catalina and none of them seem to make any difference. https://bugzilla.mozilla.org/show_bug.cgi?id=1562684 looked like a promising lead, but in the end it still wound up with the same issue:

$ bk run
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Obtaining the module object from Python failed.

Traceback (most recent call last):
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/server/__init__.py", line 40, in <module>
    from policy import DefaultPolicy
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/server/policy.py", line 39, in <module>
    from xpcom import xpcom_consts, _xpcom, client, nsError, logger
<type 'exceptions.SystemError'>: dynamic module not initialized properly
Creating an interface object to be used as a result failed

Traceback (most recent call last):
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/client/__init__.py", line 50, in <module>
    from xpcom import xpt, COMException, nsError, logger
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/xpt.py", line 72, in <module>
    import xpcom._xpcom
<type 'exceptions.SystemError'>: dynamic module not initialized properly
Failed to load the Python module: '/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/components/koConsoleLogger.py'

<type 'exceptions.SystemError'>: null argument to internal routine
Creating an interface object to be used as a result failed

Traceback (most recent call last):
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/client/__init__.py", line 40, in <module>
    import os
<type 'exceptions.SystemError'>: null argument to internal routine
Failed to load the Python module: '/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/components/koInitService.py'

<type 'exceptions.SystemError'>: null argument to internal routine
JavaScript warning: resource://gre/modules/Preferences.jsm, line 381: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

The kq_init line was there without visible issue before, so I don’t think that’s related. I think the issue is with client/__init__.py and the fact that it’s in the import os call with an error of null argument to internal routine, I think it’s something to do with the Python version. I’ve tried a bunch of things to see if I can run Komodo with either the system or brew versions of python (2.7.16), but I don’t know exactly how to do that. The attempts I’ve tried have all failed. Any ideas on that? Do you think maybe the prebuilt versions need to be updated (https://github.com/Komodo/KomodoEdit/tree/master/mozilla/prebuilt/python2.7)?

Has anyone been able to build from Catalina?

Also, how does the official build get created? I run into issues all the time with the build process. Does someone need to work through all those issues or do you have an old version of MacOS that builds are created on?

@ssigwart,

Perhaps try the --python=<path> option during the Mozilla build step. That allows you to manually specify the prebuilt Python to include. I’ve never had to do that but looking through the code it looks like you’ll have to provide a path to a zipped Python install. I’d have a look at the existing one to get an idea of what the build will expect in the zip. Perhaps if you zip up the Brew install and point it there?

The official build is done on an older machine as MacOS is notorious for breaking things when they release updates. On my dev machine I wait quite a while before I upgrade and have significant spare time to focus on fixing my inevitably broken build.

Sorry I’m not able to give more time on this.

  • Carey

No problem. Thanks for the help.

I tried the --python=<path> option, but couldn’t complete the build steps. I might have been doing it wrong, but I’m not sure it’s going to make a difference because after that I tried to add my own prebuilt zip file. I got it to compiled and can tell it’s using 2.7.16, but in the end I still wound up with a similar error:

bk run
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Obtaining the module object from Python failed.

Traceback (most recent call last):
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/server/__init__.py", line 40, in <module>
    from policy import DefaultPolicy
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/server/policy.py", line 39, in <module>
    from xpcom import xpcom_consts, _xpcom, client, nsError, logger
<type 'exceptions.SystemError'>: dynamic module not initialized properly
Creating an interface object to be used as a result failed

Traceback (most recent call last):
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/client/__init__.py", line 42, in <module>
    from xpcom import xpt, COMException, nsError, logger
  File "/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/python/xpcom/xpt.py", line 72, in <module>
    import xpcom._xpcom
<type 'exceptions.SystemError'>: dynamic module not initialized properly
Failed to load the Python module: '/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/components/koConsoleLogger.py'

<type 'exceptions.SystemError'>: null argument to internal routine
Creating an interface object to be used as a result failed

<type 'exceptions.SystemError'>: null argument to internal routine
Failed to load the Python module: '/Users/ssigwart/Documents/Programming/KomodoEdit/mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/components/koInitService.py'

<type 'exceptions.SystemError'>: null argument to internal routine
JavaScript warning: resource://gre/modules/Preferences.jsm, line 381: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

@ssigwart, I had to ask the build engineering team for some eyes on this: Our Python guy asked these questions:

Do all the necessary libraries exist? Does ldd tell you anything? Are they doing anything weird with LD_LIBRARY_PATH?

For you, in place of ldd try running otool -L /path/to/xpcom/_xpcom.so. This will tell us what dynamic binaries it’s trying to load and which are missing.

I’m certain this LD_LIBRARY_PATH probably is getting messed with, I’ll have a quick look at that but I don’t it’s that unless you changed it yourself.

  • Carey

Thanks for asking around, @careyh. I’ve made a little progress based on the mozilla bug report. I had to change a number of things from symlinks to actual copies. I’ll submit patches for that once I have it working completely, but I now run into a different crash. I got a trace, but don’t have much experience with them, so I’ll need to figure out how to read this:

Crash reason:  EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
Crash address: 0xfffffffffffffffe
Process uptime: 1 seconds

Thread 0 (crashed)
 0  XUL!nsXPCComponents_Utils::EvalInSandbox(nsAString_internal const&, JS::Handle<JS::Value>, JS::Handle<JS::Value>, nsACString_internal const&, int, JSContext*, unsigned char, JS::MutableHandle<JS::Value>) [RootingAPI.h:32e36869f84a : 733 + 0x0]
    rax = 0xfffffffffffffffe   rdx = 0x00007ffee894b8c8
    rcx = 0x00007ffee894b7d0   rbx = 0x00007f852c00c8b8
    rsi = 0x00007f852c00c8b8   rdi = 0x00007f8528c9dfe0
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b770
     r8 = 0x00007f852c00c8e8    r9 = 0x0000000000000000
    r10 = 0x00007f852c00c8b8   r11 = 0x0000000000000006
    r12 = 0x0000000000000000   r13 = 0x00007f852c00c8e8
    r14 = 0x00007ffee894b8e0   r15 = 0xffffffffffffffe6
    rip = 0x000000010b730659
    Found by: given as instruction pointer in context
 1  XUL!mozilla::net::nsHttpDigestAuth::GenerateCredentials(nsIHttpAuthenticableChannel*, char const*, bool, char16_t const*, char16_t const*, char16_t const*, nsISupports**, nsISupports**, unsigned int*, char**)::hexChar + 0x4c70c
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b790
    rip = 0x000000010e4d08bc
    Found by: stack scanning
 2  XUL!bool js::gc::GCRuntime::addRoot<JS::Value>(JS::Value*, char const*, js::JSGCRootType) [jsgc.cpp:32e36869f84a : 1677 + 0x5]
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b7a0
    rip = 0x000000010d5e4ca4
    Found by: stack scanning
 3  XUL!mozilla::net::nsHttpDigestAuth::GenerateCredentials(nsIHttpAuthenticableChannel*, char const*, bool, char16_t const*, char16_t const*, char16_t const*, nsISupports**, nsISupports**, unsigned int*, char**)::hexChar + 0x4c70c
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b7a8
    rip = 0x000000010e4d08bc
    Found by: stack scanning
 4  XUL!XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) [XPCWrappedNative.cpp:32e36869f84a : 2396 + 0x5]
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b810
    rip = 0x000000010b76b0de
    Found by: stack scanning
 5  XUL!js::jit::ICStubCompiler::getStubCode() [BaselineIC.cpp:32e36869f84a : 609 + 0x2]
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b820
    rip = 0x000000010d3b9158
    Found by: stack scanning
 6  XUL!empty_buffer + 0x20
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b860
    rip = 0x000000010d8658d0
    Found by: stack scanning
 7  XUL!empty_buffer + 0x20
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b868
    rip = 0x000000010d8658d0
    Found by: stack scanning
 8  XUL!XPCVariant::VariantDataToJS(nsIVariant*, tag_nsresult*, JS::MutableHandle<JS::Value>) [XPCVariant.cpp:32e36869f84a : 631 + 0x1]
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b8e0
    rip = 0x000000010b76031a
    Found by: stack scanning
 9  XUL!XPC_WN_Helper_NewResolve(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JSObject*>) [XPCWrappedNativeJSOps.cpp:32e36869f84a : 904 + 0x4]
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b910
    rip = 0x000000010b7702b7
    Found by: stack scanning
10  XUL!nsXPCComponents_Utils::GetSandbox(nsIXPCComponents_utils_Sandbox**) [nsCOMPtr.h:32e36869f84a : 809 + 0x3]
    rbp = 0x00007ffee894b958   rsp = 0x00007ffee894b940
    rip = 0x000000010b73000d
    Found by: stack scanning
11  XUL!nsXPCComponents_Utils::ReportError(JS::Handle<JS::Value>, JSContext*) [nsJSUtils.h:32e36869f84a : 179 + 0x8]
    rsp = 0x00007ffee894b970   rip = 0x000000010b73031a
    Found by: stack scanning
12  XUL!NS_IsMainThread() [ThreadLocal.h:32e36869f84a : 127 + 0x5]
    rsp = 0x00007ffee894b9a0   rip = 0x000000010b2d7fdd
    Found by: stack scanning
13  XUL!XPCCallContext::XPCCallContext(XPCContext::LangType, JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, unsigned int, JS::Value*, JS::Value*) [XPCCallContext.cpp:32e36869f84a : 59 + 0x7]
    rsp = 0x00007ffee894b9b0   rip = 0x000000010b73dd46
    Found by: stack scanning
14  XUL!XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) [XPCWrappedNativeJSOps.cpp:32e36869f84a : 1247 + 0xa]
    rsp = 0x00007ffee894b9f0   rip = 0x000000010b770aa3
    Found by: stack scanning
15  XUL + 0x51d8d0
    rsp = 0x00007ffee894bb00   rip = 0x000000010b7708d0
    Found by: stack scanning
16  XUL!js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) [Interpreter.cpp:32e36869f84a : 0 + 0x31]
    rsp = 0x00007ffee894bb30   rip = 0x000000010d6c88b7
    Found by: stack scanning
17  XUL!JS_ResolveStandardClass(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool*) [jsapi.cpp:32e36869f84a : 0 + 0x4]
    rsp = 0x00007ffee894bb60   rip = 0x000000010d58f190
    Found by: stack scanning
18  XUL!js::DefineNativeProperty(js::ExclusiveContext*, JS::Handle<js::NativeObject*>, JS::Handle<jsid>, JS::Handle<JS::Value>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::MutableHandle<JS::Value>), unsigned int) [NativeObject.cpp:32e36869f84a : 1497 + 0x22]
    rsp = 0x00007ffee894bba0   rip = 0x000000010d6df187
    Found by: stack scanning
19  XUL + 0x51cfd0
    rsp = 0x00007ffee894bbe0   rip = 0x000000010b76ffd0
    Found by: stack scanning
20  XUL!JS_ResolveStandardClass(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool*) [jsapi.cpp:32e36869f84a : 0 + 0x4]
    rsp = 0x00007ffee894bbe8   rip = 0x000000010d58f190
    Found by: stack scanning
21  XUL!js::NewFunctionWithProto(js::ExclusiveContext*, JS::Handle<JSObject*>, bool (*)(JSContext*, unsigned int, JS::Value*), unsigned int, JSFunction::Flags, JS::Handle<JSObject*>, JS::Handle<JSAtom*>, JSObject*, js::gc::AllocKind, js::NewObjectKind) [jsobjinlines.h:32e36869f84a : 624 + 0x15]
    rsp = 0x00007ffee894bc30   rip = 0x000000010d5cc240
    Found by: stack scanning
22  XUL!JSObject::defineGeneric(js::ExclusiveContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::Handle<JS::Value>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::MutableHandle<JS::Value>), unsigned int) [jsobj.cpp:32e36869f84a : 3147 + 0x8]
    rsp = 0x00007ffee894bc80   rip = 0x000000010d61146f
    Found by: stack scanning
23  XUL!DefinePropertyById(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::Handle<JS::Value>, JSPropertyOpWrapper const&, JSStrictPropertyOpWrapper const&, unsigned int, unsigned int) [jsapi.cpp:32e36869f84a : 2878 + 0x12]
    rsp = 0x00007ffee894bc90   rip = 0x000000010d591cfb
    Found by: stack scanning
24  XUL!js:: [jsfun.cpp:32e36869f84a : 1934 + 0x1b]
    rsp = 0x00007ffee894bcb0   rip = 0x000000010d5d0a6d
    Found by: stack scanning
25  XUL!js::NewFunctionByIdWithReserved(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), unsigned int, unsigned int, JSObject*, jsid) [jsfriendapi.cpp:32e36869f84a : 520 + 0x26]
    rsp = 0x00007ffee894bce0   rip = 0x000000010d5c80f1
    Found by: stack scanning
26  XUL!XPCNativeMember::Resolve(XPCCallContext&, XPCNativeInterface*, JS::Handle<JSObject*>, JS::Value*) [XPCWrappedNativeInfo.cpp:32e36869f84a : 95 + 0xd]
    rsp = 0x00007ffee894bd30   rip = 0x000000010b76d05e
    Found by: stack scanning
27  XUL!JS_DefinePropertyById(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::Handle<JS::Value>, unsigned int, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::MutableHandle<JS::Value>)) [jsapi.cpp:32e36869f84a : 2885 + 0x5]
    rsp = 0x00007ffee894bd70   rip = 0x000000010d591a68
    Found by: stack scanning
28  XUL!NS_IsMainThread() [ThreadLocal.h:32e36869f84a : 127 + 0x5]
    rsp = 0x00007ffee894bd90   rip = 0x000000010b2d7fdd
    Found by: stack scanning
29  XUL!DefinePropertyIfFound(XPCCallContext&, JS::Handle<JSObject*>, JS::Handle<jsid>, XPCNativeSet*, XPCNativeInterface*, XPCNativeMember*, XPCWrappedNativeScope*, bool, XPCWrappedNative*, XPCWrappedNative*, XPCNativeScriptableInfo*, unsigned int, bool*) [XPCWrappedNativeJSOps.cpp:32e36869f84a : 0 + 0xf]
    rsp = 0x00007ffee894bda0   rip = 0x000000010b771c58
    Found by: stack scanning
30  XUL!bool DefinePropertyOrElement<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<js::NativeObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::MutableHandle<JS::Value>), unsigned int, JS::Handle<JS::Value>, bool, bool) [NativeObject.cpp:32e36869f84a : 1283 + 0x11]
    rsp = 0x00007ffee894be00   rip = 0x000000010d6dfcb7
    Found by: stack scanning
31  XUL + 0x233c1a0
    rsp = 0x00007ffee894be18   rip = 0x000000010d58f1a0
    Found by: stack scanning
32  XUL!NS_IsMainThread() [ThreadLocal.h:32e36869f84a : 127 + 0x5]
    rsp = 0x00007ffee894be40   rip = 0x000000010b2d7fdd
    Found by: stack scanning
33  XUL!XPCCallContext::XPCCallContext(XPCContext::LangType, JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, unsigned int, JS::Value*, JS::Value*) [XPCCallContext.cpp:32e36869f84a : 59 + 0x7]
    rsp = 0x00007ffee894be50   rip = 0x000000010b73dd46
    Found by: stack scanning
34  XUL!NS_IsMainThread() [ThreadLocal.h:32e36869f84a : 127 + 0x5]
    rsp = 0x00007ffee894be70   rip = 0x000000010b2d7fdd
    Found by: stack scanning
35  XUL!<name omitted> [nsRefPtr.h:32e36869f84a : 57 + 0x6]
    rsp = 0x00007ffee894be80   rip = 0x000000010b73e2c9
    Found by: stack scanning
36  XUL!XPC_WN_Helper_NewResolve(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JSObject*>) [XPCWrappedNativeJSOps.cpp:32e36869f84a : 933 + 0x5]
    rsp = 0x00007ffee894be90   rip = 0x000000010b7700cc
    Found by: stack scanning
37  XUL!js::jit::ICCall_Native::Compiler::getStub(js::jit::ICStubSpace*) [BaselineIC.cpp:32e36869f84a : 10897 + 0x14]
    rsp = 0x00007ffee894bf10   rip = 0x000000010d3f90cb
    Found by: stack scanning
38  XUL!js::jit::TryAttachCallStub(JSContext*, js::jit::ICCall_Fallback*, JS::Handle<JSScript*>, unsigned char*, JSOp, unsigned int, JS::Value*, bool, bool, bool) [BaselineIC.cpp:32e36869f84a : 8521 + 0x5]
    rsp = 0x00007ffee894bf50   rip = 0x000000010d3fee6a
    Found by: stack scanning
39  libmozglue.dylib!double_conversion::FillFractionals(unsigned long long, int, int, double_conversion::Vector<char>, int*, int*) [fixed-dtoa.cc:32e36869f84a : 277 + 0x2]
    rsp = 0x00007ffee894bf98   rip = 0x00000001072d0000
    Found by: stack scanning
40  XUL!js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value const*, JS::MutableHandle<JS::Value>) [Interpreter.cpp:32e36869f84a : 537 + 0xa]
    rsp = 0x00007ffee894bfd0   rip = 0x000000010d6c8f4d
    Found by: stack scanning
41  XUL!js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) [BaselineIC.cpp:32e36869f84a : 8663 + 0x18]
    rsp = 0x00007ffee894c0b0   rip = 0x000000010d3e9d6a
    Found by: stack scanning
42  XUL!js::jit::DoGetElemFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICGetElem_Fallback*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) [BaselineIC.cpp:32e36869f84a : 3806 + 0x5]
    rsp = 0x00007ffee894c150   rip = 0x000000010d3ce171
    Found by: stack scanning
43  XUL!js::gc::MapAllocToTraceKind(js::gc::AllocKind)::map + 0x60
    rsp = 0x00007ffee894c208   rip = 0x000000010da20b90
    Found by: stack scanning

@ssigwart, it’s unlikely i’ll merge a patch for this fyi. The builds are working and Komodo runs on Catalina. I’d like more information on the changes you’re making. Perhaps a PR is the best way to convey that though.

I assume your environment has changed a lot now but I’m still interested in what otool -L outputs for _xpcom.so. When I did that on my Mac it was all system libs except for one that points to the Mozilla python. I think that’s going to be the culprit.

I might have to cave and try upgrading my Mac. Hopefully I can’t reproduce the issue!

  • Carey

In mozilla/build/moz3500-ko11.10/mozilla/ko-rel/dist/Komodo.app/Contents/MacOS/:

> otool -L ./python/xpcom/_xpcom.so
./python/xpcom/_xpcom.so:
	@executable_path/libnss3.dylib (compatibility version 1.0.0, current version 1.0.0)
	@executable_path/libmozalloc.dylib (compatibility version 1.0.0, current version 1.0.0)
	@rpath/../Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.6.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)

Please don’t upgrade just to help me. I’ve spent days on this and wouldn’t wish that on anyone else.

I plan on working on this some more tonight, so I’ll try to fill you in on the changes then.

@careyh, It’s not pretty, but I was able to at least get it running. Here are some branches with changes. I’m pretty sure you won’t want to merge the second two, but they might help if you do upgrade.

Fix Symlink issue with Catalina

Allow for newer ccache version

Handle svnversion not available

Other changes

  • Change watchdog_fsevents.c from #include <Python/Python.h> to #include <Python.h>
  • Make sure contrib/Conscript has -mmacosx-version-min=10.9
  • I have random notes on https://github.com/ssigwart/KomodoEdit/wiki too, but I think this covers it.

Final “Fix”

With all the above, it started failing with the stack trace from earlier in this thread. I narrowed it down to the Contents/MacOS/XUL file. I don’t know exactly what’s wrong there, but my temporary fix is below.

cp /Applications/Komodo\ Edit\ 11.app/Contents/MacOS/XUL mozilla/build/moz3500-ko11.10/mozilla/ko-rel/toolkit/library/XUL

After doing that, bk build will use the XUL file from the actual app and doesn’t crash.

Do you know what that file is? Do you think any changes I’d be working on would require me to actually build a different version.

@ssigwart, you are a machine. On behalf the community and from myself I thank you for this effort. It’s greatly appreciated.

Though I won’t be merging these changes, I will carve out time to get your other PRs merged and nightly released with them in it.

  • Carey

@careyh, I tried running the newest nightly and saw this in the error log. It seems related to the XPCOM issues I was having building. Do you have Catalina to see if you get the same issue? I reverted back to the 2019-10-29 nightly.

[2019-11-23 18:05:53,327] [INFO] Startup: Welcome to Komodo Edit 11.1.2 build 18396 (platform macosx, running on Darwin 19.0.0 version Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64)
[2019-11-23 18:05:53,327] [INFO] Startup: /Applications/Komodo Edit 11.app/Contents/MacOS/komodo built on Mon Nov 4 18:03:19 2019
[2019-11-23 18:05:53,417] [WARNING] koInitService: Unable to determine the current locale settings, defaulting to mac-roman
[2019-11-23 18:05:53,733] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in resource://gre/modules/Preferences.jsm:381
[2019-11-23 18:05:53,874] [WARNING] root: [object Object].logging has been converted to a CommonJS module; use require("ko/logging") instead (since Komodo 9.0.0a1).
    @chrome://komodo/content/komodo.js:48:1

[2019-11-23 18:05:54,539] [WARNING] ko.widgets: Pref path doesn't exist: windowWorkspace, 1
[2019-11-23 18:05:54,716] [INFO] koInitService: Adding pre startup service for 'koFileStatusService': '@activestate.com/koFileStatusService;1'
[2019-11-23 18:05:54,737] [INFO] elastic_tabstops: Elastic tabstops loaded.
[2019-11-23 18:05:54,840] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in file:///Applications/Komodo%20Edit%2011.app/Contents/Resources/components/koamAddonManager.js:138
[2019-11-23 18:05:54,933] [ERROR] console-logger: Exception while registering Focus Mode (0) in resource://gre/modules/addons/XPIProvider.jsm -> file:///Applications/Komodo%20Edit%2011.app/Contents/Resources/extensions/focusmode@activestate.com/bootstrap.js:11
Traceback (most recent call last):
  File "resource://gre/modules/addons/XPIProvider.jsm -> file:///Applications/Komodo%20Edit%2011.app/Contents/Resources/extensions/focusmode@activestate.com/bootstrap.js", line 11, in

[2019-11-23 18:05:54,934] [ERROR] console-logger: [object Object] (0) in resource://gre/modules/addons/XPIProvider.jsm -> file:///Applications/Komodo%20Edit%2011.app/Contents/Resources/extensions/focusmode@activestate.com/bootstrap.js:12
Traceback (most recent call last):
  File "resource://gre/modules/addons/XPIProvider.jsm -> file:///Applications/Komodo%20Edit%2011.app/Contents/Resources/extensions/focusmode@activestate.com/bootstrap.js", line 12, in

Exception in thread CodeIntel XPCOM Helper:
Traceback (most recent call last):
  File "/Applications/Komodo Edit 11.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/Applications/Komodo Edit 11.app/Contents/Resources/components/koCodeIntelXPCOMSupport.py", line 60, in run
    mgr.send(command="xpcom-connect", host=host, port=port)
  File "/Applications/Komodo Edit 11.app/Contents/Resources/components/koCodeIntel.py", line 326, in send
    self.mgr.send(**kwargs)
  File "/Applications/Komodo Edit 11.app/Contents/Resources/components/koCodeIntel.py", line 1117, in send
    raise RuntimeError("Manager already shut down")
RuntimeError: Manager already shut down

ERROR:xpcom:Unhandled exception calling 'int8 * run();'
Traceback (most recent call last):
  File "/Applications/Komodo Edit 11.app/Contents/Resources/python/xpcom/server/policy.py", line 303, in _CallMethod_
    return 0, func(*params)
  File "/Applications/Komodo Edit 11.app/Contents/Resources/python/xpcom/components.py", line 237, in run
    self.result = self.fn(*self.args, **self.kwargs)
  File "/Applications/Komodo Edit 11.app/Contents/Resources/components/koCodeIntel.py", line 1471, in observe
    self.send(command="set-xml-catalogs", catalogs=catalogs)
  File "/Applications/Komodo Edit 11.app/Contents/Resources/components/koCodeIntel.py", line 1117, in send
    raise RuntimeError("Manager already shut down")
RuntimeError: Manager already shut down
[2019-11-23 18:05:57,321] [INFO] koInitService: Adding pre startup service for 'KoMemoryReporter': '@activestate.com/koMemoryReporter;1'
[2019-11-23 18:05:57,322] [INFO] koInitService: Adding pre startup service for 'koCommandmentService': '@activestate.com/koCommandmentService;1'
[2019-11-23 18:06:15,910] [WARNING] views: Inconsistent view count in view_closed event

@ssigwart, what in that output matches what you saw while trying to build?

Reproduced on Catalina. I’m guessing since other nightlies worked fine on Catalina that this is more likely related to a recent commit. Can you file a bug for this? Make sure you link back to your comment.

  • Carey

I bet it’s related to:

@ssigwart, it’s broken on Windows too. Filed: https://github.com/Komodo/KomodoEdit/issues/3804

It wasn’t an exact error message, but just that it was XPCOM and the building issues were mainly around the XPCOM library I thought it might be related. It sounds like it’s not related though if it’s Windows too.

Just in case you still waiting on the nightly build for this fix.

This is how I got CodeIntel working on build 18396.

I made the change to the file:

/Applications/Komodo Edit 11.app/Contents/Resources/python/komodo/codeintel2/oop/driver.py

As indicated in the fix:

Then deleted the “codeintel2/oop/driver.pyo” version.

1 Like

That’s the one @ctk! Thanks for reaching out. Nightly will be live around 12 pm Pacific time, so in about 2 hrs.

http://downloads.activestate.com/Komodo/nightly/

  • Carey

Thanks. I’ll try out the nightly when I have some time to patch it with some of my local changes.