Bug 98913 - XQuartz crash in the presence of CDPATH environment variable setting in $HOME/.profile
Summary: XQuartz crash in the presence of CDPATH environment variable setting in $HOME...
Alias: None
Product: XQuartz
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 2.7.11 (xserver-1.18.4)
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: Jeremy Huddleston Sequoia
QA Contact: Jeremy Huddleston Sequoia
Depends on:
Reported: 2016-11-30 14:31 UTC by Martyn Johnson
Modified: 2016-12-05 01:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Contents of problem report window (46.20 KB, text/plain)
2016-11-30 14:31 UTC, Martyn Johnson

Description Martyn Johnson 2016-11-30 14:31:34 UTC
Created attachment 128285 [details]
Contents of problem report window

I have some shell code in my .profile file which sets the CDPATH environment variable to a string of paths, for convenience when using the "cd" command interactively.

The string ends up set to the following value:


This appears to cause XQuartz to crash at startup. If I remove the code setting CDPATH, it works fine.

I have attached the contents of the problem report window which appears when XQuartz crashes.

Obviously removing the CDPATH setting is a workaround but I do find it useful.
Comment 1 Jeremy Huddleston Sequoia 2016-12-01 10:11:11 UTC
This has nothing to do with CDPATH.  This crash report indicates that the HOME environment variable is set to "/".
Comment 2 Martyn Johnson 2016-12-01 10:25:06 UTC
What you say may well be true, but _I_ did not set HOME=/

As I said, my .profile contains code which sets CDPATH, and XQuartz crashes.

If I remove this code, or add the line "unset CDPATH" after it, everything works.

If HOME is being set, something must be setting it as a side effect.

I am at a loss to understand how .profile comes into it at all. I am invoking XQuartz directly from the desktop and am not knowingly running a shell at that point. What would invoke .profile?

I am simply describing what I observe.  Have you tried reproducing it?
Comment 3 Martyn Johnson 2016-12-04 12:47:06 UTC
Could you please take a closer look at this?

I have described the symptoms exactly as I observe them, so it seems unhelpful to instantly dismiss the problem as "nothing to do with" the actions that appear to provoke the problem for me. In any case, a crash is still a crash.

Simply saying that there is no bug does not help me to solve the problem.
Comment 4 Jeremy Huddleston Sequoia 2016-12-05 01:56:29 UTC
I added this to my ~/.profile:

export CDPATH=:..:../..:../../..:../../../..:../../../../..:../../../../../..:../../../../../../..:../../../../../../../..:/Users/jeremy

Everything behaved just fine.
Comment 5 Jeremy Huddleston Sequoia 2016-12-05 01:56:56 UTC
If you want some support with your configuration, please ask for help on the x11-users mailing list.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.