I'm finally getting error logs now.
Code:
L 06/27/2016 - 04:51:53: Error log file session closed.
L 06/27/2016 - 04:59:34: SourceMod error session started
L 06/27/2016 - 04:59:34: Info (map "pl_borneo") (file "errors_20160627.log")
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
L 06/27/2016 - 04:59:34: [SM] Exception reported: Plugin not runnable
57 lines of this
But it seems to be unrelated - earlier I attempted to load two plugins at the same time that register the same native/forward library (different filename, one is old, one is a new version). That might've been what that was.
The glitch I describe is happening through server restarts, my SM is updated to the latest snapshot.
Edit:
The minimal test case doesn't fail. Well, this is missing some of the stuff my full plugin does.
PHP Code:
#pragma semicolon 1
#include <sourcemod>
static String:g_szSoundOnSpinUp[MAXPLAYERS+1][PLATFORM_MAX_PATH]; // Does not matter if this is new String: - it still breaks.
static Handle:g_hTrie;
static Handle:fFrog;
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
fFrog = CreateGlobalForward("CriticalFrog", ET_Event, Param_Cell, Param_Cell, Param_String, Param_String, Param_String);
RegPluginLibrary("__0_frog");
return APLRes_Success;
}
public OnPluginStart()
{
g_hTrie = CreateTrie();
SetTrieString(g_hTrie, "frog", "random/string/of/stuff.avi");
LogMessage("saved \"random/string/of/stuff.avi\" to trie");
PrintToChatAll("saved \"random/string/of/stuff.avi\" to trie");
RegConsoleCmd("sm_frog", Command_Frog);
}
public Action:Command_Frog(iClient, iArgs)
{
g_szSoundOnSpinUp[iClient][0] = '\0'; // This is the ONLY time that this ever gets cleared like this in the entire plugin.
GetTrieString(g_hTrie, "frog", g_szSoundOnSpinUp[iClient], sizeof(g_szSoundOnSpinUp[]));
LogMessage("loaded %s on %N", g_szSoundOnSpinUp[iClient], iClient);
PrintToChatAll("loaded %s on %N", g_szSoundOnSpinUp[iClient], iClient);
new Action:aAction = Plugin_Continue;
Call_StartForward(fFrog);
Call_PushCell(0);
Call_PushCell(iClient);
Call_PushString("meet the frogger");
Call_PushString("frog-plugin");
Call_PushString("0.1 0.2 0.3");
Call_Finish(aAction);
return Plugin_Handled;
}
public OnGameFrame()
{
static Float:flTime;
if (GetEngineTime() >= flTime)
{
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && IsPlayerAlive(i) && !IsFakeClient(i))
{
LogMessage(" \nattempting to read");
PrintToChatAll(" \nattempting to read");
if (g_szSoundOnSpinUp[i][0] != '\0')
{
LogMessage("played %s on %N", g_szSoundOnSpinUp[i], i);
PrintToChatAll("played %s on %N", g_szSoundOnSpinUp[i], i);
}
LogMessage("i hope i was able to read\n ");
PrintToChatAll("i hope i was able to read\n ");
}
}
flTime = GetEngineTime() + 3.0;
}
}
The code I practically copy pasted this from works just fine too - just it uses keyvalues instead of tries when it writes to the global string.
My plugin uses a lot of tries and arrays though, and sometimes its forwards fail... but always on the same scenarios.
And there's never error logs.
I might try testing again with some of my crappy nested adt trie array tries or w/e. But it's also loading a bunch of configs. Somewhere down the line maybe some memory somewhere is overflowing or something? idk. The kind of things that work fine make this very weird.
__________________