Difference between revisions of "SummerOfCodeProposal Awilkins"
(→Example of a Macro Error) |
(→Example of a Macro Error) |
||
Line 21: | Line 21: | ||
error general: Error loading game configuration files: 'Missing closing tag for tag frame at core/units/dwarves/Thunderguard.cfg:192 included from core/units.cfg:16 included from core/_main.cfg:12 included from _main.cfg:5, value '' at core/units/dwarves/Thunderguard.cfg:194 included from core/units.cfg:16 included from core/_main.cfg:12 included from _main.cfg:5' (The game will now exit) | error general: Error loading game configuration files: 'Missing closing tag for tag frame at core/units/dwarves/Thunderguard.cfg:192 included from core/units.cfg:16 included from core/_main.cfg:12 included from _main.cfg:5, value '' at core/units/dwarves/Thunderguard.cfg:194 included from core/units.cfg:16 included from core/_main.cfg:12 included from _main.cfg:5' (The game will now exit) | ||
− | As you can see nothing about the file I edited was mentioned. In fact, a file that has nothing to do with what I did, "core/units/dwarves/thunderguard.cfg" was mentioned. | + | As you can see nothing about the file I edited was mentioned. In fact, a file that has nothing to do with what I did, "core/units/dwarves/thunderguard.cfg" was mentioned. Upon closer inspection of the terminal log, or stderr.txt for windows users, I can see additional information that wasn't listed:<br> |
− | The appropiate fix would display something like:<br> | + | 20100402 21:39:57 error config: Nested quoted string at core/macros/sound-utils.cfg:470 included from core/_main.cfg:6 included from _main.cfg:5 |
+ | 20100402 21:39:57 error config: Quoted string not terminated at core/units/elves/Shaman.cfg:220 included from core/units.cfg:17 included from core/_main.cfg:12 included from _main.cfg:5 | ||
+ | |||
+ | In this log another false file, sound-utils.cfg, is mentioned along with the file with the error, Shaman.cfg. Why this isn't displayed in the main error window when wesnoth runs would be something I plan on fixing. The line number in shaman.cfg is also displayed incorrectly. The reason being, it searches the entire file for a close quotation, and when it doesn't find it, it lists the error being on the very last line of the config file. | ||
+ | |||
+ | The appropiate fix would display something like when you run the game:<br> | ||
error config: Error loading game configuration files<br> | error config: Error loading game configuration files<br> | ||
error general: Error loading game configuration files: 'Argument two of macro 'DEFENSE_ANIM' located at: core/units/elves/Shaman.cfg:60 included from core/units.cfg:17 included from core/_main.cfg:12 included from _main.cfg:5 was missing closing quotation.'(The game will now exit) | error general: Error loading game configuration files: 'Argument two of macro 'DEFENSE_ANIM' located at: core/units/elves/Shaman.cfg:60 included from core/units.cfg:17 included from core/_main.cfg:12 included from _main.cfg:5 was missing closing quotation.'(The game will now exit) |
Revision as of 01:55, 3 April 2010
This page is related to Summer of Code 2010 |
See the list of Summer of Code 2010 Ideas |
This is a Summer of Code 2010 student page |
Description
Awilkins - Improve Upon WML Debugging
I plan on fixing the incorrect error messages returned by the misuse of macros in WML files. The fixed error messages will display the accurate file and line number of where the macro was called incorrectly.
IRC
awilkins
Example of a Macro Error
For this example, I downloaded the version 1.9.0 Wesnoth files off of the svn on March 31, 2010. I went into (wesnoth folder)/data/core/units/elves/shaman.cfg line 60. The line reads:
{DEFENSE_ANIM "units/elves-wood/shaman-defend.png" "units/elves-wood/shaman.png" {SOUND_LIST:ELF_FEMALE_HIT} }
A perfect example of a macro call. To create a common error test, I'm going to remove the fourth quotation, resulting in:
{DEFENSE_ANIM "units/elves-wood/shaman-defend.png" "units/elves-wood/shaman.png {SOUND_LIST:ELF_FEMALE_HIT} }
Now when I run the game, the resulting error occurs during the initial loading screen:
error config: Error loading game configuration files
error general: Error loading game configuration files: 'Missing closing tag for tag frame at core/units/dwarves/Thunderguard.cfg:192 included from core/units.cfg:16 included from core/_main.cfg:12 included from _main.cfg:5, value at core/units/dwarves/Thunderguard.cfg:194 included from core/units.cfg:16 included from core/_main.cfg:12 included from _main.cfg:5' (The game will now exit)
As you can see nothing about the file I edited was mentioned. In fact, a file that has nothing to do with what I did, "core/units/dwarves/thunderguard.cfg" was mentioned. Upon closer inspection of the terminal log, or stderr.txt for windows users, I can see additional information that wasn't listed:
20100402 21:39:57 error config: Nested quoted string at core/macros/sound-utils.cfg:470 included from core/_main.cfg:6 included from _main.cfg:5 20100402 21:39:57 error config: Quoted string not terminated at core/units/elves/Shaman.cfg:220 included from core/units.cfg:17 included from core/_main.cfg:12 included from _main.cfg:5
In this log another false file, sound-utils.cfg, is mentioned along with the file with the error, Shaman.cfg. Why this isn't displayed in the main error window when wesnoth runs would be something I plan on fixing. The line number in shaman.cfg is also displayed incorrectly. The reason being, it searches the entire file for a close quotation, and when it doesn't find it, it lists the error being on the very last line of the config file.
The appropiate fix would display something like when you run the game:
error config: Error loading game configuration files
error general: Error loading game configuration files: 'Argument two of macro 'DEFENSE_ANIM' located at: core/units/elves/Shaman.cfg:60 included from core/units.cfg:17 included from core/_main.cfg:12 included from _main.cfg:5 was missing closing quotation.'(The game will now exit)
Timeline
April 26 - May 23
Get to know the other devlopers on the Wesnoth team better. See who knows about WML, and who has worked with the C++ code involved with loading in the config files.
May 24 - June 6
Examine the code involved in loading the config files, config.cpp, and config.hpp, into the game. Map out their relations to other pieces of code. Understand how error messages from mistyped WML files are formed.
June 7 - June 20
Begin editing the code in the appropiate files to display the correct error messages for mistyped WML files.
June 21 - July 16
Finish editing the code by the mid-term mark to display something similar to sample error message given above.
July 17 - August 16
Make sure the code works in all scenarios, and still can display proper error messages for non-macro related WML errors. Make a page on the wiki on how to fix your macro's with the, hopefully, now functioning debugging errors. Get feed back from any of the WML editing community on how to make their job easier for future work. Possibly a schema if enough people are interested.
Questionnaire
Basics
1.1) Write a small introduction to yourself.
Hello, my name is Andrew Wilkinson, a 21 year old Computer Scientist from Massachusetts, USA.
1.2) State your preferred email address.
andrewwilkinson88@gmail.com
1.3) If you have chosen a nick for IRC and Wesnoth forums, what is it?
awilkins
1.4) Why do you want to participate in summer of code?
With my senior year coming to a close, I want to become more involved in the computer science community. Open source projects are the best way to meet people, and gain experience on actual project code. I haven't been able to participate in previous summers of code, and this might be my last chance at the program.
1.5) What are you studying, subject, level and school?
Senior year, Computer Science, University of Massachusetts Lowell.
1.6) What country are you from, at what time are you most likely to be able to join IRC?
United States, east coast on Eastern Time or UTC -5. But, I can be on IRC at any time.
1.7) Do you have other commitments for the summer period ? Do you plan to take any vacations ? If yes, when.
I'll be working part time in a lab at the University of Massachusetts Lowell. The work load there is very relaxed, and I don't have set hours. I plan on giving this project the majority of my attention. Beyond that I'll be off the first week of August, but will still be able to work on the project with reduced time on IRC.
Experience
2.1) What programs/software have you worked on before?
I've worked with the OpenGl, Quicktime, and briefly GStreamer API's to write C files that add new features to the graphical language LabVIEW. Through my four years at school I've done various programming assignments focused on core concepts of computer science.
2.2) Have you developed software in a team environment before? (As opposed to hacking on something on your own)
I've worked in a team environment for a school project.
2.3) Have you participated to the Google Summer of Code before? As a mentor or a student? In what project? Were you successful? If not, why?
No, I have not.
2.4) Are you already involved with any open source development projects? If yes, please describe the project and the scope of your involvement.
No, not yet.
2.5) Gaming experience - Are you a gamer?
I would consider myself a gamer. I've played on most of the consoles, and have played several games on the PC. However, I seem to be more interested in the design of the game and the interesting choices the develepors make.
2.5.1) What type of gamer are you?
I enjoy single player games for their puzzle solving like quality, and for Multiplayer games I enjoy team games.
2.5.2) What type of games?
All games besides racing and sports.
2.5.3) What type of opponents do you prefer?
The best type of opponent is when a bunch of random people get together and form a well organized team. It's rare, but always makes for very fun gameplay.
2.5.4) Are you more interested in story or gameplay?
I believe both elements are important for a successful single player game. If gameplay isn't there, nothing stands out about the game. If the story isn't fascinating there's not as much an incentive to replay. With both you get great games like those of the Final Fantasy series.
2.5.5) Have you played Wesnoth? If so, tell us roughly for how long and whether you lean towards single player or multiplayer.
I started playing last week and got about seven missions into "Heir to the Throne". The game is really solid and easy to pickup while still being challenging to master. I'm not a huge fan of strategy multiplayer, so I can safely say I'm leaning towards the single player experience.
2.6) If you have contributed any patches to Wesnoth, please list them below. You can also list patches that have been submitted but not committed yet and patches that have not been specifically written for GSoC. If you have gained commit access to our SVN (during the evaluation period or earlier) please state so.
I have not contributed patches or gained commit acces to the SVN yet. However, I have downloaded and compiled from the svn.
Communication skills
3.1) Though most of our developers are not native English speakers, English is the project's working language. Describe your fluency level in written English.
English is my only language.
3.2) What spoken languages are you fluent in?
English.
3.3) Are you good at interacting with other players? Our developer community is friendly, but the player community can be a bit rough.
I can usually get along with everyone.
3.4) Do you give constructive advice?
Of course.
3.5) Do you receive advice well?
As long as it's well stated, and constructive.
3.6) Are you good at sorting useful criticisms from useless ones?
Yes.
3.7) How autonomous are you when developing ? Would you rather discuss intensively changes and not start coding until you know what you want to do or would you rather code a proof of concept to "see how it turn out", taking the risk of having it thrown away if it doesn't match what the project wants.
I perfer to know exactly what my goals are before continuing on to coding.
Project
4.1) Did you select a project from our list? If that is the case, what project did you select? What do you want to especially concentrate on?
WML debugging project.
4.2) If you have invented your own project, please describe the project and the scope.
I chose an idea from the list of ideas.
4.3) Why did you choose this project?
At work recently, I've been dealing a lot with XML and a project involving a markup language sutck out to me. Now that I know what the project is more about, understanding how Wesnoth loads in it's config files will be very useful for game design in general. The difficulty of this project will also be a good way for me to test myself.
4.4) Include an estimated timeline for your work on the project. Don't forget to mention special things like "I booked holidays between A and B" and "I got an exam at ABC and won't be doing much then".
See Timeline
4.5) Include as much technical detail about your implementation as you can
See Example of Macro Error
4.6) What do you expect to gain from this project?
An understanding of how to work on an open source project and become a part of a coding community.
4.7) What would make you stay in the Wesnoth community after the conclusion of SOC?
If I can gain the respect of the fellow developers after the summer of code, than I will stay and continue working on this project.
Practical considerations
5.1) Are you familiar with any of the following tools or languages?
- Subversion (used for all commits)
- C++ (language used for all the normal source code)
- STL, Boost, Sdl (C++ libraries used by Wesnoth)
- Python (optional, mainly used for tools)
- build environments (eg cmake/autotools/scons)
- WML (the wesnoth specific scenario language)
- Lua (used in combination with WML to create scenarios)
I am familiar with subversion, C++, python, WML(learned recently), and Lua(have used briefly in past). I was able to grab the code off of the SVN and compile using scons.
5.2) Which tools do you normally use for development? Why do you use them?
When I develop, it's usually in an IDE such as Visual Studio, Xcode, and Eclipse. I usually develop on Windows and Mac. All through school though, every assignment was done on Linux.
5.3) What programming languages are you fluent in?
C/C++ and Java.
5.4) Would you mind talking with your mentor on telephone / internet phone? We would like to have a backup way for communications for the case that somehow emails and IRC do fail. If you are willing to do so, please do list a phone number (including international code) so that we are able to contact you. You should probably *only* add this number in the application for you submit to google since the info in the wiki is available in public. We will *not* make any use of your number unless some case of "there is no way to contact you" does arise!
I wouldn't mind at all. (Hidden number for now, will add to google application).