MFGG Forums
  • Home
  • Members
  • Help
  • Search
MFGG Main Site MFGG Forums MFGG Developer Discussion v
1 2 3 4 5 … 16 Next »
Question about hunting for bugs
MFGG Forums MFGG Developer Discussion v
1 2 3 4 5 … 16 Next »
Question about hunting for bugs
MFGG Forums MFGG Developer Discussion v
1 2 3 4 5 … 16 Next »
Question about hunting for bugs
Mark All Posts Read Today's Posts

Question about hunting for bugs
GeneSu730
Wannabe Hacker
Members
Egg Hunter
#1
06-01-2025, 12:29 AM
Dear All:

Have any of you had a bug in your source code that you have not caught for years because its effects were rather sporadic?

For the last 5 years, I noticed that maybe 1 out of 20 times, my Super Mario game would freeze. I had no idea what could be doing it.

Yesterday, however, I found a very subtle bug in a subroutine dealing with my animation layer. My animation layer has each animated tile with a sequence of frames. The sequence is of variable length and is dynamically allocated at run-time. However, some tiles are just single frame (such as stone or metal blocks that Mario leaves behind after hitting treasure boxes). The sequence would be of one element but my code would attempt to access a "second" element, creating a serious memory access error.

I would not have found this error except I tried to expand this subroutine to add certain special effects to my animation layer such as thunder and gradual lighting. It seems like I did not catch this bug for the last 8 years because the memory after the allocated sequence would usually read NULL, which signified the end of the sequence. However, it doesn't always have to be NULL, which is why I suspected the game froze from time to time.

Has something like this happened to you? You scratch your head for years as to why your game sometimes doesn't work once in a blue moon. Then you suddenly want to recode a subroutine and you find something that doesn't add up?

  ↳
Grey Goo
Untitled
New Member
#2
06-01-2025, 02:11 PM
For years? Not really. For few days? Likely, but whats probably because of my coding style, simplicity (and check or swap around for memory boundaries). This doesn't mean one would not get stuck on certain type of coding error. Wrong logic. Logic itself adds up, but its effects are wrong and thus it may take long time debug, before you notice that you are using wrong logic. Makes wonder if you got same type of coding error?...

  ↳
United States VinnyVideo
Can't have an avatar without a Shy-Guy
Site Developer
Main Site Moderator Site Developer/Webmasters Wiki SysOp Big Help Submitter Super Reviewer (2) Wiki Contributor Sprite Comp Runner-Up Minigame Comp Winner Minigame Comp Runner-Up Minigame Comp Top 5 (3) Music Comp Winner Music Comp Runner-Up Music Comp Top 5 (2) Drawing Comp Top 5 Game of the Month Winner NCFC Contributor (4) Secret Santa (5) MFGG 17th Anniversary MFGG 18th Anniversary MFGG 19th Anniversary Ye Olde MFGGe Retro Game Jam Participant MFGG Awards 2010 Winner MFGG Awards 2011 Winner MFGG Awards 2012 Winner MFGG Awards 2013 Winner MFGG Awards 2014 Winner MFGG Awards 2015 Winner MFGG Awards 2017 Winner (3) MFGG Awards 2019 Winner MFGG Awards 2024 Winner
#3
06-01-2025, 03:30 PM
First of all, it's good to hear that you finally tracked down the random crashing bug! That was an annoying one... and a really hard one to pin down.

When I was working on Career Fantasy, I had a few hard-to-solve bugs - for example, a bug where the game would crash if a player attacked a turn after healing or buffing. There were also some pesky bugs if player or enemy parties had exactly three members. Those took a little while to fix completely.
Course clear! You got a card.

[Image: CourseClear.gif]

[-] The following 1 user Likes VinnyVideo's post:1 user Likes VinnyVideo's post
  ↳ GeneSu730
GeneSu730
Wannabe Hacker
Members
#4
06-01-2025, 11:20 PM (This post was last modified: 06-01-2025, 11:21 PM by GeneSu730.)
(06-01-2025, 03:30 PM)VinnyVideo Wrote: First of all, it's good to hear that you finally tracked down the random crashing bug! That was an annoying one... and a really hard one to pin down.

When I was working on Career Fantasy, I had a few hard-to-solve bugs - for example, a bug where the game would crash if a player attacked a turn after healing or buffing. There were also some pesky bugs if player or enemy parties had exactly three members. Those took a little while to fix completely.

Actually, Vinny, the bugs you describe have seem to have a concrete trigger. I fixed two memory access errors before. The first dealt with big enemy footprints and the second dealt with Charging Chuck. My comp sci teacher said that bugs are easier to fix if they have predictable triggers and produce lots of output.

  ↳
United States VinnyVideo
Can't have an avatar without a Shy-Guy
Site Developer
#5
06-02-2025, 06:49 PM
True. My Career Fantasy bugs weren't quite as random as yours, but it still took a lot of digging to find the root cause of them, especially since JRPG battles rely heavily on RNG.
Course clear! You got a card.

[Image: CourseClear.gif]


  ↳
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
Forum Jump:

Mario Fan Games Galaxy - Powered by MyBB | MFGG Staff | Contact Us

Linear Mode
Threaded Mode