Search Instagram Twitter Facebook Spotify Grid Tag Date Folder Chat Pencil

Weird “invalid serialized file header” Bug

I’ve recently fallen into a particular routine (this always happens right before a big convention, and PSX is right around the corner).

Basically, I wake up at around 10am. Check in with David about about updates to the game, what needs to get worked on, bugs that need to get fixed, etc. From then until 4pm, I’m basically working on admin stuff – updating devlog, writing emails, doing any writing that needs to be done (applications, game submissions, press interviews, etc), managing calendar, finances, etc, etc. I’ll often have phone calls, skype meetings, or (god forbid) real life physical meetings during this time as well.

This stuff, which I call “non-gamedev gamedev” takes up a surprisingly large chunk of my time now, and I do it closer to when I first get up, because my brain takes a while to absorb caffeine and be fully awake (yes, it takes my brain around 6 hours to wake up).

Anyway, from 6pm to 4am is my prime coding hours. There’s usually no activities scheduled, not much happening online (not in my time zone anyway), and the world is just much quieter. This is when I like to tackle the tough problems, go through code and track down bugs, etc.

Last night, around 8:30pm, I decided to stream for a bit to help me focus as I hacked away at more bugs. I went live, pulled the latest version of the build from Perforce, and then Unity just stalled at the project opening. I could see the window outline, but the project just wasn’t loading. This went on for way longer than normal. Ctrl Alt Delete to shut down Unity, but still couldn’t get the project to open.

I ended up canceling the stream, figuring that watching me open Unity is really not that interesting, plus I needed to focus on this.

I spent all night trying to get the project open. Deleting the Library and Temp folders, starting a brand new folder and pulling from Perforce. Nothing worked.

It was incredibly infuriating. It’s 4 days before I leave for PSX, I was supposed to fix a bunch of bugs and test the build on the devkit, and here I am, unable to even open up the project.

I spent until 4am trying to get this to work, with no progress. Ended up going to bed super frustrated and annoyed.

This morning, talked to David, and the problem turned out to be due to this one material (David actually had this problem before).

The material is the Default_Prototype material that comes with ProBuilder (though I don’t think it’s the issue with ProBuilder here, but a way the asset is getting serialized by Unity for version control).

serialization_bug_001

Our solution thus far is to rely on an older revision of the material:

serialization_bug_002

What is messed up though, is when we try to commit a newer revision of the material, that’s exactly like version 7, that still causes problems!

Doing a google search on “invalid serialized file header”, I found this thread: http://forum.unity3d.com/threads/some-assets-are-giving-an-invalid-serialized-file-header-error.328777/

serialization_bug_003

The issue seems to be that P4 server is modifying the end of the line for the meta file?

Given all the symptoms, a problem with version control system messing with something would seem to make the most sense here.

I’ll have to talk to Mike who runs the P4 server to make these changes, and will then post the update here.

Anyway, pretty frustrating to have lost a whole work day as a result of some weird and obscure back.

I do have things are back on track now, in that I can at least open the project and keep working.

Such is game development, I guess.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.