armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.23k stars 334 forks source link

Could not run self build version on macOS #1665

Closed StanleySweet closed 7 months ago

StanleySweet commented 8 months ago

Description

I followed the instructions on the main readme, then the ones in the armor paint readme but could not get it to build at first.

In armortools/armorcore/Sources/iron/iron_string.c I had to replace malloc.h by stdlib.h for it to start building.

#include "iron_string.h"
- #include <malloc.h>
+ #include <stdlib.h>
#include <string.h>

void string_init(string_t *s, const char *str) {
    s->data = realloc(s->data, strlen(str));
    strcpy(s->data, str);
}

void string_free(string_t *s) {
    free(s->data);
    s->data = NULL;
    s->length = 0;
}

Unfortunately it then fails to run in Xcode with the following message.

Could not load krom.js, aborting.

Expected behavior Following the instructions should give me a working build.

OS: macOS Monterey 12.6 on 2020 M1 mac

I also tried

 ../armorcore/Kinc/make --from ../armorcore -g metal --compile

Without much success. I tried to make the krom.js file executable but that didn't work.

Launching the application .app file crashes instantly.

Crash Log
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               ArmorPaint [59083]
Path:                  /Users/USER/*/ArmorPaint.app/Contents/MacOS/ArmorPaint
Identifier:            tech.kode.ArmorPaint
Version:               1.0 (1)
Code Type:             ARM-64 (Native)
Parent Process:        zsh [59046]
Responsible:           Terminal [52278]
User ID:               501

Date/Time:             2023-12-28 19:10:23.2134 +0100
OS Version:            macOS 12.6 (21G115)
Report Version:        12
Anonymous UUID:        5FEFC264-413F-A45B-B73F-B64AA42CC48C

Sleep/Wake UUID:       BBF93EA4-8F4C-400E-9498-5077DFC726FF

Time Awake Since Boot: 5400000 seconds
Time Since Wake:       810 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x00000001bdbc0bcc
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [59083]

Application Specific Information:
detected source and destination buffer overlap

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_c.dylib                      0x1bdbc0bcc __chk_fail_overlap + 24
1   libsystem_c.dylib                      0x1bdb4e0cc __chk_overlap + 48
2   libsystem_c.dylib                      0x1bdb57114 __strcpy_chk + 84
3   ArmorPaint                             0x1025304f4 zui_draw_string + 100 (zui.c:255)
4   ArmorPaint                             0x1025361f8 zui_slider + 892
5   ArmorPaint                             0x10251498c (anonymous namespace)::krom_zui_slider(v8::FunctionCallbackInfo const&) + 804 (main.cpp:3404)
6   ArmorPaint                             0x1025f3858 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 260
7   ArmorPaint                             0x1025f2ee8 v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, unsigned long*, int) + 432
8   ArmorPaint                             0x1025f2818 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 212
9   ArmorPaint                             0x10313232c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
10  ArmorPaint                             0x1030aff84 Builtins_InterpreterEntryTrampoline + 260
11  ArmorPaint                             0x1030aff84 Builtins_InterpreterEntryTrampoline + 260
12  ArmorPaint                             0x1030aff84 Builtins_InterpreterEntryTrampoline + 260
13  ArmorPaint                             0x1030aff84 Builtins_InterpreterEntryTrampoline + 260
14  ArmorPaint                             0x1030aff84 Builtins_InterpreterEntryTrampoline + 260
15  ArmorPaint                             0x1030aff84 Builtins_InterpreterEntryTrampoline + 260
16  ArmorPaint                             0x1030aff84 Builtins_InterpreterEntryTrampoline + 260
17  ArmorPaint                             0x1030ae410 Builtins_JSEntryTrampoline + 176
18  ArmorPaint                             0x1030ae0a4 Builtins_JSEntry + 164
19  ArmorPaint                             0x1026f42c0 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) + 2544
20  ArmorPaint                             0x1026f38b8 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, int, v8::internal::Handle*) + 196
21  ArmorPaint                             0x1025a08b0 v8::Function::Call(v8::Local, v8::Local, int, v8::Local*) + 660
22  ArmorPaint                             0x10251cf0c (anonymous namespace)::run_v8() + 180 (main.cpp:4453) [inlined]
23  ArmorPaint                             0x10251cf0c (anonymous namespace)::update(void*) + 352 (main.cpp:4495)
24  ArmorPaint                             0x10254abe0 kinc_internal_update_callback + 24 (system.h:481) [inlined]
25  ArmorPaint                             0x10254abe0 kinc_internal_frame + 32 (system.h:584)
26  ArmorPaint                             0x102548610 withAutoreleasepool + 28 (system.m.h:18)
27  ArmorPaint                             0x10254ac1c kinc_start + 40 (system.h:596)
28  ArmorPaint                             0x1024e4564 kickstart + 1240 (main.cpp:4971)
29  dyld                                   0x108de508c start + 520

Thread 1:: V8 DefaultWorke
0   libsystem_kernel.dylib                 0x1bdc4e270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1bdc8883c _pthread_cond_wait + 1236
2   ArmorPaint                             0x10257bd0c v8::platform::DelayedTaskQueue::GetNext() + 584
3   ArmorPaint                             0x10257b73c v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44
4   ArmorPaint                             0x102574224 v8::base::ThreadEntry(void*) + 100
5   libsystem_pthread.dylib                0x1bdc8826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1bdc8308c thread_start + 8

Thread 2:: V8 DefaultWorke
0   libsystem_kernel.dylib                 0x1bdc4e270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1bdc8883c _pthread_cond_wait + 1236
2   ArmorPaint                             0x10257bd0c v8::platform::DelayedTaskQueue::GetNext() + 584
3   ArmorPaint                             0x10257b73c v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44
4   ArmorPaint                             0x102574224 v8::base::ThreadEntry(void*) + 100
5   libsystem_pthread.dylib                0x1bdc8826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1bdc8308c thread_start + 8

Thread 3:: V8 DefaultWorke
0   libsystem_kernel.dylib                 0x1bdc4e270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1bdc8883c _pthread_cond_wait + 1236
2   ArmorPaint                             0x10257bd0c v8::platform::DelayedTaskQueue::GetNext() + 584
3   ArmorPaint                             0x10257b73c v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44
4   ArmorPaint                             0x102574224 v8::base::ThreadEntry(void*) + 100
5   libsystem_pthread.dylib                0x1bdc8826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1bdc8308c thread_start + 8

Thread 4:: V8 DefaultWorke
0   libsystem_kernel.dylib                 0x1bdc4e270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1bdc8883c _pthread_cond_wait + 1236
2   ArmorPaint                             0x10257bd0c v8::platform::DelayedTaskQueue::GetNext() + 584
3   ArmorPaint                             0x10257b73c v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44
4   ArmorPaint                             0x102574224 v8::base::ThreadEntry(void*) + 100
5   libsystem_pthread.dylib                0x1bdc8826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1bdc8308c thread_start + 8

Thread 5:: V8 DefaultWorke
0   libsystem_kernel.dylib                 0x1bdc4e270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1bdc8883c _pthread_cond_wait + 1236
2   ArmorPaint                             0x10257bd0c v8::platform::DelayedTaskQueue::GetNext() + 584
3   ArmorPaint                             0x10257b73c v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44
4   ArmorPaint                             0x102574224 v8::base::ThreadEntry(void*) + 100
5   libsystem_pthread.dylib                0x1bdc8826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1bdc8308c thread_start + 8

Thread 6:: V8 DefaultWorke
0   libsystem_kernel.dylib                 0x1bdc4e270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1bdc8883c _pthread_cond_wait + 1236
2   ArmorPaint                             0x10257bd0c v8::platform::DelayedTaskQueue::GetNext() + 584
3   ArmorPaint                             0x10257b73c v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44
4   ArmorPaint                             0x102574224 v8::base::ThreadEntry(void*) + 100
5   libsystem_pthread.dylib                0x1bdc8826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1bdc8308c thread_start + 8

Thread 7:: V8 DefaultWorke
0   libsystem_kernel.dylib                 0x1bdc4e270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1bdc8883c _pthread_cond_wait + 1236
2   ArmorPaint                             0x10257bd0c v8::platform::DelayedTaskQueue::GetNext() + 584
3   ArmorPaint                             0x10257b73c v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() + 44
4   ArmorPaint                             0x102574224 v8::base::ThreadEntry(void*) + 100
5   libsystem_pthread.dylib                0x1bdc8826c _pthread_start + 148
6   libsystem_pthread.dylib                0x1bdc8308c thread_start + 8

Thread 8:
0   libsystem_pthread.dylib                0x1bdc83078 start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib                0x1bdc83078 start_wqthread + 0

Thread 10::  Dispatch queue: com.Metal.CommandQueueDispatch
0   libsystem_kernel.dylib                 0x1bdc4a8b0 mach_msg_trap + 8
1   libsystem_kernel.dylib                 0x1bdc4ad20 mach_msg + 76
2   IOKit                                  0x1c07447c0 io_connect_method + 512
3   IOKit                                  0x1c0744558 IOConnectCallMethod + 176
4   IOGPU                                  0x1d888c34c IOGPUCommandQueueSubmitCommandBuffers + 144
5   IOGPU                                  0x1d887ef68 -[IOGPUMetalCommandQueue _submitCommandBuffers:count:] + 820
6   IOGPU                                  0x1d887ec08 -[IOGPUMetalCommandQueue submitCommandBuffers:count:] + 88
7   Metal                                  0x1c65bbdec -[_MTLCommandQueue _submitAvailableCommandBuffers] + 684
8   libdispatch.dylib                      0x1bdac41b4 _dispatch_client_callout + 20
9   libdispatch.dylib                      0x1bdac7670 _dispatch_continuation_pop + 500
10  libdispatch.dylib                      0x1bdada8e0 _dispatch_source_invoke + 1596
11  libdispatch.dylib                      0x1bdacb784 _dispatch_lane_serial_drain + 376
12  libdispatch.dylib                      0x1bdacc404 _dispatch_lane_invoke + 392
13  libdispatch.dylib                      0x1bdad6c98 _dispatch_workloop_worker_thread + 648
14  libsystem_pthread.dylib                0x1bdc84360 _pthread_wqthread + 288
15  libsystem_pthread.dylib                0x1bdc83080 start_wqthread + 8

Thread 11:: CVDisplayLink
0   libsystem_kernel.dylib                 0x1bdc4e270 __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x1bdc88868 _pthread_cond_wait + 1280
2   CoreVideo                              0x1c5333380 CVDisplayLink::waitUntil(unsigned long long) + 324
3   CoreVideo                              0x1c5332460 CVDisplayLink::runIOThread() + 488
4   libsystem_pthread.dylib                0x1bdc8826c _pthread_start + 148
5   libsystem_pthread.dylib                0x1bdc8308c thread_start + 8

Thread 12:
0   libsystem_pthread.dylib                0x1bdc83078 start_wqthread + 0

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000000   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x5ad6d7bae4170080   x9: 0x5ad6d7bae4170080  x10: 0x000000001e000000  x11: 0x0000000000000001
   x12: 0x000000016d92dc52  x13: 0x0000000000000000  x14: 0x000000010868b1de  x15: 0x0000000000000003
   x16: 0xfffffffffffffff4  x17: 0x0000000217dabf00  x18: 0x0000000000000000  x19: 0x00000001035e54f8
   x20: 0x00000001035e54f8  x21: 0x0000000000000400  x22: 0x0000600003ac2570  x23: 0x00000001035e5000
   x24: 0x0000000000000001  x25: 0x00000001035e5000  x26: 0x000000014372e80c  x27: 0x000021aadea480f1
   x28: 0x0000000100000000   fp: 0x000000016d92de50   lr: 0x007e0001bdbc0bcc
    sp: 0x000000016d92de50   pc: 0x00000001bdbc0bcc cpsr: 0x60001000
   far: 0x0000000128ec37cc  esr: 0xf2000001 (Breakpoint) brk 1

Binary Images:
       0x1bdb48000 -        0x1bdbc9fff libsystem_c.dylib (*)  /usr/lib/system/libsystem_c.dylib
       0x1024d0000 -        0x10334ffff tech.kode.ArmorPaint (1.0)  /Users/USER/*/ArmorPaint.app/Contents/MacOS/ArmorPaint
       0x108de0000 -        0x108e3ffff dyld (*) <38ee9fe9-b66d-3066-8c5c-6ddf0d6944c6> /usr/lib/dyld
       0x1bdc49000 -        0x1bdc80fff libsystem_kernel.dylib (*)  /usr/lib/system/libsystem_kernel.dylib
       0x1bdc81000 -        0x1bdc8dfff libsystem_pthread.dylib (*) <63c4eef9-69a5-38b1-996e-8d31b66a051d> /usr/lib/system/libsystem_pthread.dylib
       0x1c0741000 -        0x1c0817fff com.apple.framework.IOKit (2.0.2) <331182d5-f1dd-3d3e-9ede-7704eb9088cf> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
       0x1d8878000 -        0x1d88a5fff com.apple.IOGPU (35.29)  /System/Library/PrivateFrameworks/IOGPU.framework/Versions/A/IOGPU
       0x1c659b000 -        0x1c66defff com.apple.Metal (263.8)  /System/Library/Frameworks/Metal.framework/Versions/A/Metal
       0x1bdac0000 -        0x1bdb06fff libdispatch.dylib (*)  /usr/lib/system/libdispatch.dylib
       0x1c5330000 -        0x1c538dfff com.apple.CoreVideo (1.8) <5ae3672a-4b9a-3ef6-b310-a2d980d6ca0e> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 13
    thread_create: 0
    thread_set_state: 134

VM Region Summary:
ReadOnly portion of Libraries: Total=848.7M resident=0K(0%) swapped_out_or_unallocated=848.7M(100%)
Writable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
ColorSync                          528K       23 
CoreAnimation                       16K        1 
CoreGraphics                        16K        1 
Foundation                          16K        1 
Kernel Alloc Once                   32K        1 
MALLOC                           225.3M       34 
MALLOC guard page                  192K       11 
MALLOC_MEDIUM (reserved)         480.0M        4         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
Memory Tag 255                   270.1M       55 
STACK GUARD                       56.2M       13 
Stack                             17.9M       13 
VM_ALLOCATE                         48K        3 
__AUTH                            1854K      163 
__AUTH_CONST                      10.7M      309 
__CTF                               756        1 
__DATA                            90.6M      299 
__DATA_CONST                      11.2M      311 
__DATA_DIRTY                       708K      112 
__FONT_DATA                          4K        1 
__LINKEDIT                       584.9M        4 
__OBJC_CONST                      1482K      139 
__OBJC_RO                         83.0M        1 
__OBJC_RW                         3168K        1 
__TEXT                           263.7M      325 
__UNICODE                          592K        1 
dyld private memory               1024K        1 
mapped file                      139.9M       17 
shared memory                      864K       15 
===========                     =======  ======= 
TOTAL                              2.6G     1862 
TOTAL, minus reserved VM space     1.7G     1862 

-----------
Full Report
-----------

{"app_name":"ArmorPaint","timestamp":"2023-12-28 19:10:23.00 +0100","app_version":"1.0","sroute_id":3,"slice_uuid":"f1ce3a26-6a65-38b4-b9a2-1abd21ebe38d","build_version":"1","platform":1,"bundleID":"tech.kode.ArmorPaint","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.6 (21G115)","incident_id":"61CFE4ED-3C6A-4784-9F24-2ADBFD8B28C6","name":"ArmorPaint"}
{
  "uptime" : 5400000,
  "procLaunch" : "2023-12-28 19:10:22.6456 +0100",
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro17,1",
  "procStartAbsTime" : 131018944969951,
  "coalitionID" : 202400,
  "osVersion" : {
    "train" : "macOS 12.6",
    "build" : "21G115",
    "releaseType" : "User"
  },
  "captureTime" : "2023-12-28 19:10:23.2134 +0100",
  "incident" : "61CFE4ED-3C6A-4784-9F24-2ADBFD8B28C6",
  "bug_type" : "309",
  "pid" : 59083,
  "procExitAbsTime" : 131018958187839,
  "translated" : false,
  "cpuType" : "ARM-64",
  "procName" : "ArmorPaint",
  "procPath" : "\/Users\/USER\/*\/ArmorPaint.app\/Contents\/MacOS\/ArmorPaint",
  "bundleInfo" : {"CFBundleShortVersionString":"1.0","CFBundleVersion":"1","CFBundleIdentifier":"tech.kode.ArmorPaint"},
  "storeInfo" : {"deviceIdentifierForVendor":"424EB249-550A-5BD3-B788-83834F53F8F4","thirdParty":true},
  "parentProc" : "zsh",
  "parentPid" : 59046,
  "coalitionName" : "com.apple.Terminal",
  "crashReporterKey" : "5FEFC264-413F-A45B-B73F-B64AA42CC48C",
  "responsiblePid" : 52278,
  "responsibleProc" : "Terminal",
  "wakeTime" : 810,
  "sleepWakeUUID" : "BBF93EA4-8F4C-400E-9498-5077DFC726FF",
  "sip" : "enabled",
  "sroute_id" : 3,
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000001, 0x00000001bdbc0bcc","rawCodes":[1,7478184908],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
  "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":59083},
  "asi" : {"libsystem_c.dylib":["detected source and destination buffer overlap"]},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":134,"task_for_pid":13},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":30139664,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":6545656306120196224},{"value":6545656306120196224},{"value":503316480},{"value":1},{"value":6133308498},{"value":0},{"value":4436046302},{"value":3},{"value":18446744073709551604},{"value":8990146304},{"value":0},{"value":4351481080,"symbolLocation":0,"symbol":"temp"},{"value":4351481080,"symbolLocation":0,"symbol":"temp"},{"value":1024},{"value":105553177879920},{"value":4351479808,"symbolLocation":948,"symbol":"na"},{"value":1},{"value":4351479808,"symbolLocation":948,"symbol":"na"},{"value":5426571276},{"value":37017763479793},{"value":4294967296}],"flavor":"ARM_THREAD_STATE64","lr":{"value":35465854543727564},"cpsr":{"value":1610616832},"fp":{"value":6133309008},"sp":{"value":6133309008},"esr":{"value":4060086273,"description":"(Breakpoint) brk 1"},"pc":{"value":7478184908,"matchesCrashFrame":1},"far":{"value":4981536716}},"queue":"com.apple.main-thread","frames":[{"imageOffset":494540,"symbol":"__chk_fail_overlap","symbolLocation":24,"imageIndex":0},{"imageOffset":24780,"symbol":"__chk_overlap","symbolLocation":48,"imageIndex":0},{"imageOffset":61716,"symbol":"__strcpy_chk","symbolLocation":84,"imageIndex":0},{"imageOffset":394484,"sourceLine":255,"sourceFile":"zui.c","symbol":"zui_draw_string","imageIndex":1,"symbolLocation":100},{"imageOffset":418296,"sourceFile":"zui.c","symbol":"zui_slider","symbolLocation":892,"imageIndex":1},{"imageOffset":280972,"sourceLine":3404,"sourceFile":"main.cpp","symbol":"(anonymous namespace)::krom_zui_slider(v8::FunctionCallbackInfo const&)","imageIndex":1,"symbolLocation":804},{"imageOffset":1194072,"symbol":"v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo)","symbolLocation":260,"imageIndex":1},{"imageOffset":1191656,"symbol":"v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, unsigned long*, int)","symbolLocation":432,"imageIndex":1},{"imageOffset":1189912,"symbol":"v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*)","symbolLocation":212,"imageIndex":1},{"imageOffset":12985132,"symbol":"Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit","symbolLocation":108,"imageIndex":1},{"imageOffset":12451716,"symbol":"Builtins_InterpreterEntryTrampoline","symbolLocation":260,"imageIndex":1},{"imageOffset":12451716,"symbol":"Builtins_InterpreterEntryTrampoline","symbolLocation":260,"imageIndex":1},{"imageOffset":12451716,"symbol":"Builtins_InterpreterEntryTrampoline","symbolLocation":260,"imageIndex":1},{"imageOffset":12451716,"symbol":"Builtins_InterpreterEntryTrampoline","symbolLocation":260,"imageIndex":1},{"imageOffset":12451716,"symbol":"Builtins_InterpreterEntryTrampoline","symbolLocation":260,"imageIndex":1},{"imageOffset":12451716,"symbol":"Builtins_InterpreterEntryTrampoline","symbolLocation":260,"imageIndex":1},{"imageOffset":12451716,"symbol":"Builtins_InterpreterEntryTrampoline","symbolLocation":260,"imageIndex":1},{"imageOffset":12444688,"symbol":"Builtins_JSEntryTrampoline","symbolLocation":176,"imageIndex":1},{"imageOffset":12443812,"symbol":"Builtins_JSEntry","symbolLocation":164,"imageIndex":1},{"imageOffset":2245312,"symbol":"v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&)","symbolLocation":2544,"imageIndex":1},{"imageOffset":2242744,"symbol":"v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle, v8::internal::Handle, int, v8::internal::Handle*)","symbolLocation":196,"imageIndex":1},{"imageOffset":854192,"symbol":"v8::Function::Call(v8::Local, v8::Local, int, v8::Local*)","symbolLocation":660,"imageIndex":1},{"symbol":"(anonymous namespace)::run_v8()","inline":true,"imageIndex":1,"imageOffset":315148,"symbolLocation":180,"sourceLine":4453,"sourceFile":"main.cpp"},{"imageOffset":315148,"sourceLine":4495,"sourceFile":"main.cpp","symbol":"(anonymous namespace)::update(void*)","imageIndex":1,"symbolLocation":352},{"symbol":"kinc_internal_update_callback","inline":true,"imageIndex":1,"imageOffset":502752,"symbolLocation":24,"sourceLine":481,"sourceFile":"system.h"},{"imageOffset":502752,"sourceLine":584,"sourceFile":"system.h","symbol":"kinc_internal_frame","imageIndex":1,"symbolLocation":32},{"imageOffset":493072,"sourceLine":18,"sourceFile":"system.m.h","symbol":"withAutoreleasepool","imageIndex":1,"symbolLocation":28},{"imageOffset":502812,"sourceLine":596,"sourceFile":"system.h","symbol":"kinc_start","imageIndex":1,"symbolLocation":40},{"imageOffset":83300,"sourceLine":4971,"sourceFile":"main.cpp","symbol":"kickstart","imageIndex":1,"symbolLocation":1240},{"imageOffset":20620,"symbol":"start","symbolLocation":520,"imageIndex":2}]},{"id":30139673,"name":"V8 DefaultWorke","frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":3},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":4},{"imageOffset":703756,"symbol":"v8::platform::DelayedTaskQueue::GetNext()","symbolLocation":584,"imageIndex":1},{"imageOffset":702268,"symbol":"v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()","symbolLocation":44,"imageIndex":1},{"imageOffset":672292,"symbol":"v8::base::ThreadEntry(void*)","symbolLocation":100,"imageIndex":1},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":30139674,"name":"V8 DefaultWorke","frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":3},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":4},{"imageOffset":703756,"symbol":"v8::platform::DelayedTaskQueue::GetNext()","symbolLocation":584,"imageIndex":1},{"imageOffset":702268,"symbol":"v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()","symbolLocation":44,"imageIndex":1},{"imageOffset":672292,"symbol":"v8::base::ThreadEntry(void*)","symbolLocation":100,"imageIndex":1},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":30139675,"name":"V8 DefaultWorke","frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":3},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":4},{"imageOffset":703756,"symbol":"v8::platform::DelayedTaskQueue::GetNext()","symbolLocation":584,"imageIndex":1},{"imageOffset":702268,"symbol":"v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()","symbolLocation":44,"imageIndex":1},{"imageOffset":672292,"symbol":"v8::base::ThreadEntry(void*)","symbolLocation":100,"imageIndex":1},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":30139676,"name":"V8 DefaultWorke","frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":3},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":4},{"imageOffset":703756,"symbol":"v8::platform::DelayedTaskQueue::GetNext()","symbolLocation":584,"imageIndex":1},{"imageOffset":702268,"symbol":"v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()","symbolLocation":44,"imageIndex":1},{"imageOffset":672292,"symbol":"v8::base::ThreadEntry(void*)","symbolLocation":100,"imageIndex":1},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":30139677,"name":"V8 DefaultWorke","frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":3},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":4},{"imageOffset":703756,"symbol":"v8::platform::DelayedTaskQueue::GetNext()","symbolLocation":584,"imageIndex":1},{"imageOffset":702268,"symbol":"v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()","symbolLocation":44,"imageIndex":1},{"imageOffset":672292,"symbol":"v8::base::ThreadEntry(void*)","symbolLocation":100,"imageIndex":1},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":30139678,"name":"V8 DefaultWorke","frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":3},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":4},{"imageOffset":703756,"symbol":"v8::platform::DelayedTaskQueue::GetNext()","symbolLocation":584,"imageIndex":1},{"imageOffset":702268,"symbol":"v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()","symbolLocation":44,"imageIndex":1},{"imageOffset":672292,"symbol":"v8::base::ThreadEntry(void*)","symbolLocation":100,"imageIndex":1},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":30139679,"name":"V8 DefaultWorke","frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":3},{"imageOffset":30780,"symbol":"_pthread_cond_wait","symbolLocation":1236,"imageIndex":4},{"imageOffset":703756,"symbol":"v8::platform::DelayedTaskQueue::GetNext()","symbolLocation":584,"imageIndex":1},{"imageOffset":702268,"symbol":"v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run()","symbolLocation":44,"imageIndex":1},{"imageOffset":672292,"symbol":"v8::base::ThreadEntry(void*)","symbolLocation":100,"imageIndex":1},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":30139680,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":30139681,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":30139682,"queue":"com.Metal.CommandQueueDispatch","frames":[{"imageOffset":6320,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":3},{"imageOffset":7456,"symbol":"mach_msg","symbolLocation":76,"imageIndex":3},{"imageOffset":14272,"symbol":"io_connect_method","symbolLocation":512,"imageIndex":5},{"imageOffset":13656,"symbol":"IOConnectCallMethod","symbolLocation":176,"imageIndex":5},{"imageOffset":82764,"symbol":"IOGPUCommandQueueSubmitCommandBuffers","symbolLocation":144,"imageIndex":6},{"imageOffset":28520,"symbol":"-[IOGPUMetalCommandQueue _submitCommandBuffers:count:]","symbolLocation":820,"imageIndex":6},{"imageOffset":27656,"symbol":"-[IOGPUMetalCommandQueue submitCommandBuffers:count:]","symbolLocation":88,"imageIndex":6},{"imageOffset":134636,"symbol":"-[_MTLCommandQueue _submitAvailableCommandBuffers]","symbolLocation":684,"imageIndex":7},{"imageOffset":16820,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":8},{"imageOffset":30320,"symbol":"_dispatch_continuation_pop","symbolLocation":500,"imageIndex":8},{"imageOffset":108768,"symbol":"_dispatch_source_invoke","symbolLocation":1596,"imageIndex":8},{"imageOffset":46980,"symbol":"_dispatch_lane_serial_drain","symbolLocation":376,"imageIndex":8},{"imageOffset":50180,"symbol":"_dispatch_lane_invoke","symbolLocation":392,"imageIndex":8},{"imageOffset":93336,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":648,"imageIndex":8},{"imageOffset":13152,"symbol":"_pthread_wqthread","symbolLocation":288,"imageIndex":4},{"imageOffset":8320,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":4}]},{"id":30139684,"name":"CVDisplayLink","frames":[{"imageOffset":21104,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":3},{"imageOffset":30824,"symbol":"_pthread_cond_wait","symbolLocation":1280,"imageIndex":4},{"imageOffset":13184,"symbol":"CVDisplayLink::waitUntil(unsigned long long)","symbolLocation":324,"imageIndex":9},{"imageOffset":9312,"symbol":"CVDisplayLink::runIOThread()","symbolLocation":488,"imageIndex":9},{"imageOffset":29292,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":8332,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":30139685,"frames":[{"imageOffset":8312,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7477690368,
    "size" : 532480,
    "uuid" : "b25d2080-bb9e-38d6-8236-9cef4b2f11a3",
    "path" : "\/usr\/lib\/system\/libsystem_c.dylib",
    "name" : "libsystem_c.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4333568000,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "tech.kode.ArmorPaint",
    "size" : 15204352,
    "uuid" : "f1ce3a26-6a65-38b4-b9a2-1abd21ebe38d",
    "path" : "\/Users\/USER\/*\/ArmorPaint.app\/Contents\/MacOS\/ArmorPaint",
    "name" : "ArmorPaint",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4443734016,
    "size" : 393216,
    "uuid" : "38ee9fe9-b66d-3066-8c5c-6ddf0d6944c6",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7478743040,
    "size" : 229376,
    "uuid" : "a9d87740-9c1d-3468-bf60-720a8d713cba",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7478972416,
    "size" : 53248,
    "uuid" : "63c4eef9-69a5-38b1-996e-8d31b66a051d",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7523799040,
    "CFBundleShortVersionString" : "2.0.2",
    "CFBundleIdentifier" : "com.apple.framework.IOKit",
    "size" : 880640,
    "uuid" : "331182d5-f1dd-3d3e-9ede-7704eb9088cf",
    "path" : "\/System\/Library\/Frameworks\/IOKit.framework\/Versions\/A\/IOKit",
    "name" : "IOKit"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7927726080,
    "CFBundleShortVersionString" : "35.29",
    "CFBundleIdentifier" : "com.apple.IOGPU",
    "size" : 188416,
    "uuid" : "a312f393-92dd-39f9-84f4-6dfe53a5a096",
    "path" : "\/System\/Library\/PrivateFrameworks\/IOGPU.framework\/Versions\/A\/IOGPU",
    "name" : "IOGPU",
    "CFBundleVersion" : "35.29"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7622733824,
    "CFBundleShortVersionString" : "263.8",
    "CFBundleIdentifier" : "com.apple.Metal",
    "size" : 1327104,
    "uuid" : "c9c16867-61b0-314c-a0c4-d5e7837bcaed",
    "path" : "\/System\/Library\/Frameworks\/Metal.framework\/Versions\/A\/Metal",
    "name" : "Metal",
    "CFBundleVersion" : "263.8"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7477133312,
    "size" : 290816,
    "uuid" : "b3c7a004-1069-3171-b630-2c386a8b399c",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7603421184,
    "CFBundleShortVersionString" : "1.8",
    "CFBundleIdentifier" : "com.apple.CoreVideo",
    "size" : 385024,
    "uuid" : "5ae3672a-4b9a-3ef6-b310-a2d980d6ca0e",
    "path" : "\/System\/Library\/Frameworks\/CoreVideo.framework\/Versions\/A\/CoreVideo",
    "name" : "CoreVideo",
    "CFBundleVersion" : "480.1"
  }
],
  "sharedCache" : {
  "base" : 7475675136,
  "size" : 3144744960,
  "uuid" : "049b583e-d4dc-3b2b-88da-e52d6e18313d"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=848.7M resident=0K(0%) swapped_out_or_unallocated=848.7M(100%)\nWritable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nColorSync                          528K       23 \nCoreAnimation                       16K        1 \nCoreGraphics                        16K        1 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           225.3M       34 \nMALLOC guard page                  192K       11 \nMALLOC_MEDIUM (reserved)         480.0M        4         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nMemory Tag 255                   270.1M       55 \nSTACK GUARD                       56.2M       13 \nStack                             17.9M       13 \nVM_ALLOCATE                         48K        3 \n__AUTH                            1854K      163 \n__AUTH_CONST                      10.7M      309 \n__CTF                               756        1 \n__DATA                            90.6M      299 \n__DATA_CONST                      11.2M      311 \n__DATA_DIRTY                       708K      112 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       584.9M        4 \n__OBJC_CONST                      1482K      139 \n__OBJC_RO                         83.0M        1 \n__OBJC_RW                         3168K        1 \n__TEXT                           263.7M      325 \n__UNICODE                          592K        1 \ndyld private memory               1024K        1 \nmapped file                      139.9M       17 \nshared memory                      864K       15 \n===========                     =======  ======= \nTOTAL                              2.6G     1862 \nTOTAL, minus reserved VM space     1.7G     1862 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "60356660bbe37970735c5624",
      "factorPackIds" : {

      },
      "deploymentId" : 240000027
    },
    {
      "rolloutId" : "61af99aeda72d16a4beb7756",
      "factorPackIds" : {
        "SIRI_DIALOG_ASSETS" : "629fe54ebc762c0b6f758b6b"
      },
      "deploymentId" : 240000409
    }
  ],
  "experiments" : [

  ]
}
}

foxboxpdx commented 8 months ago

I was actually about to log this bug myself. Can confirm the malloc to stdlib change is required, as the current versions of MacOS/XCode no longer include malloc.

The second issue is caused by a badly-formed strcpy in zui.c on line 255: strcpy(temp, text);

This causes the program to crash on launch with a "source and destination buffer overlap" error. Changing the above line to a safer strncpy call appears to resolve this:

strncpy(temp, text, sizeof(temp));

StanleySweet commented 8 months ago

I can confirm that the .app file now starts with the strncpy(temp, text, sizeof(temp)); fix.

I'm still unable to run the application in Debug/Release from XCode though.

EDIT1: Looks like encoding is broken too.

luboslenco commented 7 months ago

Merging with https://github.com/armory3d/armortools/issues/1671, build fixes incoming. Thanks for all the details.