Abdelrazak Younes wrote:
> Bennett Helm wrote:
>> On Nov 17, 2006, at 5:59 AM, Abdelrazak Younes wrote:
>>
>>> Bennett Helm wrote:
>>>> 1.5.0 alpha crashes every time on quit on Intel Mac. Here's the
>>>> backtrace:
>>>
>>> Could you try out this patch please?
>>
>> I still get a crash. Here's the new backtrace:
>>
>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>> Reason: KERN_INVALID_ADDRESS at address: 0x8d005b76
>> 0x8d005b76 in ?? ()
>> (gdb) bt
>> #0  0x8d005b76 in ?? ()
>> #1  0x00153ab2 in lyx::IconvProcessor::convert (this=0xb95958,
>> buf=0xe34f64c "\004", buflen=53259, outbuf=0xe02500c "",
>> maxoutsize=213036) at unicode.C:123
> 
> Hum, this is weird... it seems that your lyx instance didn't pass
> through LyX::init(). Therefore, package().temp_dir() contains bullshit,
> hence the crash.
> 
> Could you please run "lyx -dbg init" and tells me what is given after
> "LyX tmp dir: `"?
> 
> Abdel.
> 
Maybe the live time of the parameter is a problem?

-- 
Peter Kümmel
Index: src/lyx_main.C
===================================================================
--- src/lyx_main.C      (revision 15949)
+++ src/lyx_main.C      (working copy)
@@ -376,9 +376,9 @@
        lyxerr[Debug::INFO] << "Deleting tmp dir " << package().temp_dir() << 
endl;
 
        if (!destroyDir(package().temp_dir())) {
+               docstring tempdir = from_utf8(package().temp_dir());
                docstring const msg =
-                       bformat(_("Unable to remove the temporary directory 
%1$s"),
-                       from_utf8(package().temp_dir()));
+                       bformat(_("Unable to remove the temporary directory 
%1$s"), tempdir);
                Alert::warning(_("Unable to remove temporary directory"), msg);
        }
 }

Reply via email to