ColinGilbert / projectzombie

Automatically exported from code.google.com/p/projectzombie
0 stars 1 forks source link

Paging system crash when moving too fast #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Keep hold down movement key while paging is loading.

What is the expected output? What do you see instead?

Expected output is continuation of program as normal. What one see for certain 
cases is the system will crash on loading one of the pages.

Please provide any additional information below.

Okay this has been fixed temporarily by locking the movement to 60fps or 
higher. The idea here is when loading pages the game slows down, and the 
movement continues, which causes more pages to load, overwhelming the system 
somehow. When using threading this causes problems. 

Please either fix using something besides locking movement, or put up a loading 
screen when loading takes too long. 

Note: another fix is to move the locking movement thing to somewhere else 
beside locking in the movement module. 

Original issue reported on code.google.com by imbiz...@gmail.com on 7 Dec 2010 at 6:54

GoogleCodeExporter commented 9 years ago
Okay this is caused by "overwhelming" the system where you load a page, which 
generates a load page task (threading stuff), then immediately ask it to unload 
a page while the actual page has yet to be generated! 

Actually, this issue came up before, but we forgot about it. In the future we 
should immediately note a problem so we don't "rediscover" bugs again and again.

The fix is not that simple. Current idea is to do a reference count thing, so 
if after a thread finishes generation, it checks a variable (atomic?) to see if 
it has been unloaded. If so, then it unloads it.

Original comment by LLw...@gmail.com on 7 Dec 2010 at 11:49

GoogleCodeExporter commented 9 years ago
It's fixed. Now the system does deferred unloading. The system now defers 
unloading to the response thread for pages that had unload called when still 
being processed for loading. 

Original comment by LLw...@gmail.com on 8 Dec 2010 at 12:56

GoogleCodeExporter commented 9 years ago
This is fixed in r166

http://code.google.com/p/projectzombie/source/detail?r=166

Original comment by LLw...@gmail.com on 8 Dec 2010 at 1:08