# File path search causes NilObjectException

**URL:** <https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730>\
**Category:** macOS\
**Created:** [March 11, 2020, 4:30pm UTC](https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730 "2020-03-11T16:30:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malcolm\_Wooden](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@Malcolm\_Wooden](https://forum.xojo.com/u/Malcolm_Wooden)\
**Post date:** [March 11, 2020, 4:30pm UTC](https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730/1 "2020-03-11T16:30:10Z")

</div>

I have a program that I made in Xojo which runs fine on my machines. I want to share it with a work collegue but when I do it will crash with:  
“An exception of class:NilObjectException was not handled. The application must shut down.”

It seems to do this very early in its runtime and I have deduced that it’s when the program is searching for some filepaths to some Python modules required to perform some of the tasks of the program e.g. /Library/Frameworks/Python.framework/Versions/3.7/bin/TTX

Is there something about this kind of searching that will make the Mac OS kill the program?  
I’m running Mojave, my collegue is running Catalina.

---

<div class="post-metadata">

**Author:** ![Kem\_Tekinay](https://forum.xojo.com/user_avatar/forum.xojo.com/kem_tekinay/32/154_2.png) [@Kem\_Tekinay](https://forum.xojo.com/u/Kem_Tekinay)\
**Post date:** [March 11, 2020, 4:34pm UTC](https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730/2 "2020-03-11T16:34:56Z")

</div>

If you know the file exists, it might be a permissions issue in Catalina. Give your app full disk access through System Preferences and see what happens.

---

<div class="post-metadata">

**Author:** ![Malcolm\_Wooden](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@Malcolm\_Wooden](https://forum.xojo.com/u/Malcolm_Wooden)\
**Post date:** [March 11, 2020, 4:58pm UTC](https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730/3 "2020-03-11T16:58:56Z")

</div>

Thank you very much for that suggestion Kem. We have already tried that amongst other security features in the System Prefs.

---

<div class="post-metadata">

**Author:** ![Kem\_Tekinay](https://forum.xojo.com/user_avatar/forum.xojo.com/kem_tekinay/32/154_2.png) [@Kem\_Tekinay](https://forum.xojo.com/u/Kem_Tekinay)\
**Post date:** [March 11, 2020, 5:02pm UTC](https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730/4 "2020-03-11T17:02:30Z")

</div>

Can you do a remote debug on that machine and trace through the code?

---

<div class="post-metadata">

**Author:** ![Norman\_Palardy](https://forum.xojo.com/user_avatar/forum.xojo.com/norman_palardy/32/169_2.png) [@Norman\_Palardy](https://forum.xojo.com/u/Norman_Palardy)\
**Post date:** [March 11, 2020, 5:02pm UTC](https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730/5 "2020-03-11T17:02:54Z")

</div>

Are you sure that /Library/Frameworks/Python.framework/Versions/3.7/bin/TTX exists in that location on 10.15 ?  
If it doesnt that might explain the nil object exception

---

<div class="post-metadata">

**Author:** ![Malcolm\_Wooden](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@Malcolm\_Wooden](https://forum.xojo.com/u/Malcolm_Wooden)\
**Post date:** [March 11, 2020, 5:40pm UTC](https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730/6 "2020-03-11T17:40:28Z")

</div>

Thank you Kem, I’ll have a go at remote debugging.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [April 29, 2021, 4:19pm UTC](https://forum.xojo.com/t/file-path-search-causes-nilobjectexception/52730/7 "2021-04-29T16:19:04Z")

</div>


