Random Chitchat 2012-2016
@xoft I think it loads them all together, because it can check for not defined global values that are accessed. Example block type E_BLOCK_SIGN doesn't exist and it would warn then.
Thanks given by:
I want to export a class and a few methods over ManualBindings.cpp to lua, but have a few problemsConfused . I have now created a cTestclass and exported it.

On startup the server crashes at this line. Hope that someone can point out my mistake  Big Grin
Thanks given by:
Classes that are purely-manually-exported need to be registered with ToLua before adding functions into them, Have a look at how the cNetwork does it:
https://github.com/cuberite/cuberite/blo...1237-L1246
Thanks given by: Seadragon91
(10-20-2016, 09:15 PM)Seadragon91 Wrote:
Code:
local tb = {}
tb[nil] = ""

Can you elaborate on this a bit more? You put this into a command handler, or as a plugin global, or what? How does it crash the server?
Thanks given by:
Copy this 2 lines into the Initialize function of a plugin. Start the server and then run command reload a few times.

Stacktrace of a crash.
Code:
  000001a4e6557790() Unbekannt
> Cuberite.exe!mtx_do_lock(_Mtx_internal_imp_t *, const xtime *) Zeile 100 C++
  Cuberite.exe!cLuaState::cTrackedRef::Invalidate() Zeile 234 C++
  Cuberite.exe!cLuaState::Close() Zeile 492 C++
  Cuberite.exe!cPluginLua::Close() Zeile 72 C++
  Cuberite.exe!cPluginLua::Load() Zeile 171 C++
  Cuberite.exe!cPluginManager::LoadPlugin(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &) Zeile 1628 C++
  Cuberite.exe!cPluginManager::ReloadPluginsNow(cSettingsRepositoryInterface &) Zeile 134 C++
  Cuberite.exe!cPluginManager::ReloadPluginsNow() Zeile 114 C++
  Cuberite.exe!cPluginManager::Tick(float) Zeile 216 C++
  Cuberite.exe!cServer::Tick(float) Zeile 331 C++
  Cuberite.exe!cServer::cTickThread::Execute() Zeile 114 C++
  [Externer Code]
  Cuberite.exe!thread_start<unsigned int (__cdecl*)(void * __ptr64)>(void * const) Zeile 115 C++
  [Externer Code]
Thanks given by:
That doesn't seem to be related to the two lines of Lua code. I have a feeling it will crash even without them.
Thanks given by:
You are correct. If the plugin has invalid lua code, then doing the steps above will cause an crash too.
Thanks given by:
That's worth a bugreport on GitHub, then
Thanks given by:
Oh dear, one can't even enjoy a moment of peace. I've been at home for the last three days, took a vacation from work because I feel sick (but not sick enough to go to a dogtor). And now I had to go to the vet with my cat, he was unlucky in some cat street fight and got a bad wound just behind his ear. Now he has a "satellite dish" around his neckTongue And he seems to hate me for it.
Thanks given by:
Anyone has problems with github? Maybe DDoS again...
Thanks given by:




Users browsing this thread: 124 Guest(s)