On Fri, Apr 28, 2006 at 10:24:09PM +0200, Abdelrazak Younes wrote:

> I have put another package which contains the exe and the needed 
> runtimes dll:
> http://younes.a.free.fr/Lyx-15-experimental/lyx-qt4-exe-and-dlls.zip

Abdel,

I tried your LyX/Qt4 and got a bug report for you.

After launching lyx from a cmd.exe terminal, I hit the open file icon
and lyx crashed. Please, attached find a backtrace.

Lyx did not automatically run configure at start, but it asked me if I
wanted the userdir created. Indeed the userdir was empty, so I tried
Tools->Reconfigure but it hung.

I saw a stalled latex process and after killing it the reconfiguration
process went ahead. However, lyx continues crashing when I try to load
a file.

I use all cygwin apps but native miktex and imagemagick. So I tried
running lyx from a cygwin shell and this time the reconfiguration
doesn't stopped and went stright ahead to the end. Still crashes when
trying to open a file, though.

I also tried running the native lyx 1.4.1 I build by myself from a
cmd.exe terminal and it worked flawlessly, but the cygwin lyx 1.5 also
hangs on reconfigure when run from cmd.exe. This pointed me to a
problem with configure.py.

After some investigation it turned out that the python mkstemp()
function uses the directory defined in the TEMP environment variable
if it is set. In a cygwin shell TEMP is not set, so /tmp is used, but
in a cmd.exe TEMP is set to a path in short form dos style
containing '~' characters and this hurts latex.

Please, can you see if the attached patch can be applied to both trunk
and branch?

Thank you.

-- 
Enrico
C:\Programmi\lyx-svn\bin>gdb lyx.exe
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) run
Starting program: /c/Programmi/lyx-svn/bin/lyx.exe
Language code:C
Setting new locale for Qt:C
lyx: Disabling LyX socket.

Program received signal SIGSEGV, Segmentation fault.
0x00c2ae6e in ZNK7QString7trimmedEv ()
   from /c/Programmi/lyx-svn/bin/QtCore4.dll
(gdb) bt
#0  0x00c2ae6e in ZNK7QString7trimmedEv ()
   from /c/Programmi/lyx-svn/bin/QtCore4.dll
#1  0x1015247f in ZN12Q3FileDialog6goBackEv ()
   from /c/Programmi/lyx-svn/bin/Qt3Support4.dll
#2  0x1013604c in ZN12Q3FileDialog16doMimeTypeLookupEv ()
   from /c/Programmi/lyx-svn/bin/Qt3Support4.dll
#3  0x10154210 in ZN12Q3FileDialog11qt_metacallEN11QMetaObject4CallEiPPv ()
   from /c/Programmi/lyx-svn/bin/Qt3Support4.dll
#4  0x00716b8b in LyXFileDialog::qt_metacall ()
#5  0x00cdfc7e in ZN11QMetaObject8activateEP7QObjectiiPPv ()
#6  0x00d00d96 in ZN6QTimer7timeoutEv ()
#7  0x00cddc19 in ZN7QObject5eventEP6QEvent ()
#8  0x00d99d79 in ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent ()
   from /c/Programmi/lyx-svn/bin/QtGui4.dll
#9  0x00d99f27 in ZN12QApplication6notifyEP7QObjectP6QEvent ()
   from /c/Programmi/lyx-svn/bin/QtGui4.dll
#10 0x00cf0115 in ZN21QEventDispatcherWin325eventEP6QEvent ()
#11 0x00d99d79 in ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent ()
   from /c/Programmi/lyx-svn/bin/QtGui4.dll
#12 0x00d99f27 in ZN12QApplication6notifyEP7QObjectP6QEvent ()
   from /c/Programmi/lyx-svn/bin/QtGui4.dll
#13 0x00ccf7e0 in ZN16QCoreApplication16sendPostedEventsEP7QObjecti ()
#14 0x00e02be2 in Z25qWinProcessConfigRequestsv ()
#15 0x00cc95e9 in ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagE-
--Type <return> to continue, or q <return> to quit---
E ()
#16 0x00cc97cf in ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE ()
#17 0x01108268 in ZN7QDialog4execEv ()
#18 0x006fef5e in FileDialog::open ()
#19 0x004f8653 in LyXFunc::open ()
#20 0x004fecb2 in LyXFunc::dispatch ()
#21 0x0076d5a4 in lyx::frontend::QLAction::action ()
#22 0x007d0eb2 in lyx::frontend::QLAction::qt_metacall ()
(gdb)
Index: lib/configure.py
===================================================================
--- lib/configure.py    (revision 13782)
+++ lib/configure.py    (working copy)
@@ -82,7 +82,7 @@ def checkCygwinPath(srcdir):
   ''' Adjust PATH for Win32 (Cygwin) '''
   if sys.platform == 'cygwin':
     from tempfile import mkstemp
-    fd, tmpfname = mkstemp(suffix='.ltx')
+    fd, tmpfname = mkstemp(suffix='.ltx', dir='/tmp')
     os.write(fd, r'''
 \documentstyle{article}
 \begin{document}\end{document}
@@ -90,7 +90,7 @@ def checkCygwinPath(srcdir):
     os.close(fd)
     inpname = cmdOutput('cygpath -m ' + tmpfname)
     # a wrapper file
-    wfd, wtmpfname = mkstemp(suffix='.ltx')
+    wfd, wtmpfname = mkstemp(suffix='.ltx', dir='/tmp')
     wtmpfname = cmdOutput('cygpath -m ' + wtmpfname)
     os.write(wfd, r'\input{' + inpname + '}' )
     os.close(wfd)

Reply via email to