"Wrote past end of buffer in stream" when packging
#1


Hello:




I was a translator in our team,but it's been years,and lots of people dont play this game anymore,so I decide to be a moder.




well the first mod I try is translate,I study that translate example,put all characters I use in the file "CharacterSet.rsc"(about 1700 characters),I choose the font in "Font.res"(4 of this file),because the numbers of character is too big,so the "_sheetWidth" and "_sheetHeight" got very big in those 4 files above(2048x2048-4096x4096),or it's go wrong in the "/build" step.




It's so perfect when I'm testing it in the modkit,so when the last step "/mod" it gives me a crash:



Code:
Assert: Wrote past end of buffer in stream!

IO\MemoryStream.cpp(75)

Callstack:
Runtime-x64-profile.dll(0x0000000001f33953)
Runtime-x64-profile.dll(0x0000000001f2ad52)
CompileWin-x64-profile.dll(0x000000000e6a4e94)
CompileWin-x64-profile.dll(0x000000000e6a3b1d)
CompileWin-x64-profile.dll(0x000000000e6a528b)
Runtime-x64-profile.dll(0x0000000001f508f9)
Runtime-x64-profile.dll(0x0000000001fc3bed)
Runtime-x64-profile.dll(0x0000000001fc337c)
Runtime-x64-profile.dll(0x0000000001f3a5ef)
Runtime-x64-profile.dll(0x0000000001f39aeb)
Runtime-x64-profile.dll(0x0000000001f3862a)
Tools-x64.exe(0x000000007fd1408b)
Tools-x64.exe(0x000000007fe947a3)
KERNEL32.DLL(0x000000001ccd84d4)
ntdll.dll(0x000000001d08e851)



I did try to delete the characters down to about 30 to find out why,and change the "_sheetWidth" and "_sheetHeight" to a smaller size(256x256 512x512) ,it goes well.




So I think it's because the image size is too big and it goes crash,but in chinese there are too many characters,can anyone help me?thanks!



[img]<fileStore.core_Attachment>/monthly_2019_04/wrongmessage_2.thumb.png.9abc1443b18f6b0e94b38f205b3010b7.png[/img]
  Reply
#2


Wow,I figured!




The max size of fontimg is 2047x1024,if 1 pix bigger it's gonna crash,so I have to change the fontsize smaller to put all 2000 characters in this 2047x1024 image...Jesus..


  Reply
#3

i never never did a translation pack so i have no idea whats going on with your problem. gonna email someone who i know is doing some translations and ask him if he want you come here and maybe help you. in fact i asked 2 translater modders.

  Reply
#4

Quote:
19 hours ago, Ketchup said:




i never never did a translation pack so i have no idea whats going on with your problem. gonna email someone who i know is doing some translations and ask him if he want you come here and maybe help you. in fact i asked 2 translater modders.




Thank you bro.




I did a lot of test for modding my translation mod,here's the final result:




If you create a font mod(translation mod) the modkit will make 4 images with all characters you'll gonna use with 4 different fontsizes.The modkit already limit something,if your characters too many,you'll have to change the image's size bigger,but the maximum acceptable size is:2047x1024!If you choose 2048x1024 or bigger,it's gonna "Wrote past end of buffer in stream
!".





So with the 2047x1024 size,I have to change the fontsize very small(16) to put all my 2500-3000 characters in it.But it's fine,I think I can narrow the characters down to near 1800,so I think this problem is sloved.Maybe the game designer didn't think there is a language have so many characters.





Here is the last problem and it's very important I can't slove so long:





 


<iframe data-embedcontent="" frameborder="0" src="<___base_url___>/index.php?/topic/2299-missing-last-character-when-next-line-in-translation/&do=embed"></iframe>


 




In my translation mod if something is more than 15(near) characters that need to change to next line,the last character of the previous line will be missing.I think maybe because the Chinese character take 2 bytes.




Hope you can help me fix this last problem,really thanks!


  Reply
#5

if you put a space in that spot ?

  Reply
#6

Quote:
23 hours ago, Ketchup said:




if you put a space in that spot ?




I tested,it's OK but that's a HUGE work to do...


  Reply
#7

the only other way arounf is make all the windows bigger and longer. which is probably more complicated.

  Reply