{"id":18111677,"url":"https://github.com/afaur/issue-test-nodobjc","last_synced_at":"2025-08-20T14:02:46.439Z","repository":{"id":83721854,"uuid":"83945538","full_name":"afaur/issue-test-nodobjc","owner":"afaur","description":"Debugging issue: https://github.com/TooTallNate/NodObjC/issues/95","archived":false,"fork":false,"pushed_at":"2017-03-05T05:14:34.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T13:56:50.073Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afaur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-05T04:47:49.000Z","updated_at":"2017-03-05T04:57:50.000Z","dependencies_parsed_at":"2023-03-12T19:37:08.615Z","dependency_job_id":null,"html_url":"https://github.com/afaur/issue-test-nodobjc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afaur%2Fissue-test-nodobjc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afaur%2Fissue-test-nodobjc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afaur%2Fissue-test-nodobjc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afaur%2Fissue-test-nodobjc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afaur","download_url":"https://codeload.github.com/afaur/issue-test-nodobjc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247452758,"owners_count":20941164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-01T01:07:09.417Z","updated_at":"2025-04-06T08:21:47.085Z","avatar_url":"https://github.com/afaur.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoreServices framework info\n\n`CoreServices` is a framework located at:\n`/System/Library/Frameworks/CoreServices.framework`\n\nLooking inside the bridgesupport file indicates that it\nincludes numerous other frameworks.\n\nOne of these is `DictionaryServices` located at:\n`/System/Library/Frameworks/CoreServices.framework/Frameworks/DictionaryServices.framework`\n\n# DictionaryServices bridgesupport parsing\n\nWhen the `.bridgesupport` file for `DictionaryServices` is parsed by `NodObjC`\nit does not properly register a method for the function `DCSCopyTextDefinition`.\n\nThe only way I was able to get `NodObjC` to register this function is by\npointing the `.bridgesupport` file to my own copy which I modified by copying\nthe xml for the function and putting it in the file twice.  \n\n```xml\n...\n\u003cfunction name='DCSCopyTextDefinition'\u003e\n\u003carg type='^{__DCSDictionary=}'/\u003e\n\u003carg type='^{__CFString=}'/\u003e\n\u003carg type='{_CFRange=ii}' type64='{_CFRange=qq}'/\u003e\n\u003cretval already_retained='true' type='^{__CFString=}'/\u003e\n\u003c/function\u003e\n\u003cfunction name='DCSCopyTextDefinition'\u003e\n\u003carg type='^{__DCSDictionary=}'/\u003e\n\u003carg type='^{__CFString=}'/\u003e\n\u003carg type='{_CFRange=ii}' type64='{_CFRange=qq}'/\u003e\n\u003cretval already_retained='true' type='^{__CFString=}'/\u003e\n\u003c/function\u003e\n...\n```\n\nThis allowed the function to be added to `NodObjC` after requiring\n`CoreServices` (`CoreServices` includes the `DictionaryServices` framework as a dependency)\n\n# NodObjC findTags function\nThis makes me believe that a problem might exist with the `findTags` function here \n(https://github.com/TooTallNate/NodObjC/blob/master/lib/import.js#L97)\n\n# Segfault issue\nAfter getting `NodObjC` to recognize the method I tried using it and got a\nsegfault and I am having trouble debugging this further.\n\n# General info\nThis repo has the code showing the error that I am getting.  I have also included\n`pryjs` and `segfault-handler` to help with debugging.\n\n# Workflow\nAfter cloning this repo make sure you run: `git submodule update --init` to\nfetch the `NodObjC` folder from my fork into the `deps/NodObjc` folder.\nTo debug this issue so far I have been making  modifications to `deps/NodObjC`\nthen running `npm run start` to test my changes. (this uses a shell script in\n`bin/clean` to reinstall `NodObjC` from the `deps/NodObjc` folder.)\n\n# Deps folder\nI included a `deps` folder where I put a modified version of `NodObjC` that causes\na custom bridgesupport file (located in the overrides folder)  to be loaded\nfor `DictionaryServices`.  This allows the `DCSCopyTextDefinition` to be detected.\n\n# Bin folder\nInside the `bin` folder is a shell script that cleans the `node_modules/NodObjC`\nfolder out and then runs `npm install` to pull it in from the `deps` folder.\n\n# Crashlog\nThe crash log is currently stored in the `debug` folder after each segfault\noccurs.\n\n# Working objective c example\nTo see the code I am translating to NodObjC please see this repo:\n`https://github.com/afaur/dict`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafaur%2Fissue-test-nodobjc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafaur%2Fissue-test-nodobjc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafaur%2Fissue-test-nodobjc/lists"}