Welcome to Black Liquid Software

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • 0
Sign in to follow this  
Followers 0
cnzjs

"Wrote past end of buffer in stream" when packging

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:

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!

wrongmessage_2.png

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

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..

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

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.

Edited by Ketchup
1 person likes this

Share this post


Link to post
Share on other sites
  • 0
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:

 

 

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!

Share this post


Link to post
Share on other sites
  • 0

if you put a space in that spot ?

Share this post


Link to post
Share on other sites
  • 0
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...

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0