{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/orleans/issues/1157","labels_url":"https://api.github.com/repos/dotnet/orleans/issues/1157/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/1157/comments","events_url":"https://api.github.com/repos/dotnet/orleans/issues/1157/events","html_url":"https://github.com/dotnet/orleans/pull/1157","id":122419940,"number":1157,"title":"Added fallback serializer initialization to static ctor","user":{"login":"dVakulen","id":5787619,"avatar_url":"https://avatars.githubusercontent.com/u/5787619?v=3","gravatar_id":"","url":"https://api.github.com/users/dVakulen","html_url":"https://github.com/dVakulen","followers_url":"https://api.github.com/users/dVakulen/followers","following_url":"https://api.github.com/users/dVakulen/following{/other_user}","gists_url":"https://api.github.com/users/dVakulen/gists{/gist_id}","starred_url":"https://api.github.com/users/dVakulen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dVakulen/subscriptions","organizations_url":"https://api.github.com/users/dVakulen/orgs","repos_url":"https://api.github.com/users/dVakulen/repos","events_url":"https://api.github.com/users/dVakulen/events{/privacy}","received_events_url":"https://api.github.com/users/dVakulen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/orleans/labels/cla-already-signed","name":"cla-already-signed","color":"009800"},{"url":"https://api.github.com/repos/dotnet/orleans/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-16T03:29:26Z","updated_at":"2015-12-22T19:26:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/1157","html_url":"https://github.com/dotnet/orleans/pull/1157","diff_url":"https://github.com/dotnet/orleans/pull/1157.diff","patch_url":"https://github.com/dotnet/orleans/pull/1157.patch"},"body":"Will help avoid issues with ```NullReferenceException``` when using ```SerializationManager``` without calling ```Initialize``` method first. "},"comment":{"url":"https://api.github.com/repos/dotnet/orleans/issues/comments/166709100","html_url":"https://github.com/dotnet/orleans/pull/1157#issuecomment-166709100","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/1157","id":166709100,"user":{"login":"gabikliot","id":10171207,"avatar_url":"https://avatars.githubusercontent.com/u/10171207?v=3","gravatar_id":"","url":"https://api.github.com/users/gabikliot","html_url":"https://github.com/gabikliot","followers_url":"https://api.github.com/users/gabikliot/followers","following_url":"https://api.github.com/users/gabikliot/following{/other_user}","gists_url":"https://api.github.com/users/gabikliot/gists{/gist_id}","starred_url":"https://api.github.com/users/gabikliot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabikliot/subscriptions","organizations_url":"https://api.github.com/users/gabikliot/orgs","repos_url":"https://api.github.com/users/gabikliot/repos","events_url":"https://api.github.com/users/gabikliot/events{/privacy}","received_events_url":"https://api.github.com/users/gabikliot/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T19:26:57Z","updated_at":"2015-12-22T19:26:57Z","body":"Of course `BufferPool` is used by `SerializationManager`. When serializing, `SerializationManager` needs to copy bytes into buffers. It gets the buffers from the buffer pool, via the byte stream writer.\r\n\r\n>AssemblyProcessor.Initialize() theoretically can be moved from both InitializeForTesting and Initialize to the static constructor.\r\n\r\nSo that was my original point in the beginning: we don't want 2 different ways to initialize `SerializationManager`. Either via `InitializeForTesting` or without it, but not both ways \"kind of work\". So either we move `AssemblyProcessor.Initialize()`, or its not important and we remove it from `InitializeForTesting`."}}