Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Intelligent eCard development journal - debugging diary

Sign in to follow this  
Erin Margot Masterson


[color=#4b0082][font=Tahoma]The second week of June 2014, I am debugging an eCard application in Flash Actionscript 3.0, where the goal is to superimpose dynamic text on a specific purpose (including fonts).[/font][/color]

[color=rgb(0,0,0)][font=Tahoma][color=#4b0082]The first few hundred errors were mostly related to typing errors, since it it a long program, but some were also illegal coercions to other types, usually when I had attempted to employ function arguments of a different type than their execution. I fixed many mismatched return statements, missing return statements, missing argument types, and missing output types. The compiler error window generally showed me series of errors for each class one-by-one, although a few of the errors were involving relationships between the classes, especially when I thought I was going down the home stretch after 2 days on 1500 lines of code.[/color][/font][/color]

[color=rgb(0,0,0)][font=Tahoma][color=#4b0082]At around 12:40 on June 12, 2014, I eliminated all of the errors. My Hello World! test worked out and outputted just fine, but there was still a problem or two, and the superimposed text would not appear. The issue was with a null object related to properties or methods in three different methods. I was taken aback at first, but realized easily that I had to attend the classes upon the order of their dependency on one other, which is common, I think, in debugging practice. That is to say, one method called another and that called the third, so I should go in reverse 3, 2, 1. I found that I was missing some type definitions in my parameters, and when I corrected that, I found that it was throwing three more errors related to the content in that function. I was pleased. Normally those problems in the function should have been detected instantly, which meant I had just opened up a door to code that had been blocked off.[/color][/font][/color]

[color=rgb(0,0,0)][font=Tahoma][color=#4b0082]Still had the same problem. I decided to enter Debug mode. I hadn't used it before, but hoped it would show me what line my error was at, and turns out it did. I thought at first it was a problem with the "this" keyword, but that didn't make sense, since the keyword should be able to be used freely throughout the class to reference itself. So, that eliminated, I looked at the variable I was assigning this's properties to, and sure enough, they weren't initialized. One more runtime error I corrected: a dot had to be replaced with a + sign after migrating to Actionscript. Then it worked perfectly, and the words appeared on the movie dynamically! Still there were some type-mismatch glitches and grammar in the text itself was improved by me, as well.[/color][/font][/color]

[color=rgb(0,0,0)][font=Tahoma][color=#4b0082]New: I tried to compile my UnityScript (Javascript) for my game and got this syntax error: BCE0044: expecting :, found ','. I fixed it by removing a bracket and adding whitespace on the sides of my colons. Then I got this error: BCE0044: expecting ], found ':'. I corrected this and several others by inserting a missing key and curly bracket before it. BCE0044: expecting }, found 'funnySerious'. (Missing comma.) BCE0044: expecting }, found 'name2'. (Added missing concantenation operator.) Next I replaced a concantenation operator with a comma. Removed a curly brace. After some time, I got rid of the syntax errors, and the regular errors began to appear. I had an error involving trying to concantenate into an Object with += and I corrected this by declaring the type of the brackets as an Array and using the push method. I replaced some properties references with brackets and keys in quotes, fixing some "is not a member of 'Boo.Lang.Hash'" errors.[/color][/font][/color]
[color=rgb(0,0,0)][font=Tahoma][color=#4b0082]I progressed through a great deal of restructuring of my code, moving from arrays to Lists when the compiler interpreted my arrays containing a specific type as Object.[/color][/font][/color]

Sign in to follow this  


Recommended Comments

There are no comments to display.

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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!