Re: luacom paralyzes os.exit
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: luacom paralyzes os.exit
- From: Ignacio Burgueño <ignaciob@...>
- Date: 2010年2月28日 12:42:22 -0200
On 26/02/2010 06:16, Kenneth LO wrote:
This code will hang on my XP SP2.
require "luacom"
excel = luacom.CreateObject("Excel.Application")
os.exit()
It will exit gracefully either without the second or the third line
(or both). Of course without requiring luacom, os.exit works all the
time.
At first I suspect that it is a compilation problem. The luacom.dll
is kindly provided by Steve Donovan, which is a msvcr80 build. Then I
recompile the cvs code by cross compilation on jaunty. The same
problem still exists.
By calling os.exit, you're bypassing COM uninitialization. That usually
has all kind of different symptoms, like the hang you are seeing. Try to
do a proper cleanup first. Also, IIRC Excel.Application has a Close
method, so you can try if adding 'excel:Close()' before your exit call
is of any help. But remember, it is best to exit cleanly.
Regards,
Ignacio