worldofbalance/unity-game-client

game client doesn't run on windows

Fito opened this issue · 21 comments

Fito commented

@jensvdh Do you have any ideas about what could be causing this?
A couple of people, running unity on their windows machines, are seeing the following error popup when they try to load the code from the repository.
This only happens when they try to load the code from the github repository, not when loading the code provided through the google docs link.
capture

No idea. Everything seems to run well under OSX. Looks like an out-of-memory issue. Perhaps an infinite loop?

Does any of you have access to a Windows PC? Did they pull latest development?

Can you try clearing the Unity Cache on your Windows machines?

See this post

On windows 7 (unity 5) i just had this and fixed it by deleting the contents of the cache folder.
C:\Users"current User"\AppData\LocalLow\Cache

Yeah I'm having this issue too. Cleaning the cache, uninstalling and reinstalling Unity doesn't help.

If I download the project as a zip file then I can run it on Unity with no problem, but I can't connect it to github repo then.

We need to figure out what changed between the ZIP file and the Github repository. Because the ZIP file will no longer be used.

Unfortunately I don't have a Windows machine.

Do you get any logger output from Unity?

Here's the log file, so it's trying to allocate >50GB of memory?

DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 56602930400.
DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 56602930400.
DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 56602930400.
DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 56602930400.
DynamicHeapAllocator out of memory - Could not get memory for large allocation 56602930400!
Could not allocate memory: System out of memory!
Trying to allocate: 56602930400B with 16 alignment. MemoryLabel: NewDelete
Allocation happend at: Line:0 in Overloaded New
Memory overview

[ ALLOC_DEFAULT ] used: 8924664B | peak: 0B | reserved: 39845888B
[ ALLOC_TEMP_JOB ] used: 0B | peak: 0B | reserved: 1048576B
[ ALLOC_GFX ] used: 336B | peak: 0B | reserved: 16777216B
[ ALLOC_CACHEOBJECTS ] used: 50360B | peak: 0B | reserved: 8388608B
[ ALLOC_TYPETREE ] used: 35040B | peak: 0B | reserved: 16777216B
[ ALLOC_PROFILER ] used: 15464B | peak: 0B | reserved: 4194304B
Could not allocate memory: System out of memory!
Trying to allocate: 56602930400B with 16 alignment. MemoryLabel: NewDelete
Allocation happend at: Line:0 in Overloaded New
Memory overview

[ ALLOC_DEFAULT ] used: 8924664B | peak: 0B | reserved: 39845888B
[ ALLOC_TEMP_JOB ] used: 0B | peak: 0B | reserved: 1048576B
[ ALLOC_GFX ] used: 336B | peak: 0B | reserved: 16777216B
[ ALLOC_CACHEOBJECTS ] used: 50360B | peak: 0B | reserved: 8388608B
[ ALLOC_TYPETREE ] used: 35040B | peak: 0B | reserved: 16777216B
[ ALLOC_PROFILER ] used: 15464B | peak: 0B | reserved: 4194304B

(Filename: C:/buildslave/unity/build/Runtime/Allocator/MemoryManager.cpp Line: 982)

Can you try the master branch? Also can you take a screenshot of where you downloaded the zip from.

Also if some windows user can hop on Skype and share his screen with me that would be amazing. I do not own a Windows machine. Thanks!

I am a windows user and I also ran into the crash (Out of memory) as @Fito mentioned when i tried opening the project from the 'Open Project' interface. But when i tried opening a scene (Assets/Scenes/Login) by double clicking on it (on removing the Temp/UnityLockfile), the project loaded completely and rebuilt the Library/ folder. I was subsequently able to open the Project through the 'Open Project' interface.
However, all assets and scenes seem to have a header serialization error in the console. Perhaps this could be a cause of the crash ?
serialization_errors

While reading this http://forum.unity3d.com/threads/some-assets-are-giving-an-invalid-serialized-file-header-error.328777/ and http://answers.unity3d.com/questions/222281/asset-serialization-mixed-vs-force-text.html , it seems this could be related to how the version control system (Git in our case) handles binary files vs text files. Not completely sure though. Perhaps we can try downloading the same project from google drive to check if we still replicate the same error on windows.

The way those assets are treated is handled by the .gitattributes file.

Perhaps we can try changing that one?

Our gitattributes file is forcing Mac Line endings. Perhaps that is somehow related to this?

Hmm ok, which are those line endings ? I tried changing the .gitattributes for .unity, .asset and .prefab to 'binary' instead of 'text', in my fork and recloned it. Now it seemed to be loading fine through the 'Open project' interface, without the serialization errors. Only the sqlite3.dll seemed to be missing which is a windows specific addition.
rupalkhilari@b5c3099

Although, not sure if it should be so.

Thanks!

@rupalkhilari Very cool. Looks like we are making progress here.

There is a solution for the sqlite3.dll on iLearn. Perhaps we can just add that DLL to our source code repository? (It should live under assets)

@rupalkhilari Also there is no need to create a fork for the entire repo. You can just push a branch to Github

@jensvdh , I don't seem to have permission to push to this repo yet, could you grant me permission.? I shall create a new branch in the same repo going forward.

 remote: Permission to worldofbalance/unity-game-client.git denied to rupalkhilari.
 fatal: unable to access 'https://github.com/worldofbalance/unity-game-client.git /': The requested URL returned error: 403

For now, I have created a pull request #5 from my fork.
For the changes, I believe the windows users will need to reclone their git repos to test it. I hope it still works alright for Mac. Do let me know.
Thanks!

Hi @rupalkhilari I invited you to the WoB organization. You should have rights to push now. Which subteam are you in? Will test the PR on OSX.

If you wouldn't mind pushing your changes to a branch local to this repository that would be great. Makes it easier for me to clone :)

Thanks Jens, I am in the new game subteam. We are yet to decide on a name for the game I believe.

Cool. Let me know when the branch is up and I'll test it. I'll close #5 . @rupalkhilari if you can make a new PR with a branch local to this repo I will merge it.

Thanks @jensvdh . I have created a new PR #6 with a local branch.

Hi @haichuand , we just merged a fix Rupal did into the development branch. Can you make a fresh clone of the project on Windows and tell me if it works now?

If it does I'll mark this issue as resolved.

Thanks!

Fito commented

@danamuise and I tested the solution, and had to do two things in addition to just pulling the latest version:

  • clear the the contents of the C:\Users"current user"\AppData\LocalLow\Unity\Caches directory
  • remove and re-clone the repository

This solved the issue, therefore I'm closing it.
Thanks @rupalkhilari and @jensvdh 👍