bugBos Wars - Bugs: bug #30164, map editor leaves terrain.lua open...

 
 

bug #30164: map editor leaves terrain.lua open and unflushed when saving it

Submitted by:  Kalle Olavi Niemitalo <kon>
Submitted on:  Thu 17 Jun 2010 06:33:52 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Jimmy Salmon <jsalmon3>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 27 Jun 2010 11:36:55 PM UTC, comment #1:

Fixed in r9908

Jimmy Salmon <jsalmon3>In charge of this item.
Thu 17 Jun 2010 06:33:52 AM UTC, original submission:

In trunk r9902, if you save a small map from the map editor, then exit to the main menu, and start a game in that map, it is all black; the terrain does not get loaded. This happens because the terrain.lua file is zero-length at that time. When you quit Bos Wars, it actually writes the data to the file.

The bug is in WriteTerrain, which creates a FileWriter object and writes text to it but then forgets to delete the object, thus leaving the file open. Compare to WriteMapSetup, which also catches FileException.

Kalle Olavi Niemitalo <kon>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Jun 2010 11:36:55 PM UTCjsalmon3StatusNone=>Fixed
      Assigned tofeb=>jsalmon3
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1