On Tue, Aug 25, 2026 at 12:24:54PM +0200, Pavel Sanda wrote:
> On Tue, Aug 25, 2026 at 03:49:03PM +1000, Mark Dransfield via lyx-devel wrote:
> > Last week I upgraded from Lyx 2.4 to Lyx 2.5 but, on my Mac Studio, it
> > crashes every time I try to start it up. Strangely, it works just fine on
> > my MacBook Air. I have no idea why and am hoping for suggestions for things
> > to try.
>
> ..
>
> > 3 lyx 0x102ec2a48 lyx::lyx_exit(int) +
> > 20
> > 4 lyx 0x1033627d8
> > lyx::doAssertWithCallstack(bool) + 48
> > 5 lyx 0x1033504f0
> > lyx::support::FileName::isDirWritable() const + 380
> > 6 lyx 0x103357d64
> > lyx::support::createLyXTmpDir(lyx::support::FileName const&) + 172
>
> Maybe stalled temp dir from the old lyx version?
>
> Whats is the output for:
> grep -i tempdir ~/Library/Application\ Support/LyX-2.5/preferences
> echo $TMPDIR
>
> Possible workaround - try to remove path to temporary directory in
> Preferences dialog
> (or go directly for \tempdir_path line in preferences file).
>
> Please report back, we might try to get long term fix for this.
We'll see if we get the answer, but hard assert is triggered there if
dead link, plain file or missing parent are entered as a directory.
We should probably add the attached at least to master.
Pavel
diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index a4986f1ba2..c1910c74fe 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -560,10 +560,15 @@ FileName const createLyXTmpDir(FileName const & deflt)
if (deflt.empty() || deflt == package().system_temp_dir())
return createTmpDir(package().system_temp_dir(), "lyx_tmpdir");
+ // TODO cross-platform divergence flagged - check needed on non existent
+ // parent dirs - on windows creates missing parents(to check), on linux
+ // mkdir fails and we fallback to system temp below
if (deflt.createDirectory(0777))
return deflt;
- if (deflt.isDirWritable()) {
+ // check dir first - dead link, plain file or missing parent dir will make
+ // isDirWritable assert (crash from user's POV)
+ if (deflt.isDirectory() && deflt.isDirWritable()) {
// deflt could not be created because it
// did exist already, so let's create our own
// dir inside deflt.
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel