Commit Graph

27 Commits (e98d421aff046a2d9a9b87516779603dc170b209)

Author SHA1 Message Date
MoNTE48 e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
SmallJoker 31b863a7f2 Fix crash in log_deprecated when triggered from no function
Based on commit a1598e1b
2018-06-10 17:18:11 +02:00
sfan5 bae4de48c6 Hint at problematic code when logging deprecated calls 2018-06-03 17:32:00 +02:00
Maksim Gamarnik 919be490f9 Update
Sync all Minetest commits
2015-11-10 13:49:24 +02:00
est31 0d693d2a8c Fix crash regression when invsize formspec gets used
The invsize formspec element is outdated. Even though,
it is still supported, only a deprecation warning is shown,
introduced by commit [1]. The lua context passed to the
log_deprecated method added by commit [1] is NULL for the
invsize deprecation warning, as its run on the client and not
the server.

Commit [1] has removed checks for NULL inside the log_deprecated
method, resulting in a crash when a formspec with an invsize
element is parsed. This commit puts the check back.

Fixes #3260.

Referenced commits:

[1]: b5acec0a3c5701c53854ff7afdf4008863e6e8df "Add proper lua api deprecated handling"

[2]: 7b8d372947aae232ddf598155e972bb4dda157a "Use warningstream for deprecated field messages and refactor log_deprecated"
2015-10-17 01:29:05 +02:00
ShadowNinja 4b6c6fc976 Use warningstream for deprecated field messages and refactor log_deprecated 2015-10-15 01:14:38 -04:00
Kahrl 799adf20e9 Push error handler afresh each time lua_pcall is used
Fixes "double fault" / "error in error handling" messages
(issue #1423) and instead shows a complete backtrace.
2015-08-27 01:56:06 +02:00
Maksim Gamarnik 9247f32e0e LGPL 2.1 to 3.0 on all files 2015-08-14 01:26:28 +03:00
kwolekr 2fb4917d8e SAPI: Track last executed mod and include in error messages 2015-08-12 23:56:12 -04:00
kwolekr f1eca24ce0 Display Lua memory usage at the time of Out-of-Memory error
Also misc. minor cleanups
2015-08-10 01:38:09 -04:00
kwolekr be00c2f46a Improve Script CPP API diagnostics 2015-08-05 21:13:03 -04:00
ShadowNinja 3a97d94aa9 Add mod security
Due to compatibility concerns, this is temporarily disabled.
2015-05-31 23:17:44 +10:00
ShadowNinja 1008aefa8c Add mod security
Due to compatibility concerns, this is temporarily disabled.
2015-05-16 18:32:31 -04:00
Craig Robbins 0731f9ed2a Move globals from main.cpp to more sane locations
Move debug streams to log.cpp|h

Move GUI-related globals to clientlauncher

Move g_settings and g_settings_path to settings.cpp|h

Move g_menuclouds to clouds.cpp|h

Move g_profiler to profiler.cpp|h
2015-04-01 23:04:25 +10:00
Craig Robbins 27791ee1aa For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
Kahrl fc560cdfc1 Fix LuaJIT exception wrapper 2014-08-23 20:41:03 +02:00
ShadowNinja 9718e20bfa Use "core" namespace internally 2014-05-08 13:02:04 -04:00
sapier e2a88e15fd Add proper lua api deprecated handling 2014-04-29 22:49:04 +02:00
ShadowNinja ce942de6ed Remove lua_State parameter from LuaError::LuaError 2014-03-15 16:28:59 -04:00
ShadowNinja 56e1aa4833 Revert "Make sure we get a stacktrace for as many lua errors as possible"
This reverts commit 362ef5f6ced862daa4733034810d0b07e2ad5d89.

Stack tracebacks couldn't be generated in LuaError::LuaError anyway and this
caused a second, empty traceback in most cases.  In cases where there wasn't
annother traceback the stack had already unwound and the traceback was empty.
2014-03-15 16:01:06 -04:00
Sfan5 056e6fdec8 Make sure we get a stacktrace for as many lua errors as possible 2014-03-15 14:51:00 +01:00
ShadowNinja 4a8e393a79 Handle LuaErrors in Lua -> C++ calls on LuaJIT 2013-12-18 16:35:55 -05:00
ShadowNinja 7861d84bcb Move script_run_callbacks to Lua 2013-12-07 22:03:07 -05:00
kwolekr 466aba8337 Fix possible implicit conversion of NULL to std::string 2013-11-21 00:49:32 -05:00
ShadowNinja 5cb34cf9dd Pass a errfunc to lua_pcall to get a traceback 2013-11-15 14:13:31 -05:00
Kahrl ee90d438b8 Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
sapier 2dceda8890 Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now
be replaced by minetest.<function>(<args>).
The old way is and will stay supported for a long time.

Also:
Update and clean up lua_api.txt (by celeron55)
Move EnvRef to lua and remove add_rat and add_firefly (by kahrl)
Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
2013-05-25 00:51:02 +02:00