gameboy Posted December 27, 2015 Report Share Posted December 27, 2015 (edited) Today, I tested the latest SVN17557 and found a problem: when I press the key shift+f2 in the game, the game appears the wrong message:My operating system is Win8 64bit. my memory is 8GERROR: Error writing screenshot to 'screenshots/screenshot0010.bmp'Out of address space (64-bit OS may help)Location: wvm.cpp:297 (vm::AddressRangeDescriptor::Allocate)Call stack:(error while dumping stack: No stack frames found)errno = 0 (No error reported here)OS error = 8 (?????????????)commands.txt Edited December 27, 2015 by gameboy Quote Link to comment Share on other sites More sharing options...
niektb Posted December 27, 2015 Report Share Posted December 27, 2015 That's right. It is a known issue to windows systems and isn't likely to be fixed in the next few years... Quote Link to comment Share on other sites More sharing options...
gameboy Posted December 28, 2015 Author Report Share Posted December 28, 2015 On this issue, I feel very strange: the main interface in the game can be used with the button shift+f2 can be screenshots, but the start of a game, the screenshot will appear error. Quote Link to comment Share on other sites More sharing options...
gameboy Posted December 28, 2015 Author Report Share Posted December 28, 2015 This problem seems to be similar to the existence, but it has not been solved. Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 1, 2016 Author Report Share Posted January 1, 2016 This problem asks everybody to help me to tell me how to solve? Thank you! Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted January 1, 2016 Report Share Posted January 1, 2016 Be patient. Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted January 1, 2016 Report Share Posted January 1, 2016 That's right. It is a known issue to windows systems and isn't likely to be fixed in the next few years...That may mean that is A MICROSOFT issue not 0AD so we can not fix it until they do so as niektb said in a few years.Enjoy the Choice 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 2, 2016 Author Report Share Posted January 2, 2016 I found a way, but how to apply this method into the code, still ask everybody to help me. Virtual is kept within area is based on 64 KB. In the area of the page can be submitted from page to page (translator note: when it comes to each page in the Windows CE is in front of the 4096 - byte or 1024 bytes). You can directly submit a page or pages rather than a full page of the reserved area. But for page or pages, directly submit is still a 64 - KB (translator note: may submit the number of pages until it is enough to fill 64 KB really commit), for this reason, the best to keep a 64 - KB of virtual memory, and then submit the page to areas of need. Because the virtual memory address space to each process 32 MB limit, it has a maximum of 32 MB / 64 KB - 1 = 511, this is before the existence of memory can be retained within the virtual maximum. Next, an example, the code is as follows: 1024 / / # define PAGESIZE Assume we 'r e on a 1 - KB page machine For (I = 0; I < 512; i++) PMem [I] = VirtualAlloc (NULL, PAGESIZE, MEM_RESERVE │ MEM_COMMIT, PAGE_READWRITE); Virtual memory code assigned 512 single page. Do you have half of the available system RAM, even VirtualAlloc will also fail to complete before distribution. Because of its running is beyond the application of the virtual address space. This happens because every 1 - KB block takes up 64 - KB, then the stack, the application code and the local heap is mapped to the same 32 MB virtual address space, the available virtual distribution area is usually not more than 475. A better distribution of 512 pieces of special memory method is to do it: 1024 / / # define PAGESIZE Assume we 'r e on a 1 - KB page machine. / / Reserve a region first. PMemBase = VirtualAlloc (NULL, PAGESIZE * 512, MEM_RESERVE, PAGE_NOACCESS); For (I = 0; I < 512; i++) PMem [I] = VirtualAlloc (pMemBase + (I * PAGESIZE), PAGESIZE. MEM_COMMIT, PAGE_READWRITE); Code first retained an area, the page will be submitted in the future. Because the region has been preserved, first submit page is not restricted by a 64 - KB page (translator note: only retain the minimum restricted by 64 KB), and so on, if you have 512 KB available memory in the system, allocation will be successful. Although I showed you just now is an artificial example (and virtual memory is better than direct allocation method to allocate memory block 1 KB), an important memory allocation method is verified in the different (for other Windows). In the desktop version of Windows, the work of the application has a full 2 GB virtual address space. In Windows CE, a programmer must understand that each application is kept only a smaller 32 - MB virtual address space. Quote Link to comment Share on other sites More sharing options...
niektb Posted January 2, 2016 Report Share Posted January 2, 2016 Loki, that's not true. The solution would be (iirc) to split the memory allocation up into several small fragments instead of one big chunk Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 2, 2016 Author Report Share Posted January 2, 2016 @niektb:How do we change the method, and then apply it to the code? Quote Link to comment Share on other sites More sharing options...
niektb Posted January 2, 2016 Report Share Posted January 2, 2016 No idea, it's difficult to do I think, else it would have been fixed long ago (the bug has been around for a few years now) Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 2, 2016 Author Report Share Posted January 2, 2016 (edited) Just 10 minutes ago, I've fixed the problem.BTW: I'm not modifying the program code. Edited January 2, 2016 by gameboy Quote Link to comment Share on other sites More sharing options...
niektb Posted January 2, 2016 Report Share Posted January 2, 2016 Try again and see it isn't fixed. (but sometimes it suddenly works) Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 2, 2016 Author Report Share Posted January 2, 2016 (edited) This question is really cannot be fixed? Edited January 28, 2016 by gameboy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.