"open /Applications/Mozc/DictionaryTool.app" immediately crashes · Issue #791 · google/mozc · GitHub
Skip to content

"open /Applications/Mozc/DictionaryTool.app" immediately crashes #791

Closed

Description

@yukawa

Description

In macOS, open /Applications/Mozc/DictionaryTool.app immediately crashes.

Steps to reproduce

Steps to reproduce the behavior:

git clone https://github.com/google/mozc.git
cd mozc/src

python3 build_tools/update_deps.py

python3 build_tools/build_qt.py --release --confirm_license

MOZC_QT_PATH=${PWD}/third_party/qt bazel build package --config oss_macos -c opt
open bazel-bin/Mac/Mozc.pkg

# complete the setup

open /Applications/Mozc/DictionaryTool.app

Expected behavior

You can open the dictionary tool without any crash.

Actual behavior

It immediately crashes.

Screenshots

DictionaryTool

Version or commit-id

aa082de

Environment

  • OS: macOS 13.5

Additional context

Looks like /Library/Input Methods/Mozc.app/Contents/Resources/DictionaryTool.app/Contents/ doesn't have Frameworks directory, while /Library/Input Methods/Mozc.app/Contents/Resources/ConfigDialog.app/Contents/Frameworks/ does exist.

Activity

  1. yukawa commented on Aug 18, 2023

    @yukawa
    CollaboratorAuthor

    Looks to be related to code signing. Here is the error log as of 89c7008.

    Hardware Model:      MacBookPro17,1
    Process:             DictionaryTool [22768]
    Path:                /Library/Input Methods/Mozc.app/Contents/Resources/DictionaryTool.app/Contents/MacOS/DictionaryTool
    Identifier:          org.mozc.inputmethod.Japanese.Tool.DictionaryTool
    Version:             2.29.5200 (2.29.5200.101)
    Code Type:           ARM-64 (Native)
    Role:                Unspecified
    Parent Process:      bash [22755]
    Coalition:           com.apple.Terminal [508]
    Responsible Process: Terminal [467]
    
    Date/Time:           2023-08-18 13:16:28.8722 -0700
    Launch Time:         2023-08-18 13:16:28.8680 -0700
    OS Version:          macOS 13.5 (22G74)
    Release Type:        User
    Report Version:      104
    
    Exception Type:  EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
    Exception Subtype: UNKNOWN_0x32 at 0x0000000104b48000
    Exception Codes: 0x0000000000000032, 0x0000000104b48000
    VM Region Info: 0x104b48000 is in 0x104b48000-0x104db0000;  bytes after start: 0  bytes before end: 2523135
          REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
          UNUSED SPACE AT START
    --->  __TEXT                      104b48000-104db0000    [ 2464K] r-x/r-x SM=COW  
          __DATA_CONST                104db0000-104dc0000    [   64K] rw-/rw- SM=COW  
    Termination Reason: CODESIGNING 2 Invalid Page
    
    Triggered by Thread:  0
    
    Thread 0 Crashed:
    0                                 	       0x10517e1e4 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 52
    1                                 	       0x1051801cc dyld3::MachOFile::forEachSupportedPlatform(void (dyld3::Platform, unsigned int, unsigned int) block_pointer) const + 160
    2                                 	       0x1051d1e0c dyld3::MachOFile::isBuiltForSimulator() const + 124
    3                                 	       0x1051818e4 start + 632
    
    
    Thread 0 crashed with ARM Thread State (64-bit):
        x0: 0x0000000104b48000   x1: 0x000000016b2b7498   x2: 0x000000016b2b7440   x3: 0x000000010517de24
        x4: 0x0000000000000070   x5: 0x0000000000000073   x6: 0x0000000000000000   x7: 0x0000000000000a40
        x8: 0x000000016b2b7478   x9: 0x000000010520f530  x10: 0x00000001051fa000  x11: 0x00000001052069b9
       x12: 0x0000000000000065  x13: 0x0000000000000073  x14: 0x0000000000056250  x15: 0x0000000000000000
       x16: 0x000000010518026c  x17: 0x6ae100016b2b7440  x18: 0x0000000000000000  x19: 0x000000016b2b7498
       x20: 0x0000000104b48000  x21: 0x000000016b2b7440  x22: 0x000000016b2b7678  x23: 0x000000016b2b7650
       x24: 0x000000016b2b75d0  x25: 0x0000000000000000  x26: 0x0000000000000000  x27: 0x0000000000000000
       x28: 0x0000000000000000   fp: 0x000000016b2b7430   lr: 0x99178001051801cc
        sp: 0x000000016b2b73a0   pc: 0x000000010517e1e4 cpsr: 0x80001000
       far: 0x0000000104b48000  esr: 0x92000007 (Data Abort) byte read Translation fault
    
    Binary Images:
           0x10517c000 -        0x10520bfff  (*) <e7a99595-e0f8-34af-be8b-9347d0d658a4> ???
           0x104b48000 -        0x104daffff  (*) <5a9efa28-b171-3cbb-8fc3-d8d4c2f076bc> ???
    
    Error Formulating Crash Report:
    dyld_process_snapshot_get_shared_cache failed
    
  2. kahunsyo commented on Jan 30, 2024

    @kahunsyo

    The same crash occured in

    WordRegisterDialog.app
    DictionaryTool.app
    ErrorMessageDialog.app
    AboutDialog.app
    MozcPrelauncher.app
    

    As described in the error logs above, there are invalied codesigns.

    I signed these apps using a self-certificate with the following command.

    sudo codesign --force --sign seft_cert /Library/Input Methods/Mozc.app/Contents/Resources/WordRegisterDialog.app
    sudo codesign --force --sign seft_cert /Library/Input Methods/Mozc.app/Contents/Resources/DictionaryTool.app
    sudo codesign --force --sign seft_cert /Library/Input Methods/Mozc.app/Contents/Resources/ErrorMessageDialog.app
    sudo codesign --force --sign seft_cert /Library/Input Methods/Mozc.app/Contents/Resources/AboutDialog.app
    sudo codesign --force --sign seft_cert /Library/Input Methods/Mozc.app/Contents/Resources/MozcPrelauncher.app
    

    After signing, no crashes occured.

  3. kahunsyo commented on Jan 30, 2024

    @kahunsyo

    This crash occurred on Apple Silicon.
    There are no crashes when using Rosetta on Apple Silicon.

  4. siketyan commented on Mar 14, 2024

    @siketyan
    Contributor

    Experiencing the same issue. Installed from the pkg built in https://github.com/google/mozc/actions/runs/8263259518. ConfigDialog can be opened successfully.

    Crash Log
    -------------------------------------
    Translated Report (Full Report Below)
    -------------------------------------
    
    Incident Identifier: 33141774-86FD-4EFC-A18E-6AA17531A33E
    CrashReporter Key:   AF147A7A-C6C5-A270-D833-7A4CD8A7E744
    Hardware Model:      Mac13,1
    Process:             AboutDialog [40964]
    Path:                /Library/Input Methods/Mozc.app/Contents/Resources/AboutDialog.app/Contents/MacOS/AboutDialog
    Identifier:          org.mozc.inputmethod.Japanese.Tool.AboutDialog
    Version:             2.29.5374 (2.29.5374.101)
    Code Type:           ARM-64 (Native)
    Role:                Default
    Parent Process:      launchd [1]
    Coalition:           org.mozc.inputmethod.Japanese.Tool.AboutDialog [211418]
    
    Date/Time:           2024-03-14 16:52:43.4914 +0900
    Launch Time:         2024-03-14 16:52:43.4541 +0900
    OS Version:          macOS 14.3.1 (23D60)
    Release Type:        User
    Report Version:      104
    
    Exception Type:  EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
    Exception Subtype: UNKNOWN_0x32 at 0x0000000100adc000
    Exception Codes: 0x0000000000000032, 0x0000000100adc000
    VM Region Info: 0x100adc000 is in 0x100adc000-0x100fec000;  bytes after start: 0  bytes before end: 5308415
          REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
          UNUSED SPACE AT START
    --->  __TEXT                      100adc000-100fec000    [ 5184K] r-x/r-x SM=COW  
          __DATA_CONST                100fec000-100ff8000    [   48K] rw-/rw- SM=COW  
    Termination Reason: CODESIGNING 2 Invalid Page
    
    Triggered by Thread:  0
    
    Thread 0 Crashed:
    0                                 	       0x1019f6204 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 52
    1                                 	       0x1019f82ac dyld3::MachOFile::forEachSupportedPlatform(void (dyld3::Platform, unsigned int, unsigned int) block_pointer) const + 160
    2                                 	       0x101a4e2e4 dyld3::MachOFile::isBuiltForSimulator() const + 124
    3                                 	       0x1019f9b88 start + 992
    
    
    Thread 0 crashed with ARM Thread State (64-bit):
        x0: 0x0000000100adc000   x1: 0x000000016f322f08   x2: 0x000000016f322eb0   x3: 0x00000001019f5e43
        x4: 0x0000000000000070   x5: 0x0000000000000073   x6: 0x0000000000000000   x7: 0x0000000000000ca0
        x8: 0x000000016f322ee8   x9: 0x0000000101a8f5f8  x10: 0x0000000101a77000  x11: 0x0000000101a847af
       x12: 0x0000000000000065  x13: 0x0000000000000073  x14: 0x0000000000058a70  x15: 0x0000000000000000
       x16: 0x00000001019f834c  x17: 0x6ae100016f322eb0  x18: 0x0000000000000000  x19: 0x000000016f322f08
       x20: 0x0000000100adc000  x21: 0x000000016f322eb0  x22: 0x00000001019f4000  x23: 0x000000016f323068
       x24: 0x000000016f323040  x25: 0x0000000000000000  x26: 0x0000000000000000  x27: 0x0000000000000000
       x28: 0x0000000000000000   fp: 0x000000016f322ea0   lr: 0x5c380001019f82ac
        sp: 0x000000016f322e10   pc: 0x00000001019f6204 cpsr: 0x80001000
       far: 0x0000000100adc000  esr: 0x92000007 (Data Abort) byte read Translation fault
    
    Binary Images:
           0x1019f4000 -        0x101a8bfff  (*) <50746901-db0e-39a0-b391-baaa6b82ad0f> ???
           0x100adc000 -        0x100febfff  (*) <74c1453e-9222-36e3-82c2-fb1552ad770d> ???
                   0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
    
    Error Formulating Crash Report:
    dyld_process_snapshot_get_shared_cache failed
    
    EOF
    
    -----------
    Full Report
    -----------
    
    {"app_name":"AboutDialog","timestamp":"2024-03-14 16:52:43.00 +0900","app_version":"2.29.5374","slice_uuid":"74c1453e-9222-36e3-82c2-fb1552ad770d","build_version":"2.29.5374.101","platform":0,"bundleID":"org.mozc.inputmethod.Japanese.Tool.AboutDialog","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.3.1 (23D60)","roots_installed":0,"name":"AboutDialog","incident_id":"33141774-86FD-4EFC-A18E-6AA17531A33E"}
    {
      "uptime" : 1200000,
      "procRole" : "Default",
      "version" : 2,
      "userID" : 501,
      "deployVersion" : 210,
      "modelCode" : "Mac13,1",
      "coalitionID" : 211418,
      "osVersion" : {
        "train" : "macOS 14.3.1",
        "build" : "23D60",
        "releaseType" : "User"
      },
      "captureTime" : "2024-03-14 16:52:43.4914 +0900",
      "codeSigningMonitor" : 1,
      "incident" : "33141774-86FD-4EFC-A18E-6AA17531A33E",
      "pid" : 40964,
      "translated" : false,
      "cpuType" : "ARM-64",
      "roots_installed" : 0,
      "bug_type" : "309",
      "procLaunch" : "2024-03-14 16:52:43.4541 +0900",
      "procStartAbsTime" : 31169183589908,
      "procExitAbsTime" : 31169183970461,
      "procName" : "AboutDialog",
      "procPath" : "\/Library\/Input Methods\/Mozc.app\/Contents\/Resources\/AboutDialog.app\/Contents\/MacOS\/AboutDialog",
      "bundleInfo" : {"CFBundleShortVersionString":"2.29.5374","CFBundleVersion":"2.29.5374.101","CFBundleIdentifier":"org.mozc.inputmethod.Japanese.Tool.AboutDialog"},
      "storeInfo" : {"deviceIdentifierForVendor":"53C3568C-B64F-5C4A-A4B5-486E95BE752B","thirdParty":true},
      "parentProc" : "launchd",
      "parentPid" : 1,
      "coalitionName" : "org.mozc.inputmethod.Japanese.Tool.AboutDialog",
      "crashReporterKey" : "AF147A7A-C6C5-A270-D833-7A4CD8A7E744",
      "codeSigningID" : "",
      "codeSigningTeamID" : "",
      "codeSigningFlags" : 16777728,
      "codeSigningValidationCategory" : 0,
      "codeSigningTrustLevel" : 4294967295,
      "instructionByteStream" : {"beforePC":"+mcFqfhfBqn2Vwep9E8Iqf17Can9QwKR9QMCqvMDAar0AwCq\/\/8AOQ==","atPC":"CABAuelZn1Kp3b9yHwEJa+AAAFTJWZ9Sqd2\/ch8BCWthAQBUiQOAUg=="},
      "sip" : "enabled",
      "vmRegionInfo" : "0x100adc000 is in 0x100adc000-0x100fec000;  bytes after start: 0  bytes before end: 5308415\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  __TEXT                      100adc000-100fec000    [ 5184K] r-x\/r-x SM=COW  \n      __DATA_CONST                100fec000-100ff8000    [   48K] rw-\/rw- SM=COW  ",
      "exception" : {"codes":"0x0000000000000032, 0x0000000100adc000","rawCodes":[50,4306354176],"type":"EXC_BAD_ACCESS","signal":"SIGKILL (Code Signature Invalid)","subtype":"UNKNOWN_0x32 at 0x0000000100adc000"},
      "termination" : {"flags":0,"code":2,"namespace":"CODESIGNING","indicator":"Invalid Page"},
      "vmregioninfo" : "0x100adc000 is in 0x100adc000-0x100fec000;  bytes after start: 0  bytes before end: 5308415\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  __TEXT                      100adc000-100fec000    [ 5184K] r-x\/r-x SM=COW  \n      __DATA_CONST                100fec000-100ff8000    [   48K] rw-\/rw- SM=COW  ",
      "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
      "faultingThread" : 0,
      "threads" : [{"triggered":true,"id":18448251,"threadState":{"x":[{"value":4306354176},{"value":6160527112},{"value":6160527024},{"value":4322188867},{"value":112},{"value":115},{"value":0},{"value":3232},{"value":6160527080},{"value":4322817528,"symbolLocation":0,"symbol":"__block_descriptor_tmp.61"},{"value":4322717696,"symbolLocation":20,"symbol":"objc_visitor::ProtocolList::getProtocolField(objc_visitor::Visitor const&, unsigned long long) const (.cold.2)"},{"value":4322772911},{"value":101},{"value":115},{"value":363120},{"value":0},{"value":4322198348,"symbolLocation":0,"symbol":"invocation function for block in dyld3::MachOFile::forEachSupportedPlatform(void (dyld3::Platform, unsigned int, unsigned int) block_pointer) const"},{"value":7701436843940785840},{"value":0},{"value":6160527112},{"value":4306354176},{"value":6160527024},{"value":4322181120},{"value":6160527464},{"value":6160527424},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6645061254507365036},"cpsr":{"value":2147487744},"fp":{"value":6160527008},"sp":{"value":6160526864},"esr":{"value":2449473543,"description":"(Data Abort) byte read Translation fault"},"pc":{"value":4322189828,"matchesCrashFrame":1},"far":{"value":4306354176}},"frames":[{"imageOffset":8708,"symbol":"dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const","symbolLocation":52,"imageIndex":0},{"imageOffset":17068,"symbol":"dyld3::MachOFile::forEachSupportedPlatform(void (dyld3::Platform, unsigned int, unsigned int) block_pointer) const","symbolLocation":160,"imageIndex":0},{"imageOffset":369380,"symbol":"dyld3::MachOFile::isBuiltForSimulator() const","symbolLocation":124,"imageIndex":0},{"imageOffset":23432,"symbol":"start","symbolLocation":992,"imageIndex":0}]}],
      "usedImages" : [
      {
        "source" : "P",
        "arch" : "arm64e",
        "base" : 4322181120,
        "size" : 622592,
        "uuid" : "50746901-db0e-39a0-b391-baaa6b82ad0f",
        "name" : ""
      },
      {
        "source" : "P",
        "arch" : "arm64",
        "base" : 4306354176,
        "size" : 5308416,
        "uuid" : "74c1453e-9222-36e3-82c2-fb1552ad770d",
        "name" : ""
      },
      {
        "size" : 0,
        "source" : "A",
        "base" : 0,
        "uuid" : "00000000-0000-0000-0000-000000000000"
      }
    ],
      "vmSummary" : "ReadOnly portion of Libraries: Total=15.0M resident=0K(0%) swapped_out_or_unallocated=15.0M(100%)\nWritable regions: Total=8192K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8192K(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nSTACK GUARD                       56.0M        1 \nStack                             8176K        1 \n__DATA                             144K        3 \n__DATA_CONST                        80K        2 \n__DATA_DIRTY                        16K        1 \n__LINKEDIT                        9568K        2 \n__TEXT                            5792K        2 \n===========                     =======  ======= \nTOTAL                             79.2M       12 \n",
      "legacyInfo" : {
      "threadTriggered" : {
    
      }
    },
      "logWritingSignature" : "fef247d293f32139f5542ed305d28947b7c20db7",
      "trialInfo" : {
      "rollouts" : [
        {
          "rolloutId" : "632e3df958740028737bffc0",
          "factorPackIds" : {
            "SIRI_UNDERSTANDING_NL_OVERRIDES" : "65e878bc12edf62098adc9e8"
          },
          "deploymentId" : 240000652
        },
        {
          "rolloutId" : "65a8173205d942272410674b",
          "factorPackIds" : {
    
          },
          "deploymentId" : 240000001
        }
      ],
      "experiments" : [
        {
          "treatmentId" : "00f62786-ceb5-418f-a586-adcc2922cf89",
          "experimentId" : "65d62240cb0e2417d11ce6e1",
          "deploymentId" : 400000001
        }
      ]
    },
      "reportNotes" : [
      "dyld_process_snapshot_get_shared_cache failed"
    ]
    }
    
  5. hiroyuki-komatsu commented on Apr 30, 2024

    @hiroyuki-komatsu
    Collaborator

    Hi all, thank you for your reports and investigations!

    fb04bfe is the fix of this issue.
    Please let us know if this change works on your environment.

    Best,

  6. siketyan commented on May 6, 2024

    @siketyan
    Contributor

    Tried a build at 403361d (Artifacts from https://github.com/google/mozc/actions/runs/8887620183) and it worked on my environment. Thank you for the quick fix of this issue!

  7. added a commit that references this issue on Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions