lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Mar 29, 2015 at 7:03 PM, Jonathan Goble <jcgoble3@gmail.com> wrote:
> On Sun, Mar 29, 2015 at 6:54 PM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
>> Try changing the program to
>>         print(io.open("", ""))
>>
>> With this change, I get
>>         bad argument #2 to 'open' (invalid mode)
>> as expected.
>
>
> Again, it crashes in Lua 5.1.4 on Windows 8.1. Screenshot:
> http://snag.gy/bPlCZ.jpg

And Lua 5.1.5 on Ubuntu 14.04: http://snag.gy/d9jJI.jpg Doesn't even
throw an error.

Summary:
Lua 5.1.4/Windows 8.1 = interpreter crash
Lua 5.1.5/Ubuntu 14.04 = nothing
Lua 5.3.0/Ubuntu 14.04 = bad argument error

I suspect that the lack of catching the error in 5.1.x is the problem,
which was apparently fixed in either 5.2 or 5.3. Ubuntu is able to
recover and fail silently, but Windows can't. So this is most likely a
Windows issue. (It could also be a problem with the LuaForWindows
distribution, as that's what I'm using on my Windows machine.)