pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47330: games/frozen-bubble crashes randomly when changing levels



>Number:         47330
>Category:       pkg
>Synopsis:       games/frozen-bubble crashes randomly when changing levels
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 15 10:30:00 +0000 2012
>Originator:     Mayuresh
>Release:        6.0
>Organization:
>Environment:
NetBSD laptop 6.0 NetBSD 6.0 (GENERIC) i386
>Description:
frozen-bubble crashes (sometimes) when finishing one level and going to the 
next.
>How-To-Repeat:
Play frozen-bubble for a few levels. Problem should usually occur randomly 
anywhere between 1st to 10th level.
>Fix:
While the exact fix from upstream point of view is unknown, I have provided 
something good enough to make the game usable.

The problem originates from code that shows some animation during change of 
level.

The crash manifests in memcpy. Perhaps some portability issue.

The reason this issue occurs randomly is, the animation type is chosen based on 
a random number generator and only one of those choices made in a big if-else 
is causing a crash.

I have replaced the crashing animation in a big if-else logic with the default 
one (same as that of the last else).

This makes the game usable on NetBSD, by just avoiding certain animation.

Will be reporting upstream for them to look at the root cause.

There already existed a patch for this file. Following is a patch to the 
existing patchfile.

  1 Index: patch-c__stuff_fb__c__stuff.xs
  2 ===================================================================
  3 RCS file: 
/cvsroot/pkgsrc/games/frozen-bubble/patches/patch-c__stuff_fb__c__stuff.xs,v
  4 retrieving revision 1.1
  5 diff -u -r1.1 patch-c__stuff_fb__c__stuff.xs
  6 --- patch-c__stuff_fb__c__stuff.xs  3 Jul 2012 18:43:37 -0000   1.1
  7 +++ patch-c__stuff_fb__c__stuff.xs  15 Dec 2012 09:07:49 -0000
  8 @@ -1,6 +1,6 @@
  9  $NetBSD: patch-c__stuff_fb__c__stuff.xs,v 1.1 2012/07/03 18:43:37 joerg 
Exp $
 10 
 11 ---- c_stuff/fb_c_stuff.xs.orig 2012-07-03 14:35:36.000000000 +0000
 12 +--- c_stuff/fb_c_stuff.xs.orig 2008-11-02 18:27:44.000000000 +0000
 13  +++ c_stuff/fb_c_stuff.xs
 14  @@ -96,14 +96,12 @@ int rand_(double val) { return 1+(int) (
 15 
 16 @@ -79,3 +79,12 @@
 17 
 18   void circle_effect(SDL_Surface * s, SDL_Surface * img)
 19   {
 20 +@@ -1585,7 +1582,7 @@ effect(s, img)
 21 +   CODE:
 22 +       int randvalue = rand_(8);
 23 +       if (randvalue == 1 || randvalue == 2)
 24 +-          store_effect(s, img);
 25 ++            squares_effect(s, img);
 26 +       else if (randvalue == 3 || randvalue == 4 || randvalue == 5)
 27 +           plasma_effect(s, img);
 28 +                 else if (randvalue == 6)



Home | Main Index | Thread Index | Old Index