Bug 67355 - Frozenbubble startup fails: [SDL Init] Not a HASH reference ...
Summary: Frozenbubble startup fails: [SDL Init] Not a HASH reference ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Philip Paeps
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-29 19:30 UTC by User1001
Modified: 2004-11-02 23:14 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description User1001 2004-05-29 19:30:17 UTC
	Start up Frozenbubble. A new screen flashes and immediately closes. The
	following messages are displayed (when using a shell window):

> frozen-bubble
        [[ Frozen-Bubble-0.9.3 ]]

   http://www.frozen-bubble.org/

   Copyright (c) 2000, 2001, 2002 Guillaume Cottenceau.
   Artwork: Alexis Younes <73lab at free.fr>
	 Amaury Amblard-Ladurantie <amaury at linuxfr.org>
   Soundtrack: Matthias Le Bidan <matthias.le_bidan at caramail.com>
   Design & Programming: Guillaume Cottenceau <guillaume.cottenceau at free.fr>

   Sponsored by MandrakeSoft <http://www.mandrakesoft.com/>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License version 2, as
   published by the Free Software Foundation.

[SDL Init] Not a HASH reference at /usr/local/bin/frozen-bubble.pl line 322.

Addicted during 0s.
Comment 1 Volker Stolz freebsd_committer freebsd_triage 2004-06-07 17:26:55 UTC
Same here. Maybe an update to 1.0.0 helps, cf.
http://www.frozen-bubble.org/

Volker
Comment 2 Volker Stolz freebsd_committer freebsd_triage 2004-06-07 17:27:35 UTC
State Changed
From-To: open->feedback

Waiting for maintainer feedback.
Comment 3 Tilman Keskinoz freebsd_committer freebsd_triage 2004-06-10 19:37:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->philip

Over to Maintainer of p5-SDL. The new version of frozenbubble requires 
an update of p5-SDL
Comment 4 Volker Stolz freebsd_committer freebsd_triage 2004-07-25 00:05:22 UTC
State Changed
From-To: feedback->analyzed

No progress, so move PR out of the way. Patches welcome!
Comment 5 jaapb 2004-08-24 08:19:03 UTC
Here is a patch, based on the one from debian, which solves the problem:

--- /usr/local/bin/frozen-bubble.pl Tue Aug 24 09:15:36 2004
+++ frozen-bubble.pl Tue Aug 24 09:14:43 2004
@@ -319,7 +319,11 @@
 sub add_image($) {
     my $file = "$FPATH/gfx/$_[0]";
     my $img = new SDL::Surface(-name => $file);
-    $img->{-surface} or die "FATAL: Couldn't load `$file' into a 
SDL::Surface.\n";
+    if (UNIVERSAL::isa($img, "HASH")) {
+      $img->{-surface} or die "FATAL: Couldn't load `$file' into a 
SDL::Surface.\n";
+    } else {
+      $img or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
+    }
     add_default_rect($img);
     return $img;
 }
@@ -1244,7 +1248,11 @@
  $imgbin{back_1p}->blit($high_rect, $background, $high_rect);
  open_level($high->{level});
  put_image($imgbin{hiscore_frame}, $high_posx - 7, $high_posy - 6);
- fb_c_stuff::shrink($app->{-surface}, 
$background->display_format()->{-surface}, $high_posx, $high_posy, 
$high_rect->{-rect}, 4);
+ if (UNIVERSAL::isa($app, "HASH")) {
+   fb_c_stuff::shrink($app->{-surface}, 
$background->display_format()->{-surface}, $high_posx, $high_posy, 
$high_rect->{-rect}, 4);
+ } else {
+   fb_c_stuff::shrink($$app, ${$background->display_format}, $high_pox, 
$high_posy, $$high_rect, 4); 
+ }
  $centered_print->($high_posx, $high_posy,    $high->{name});
  $centered_print->($high_posx, $high_posy+20, $high->{level} eq 'WON' ? 
"WON!" : "LVL-".$high->{level});
  my $min = int($high->{time}/60);
@@ -1412,8 +1420,10 @@
     if ($graphics_level == 1) {
  $background->blit($apprects{main}, $app, $apprects{main});
  $app->flip();
-    } else {
+    } elsif (UNIVERSAL::isa($app, "HASH")) {
  fb_c_stuff::effect($app->{-surface}, 
$background->display_format()->{-surface});
+    } else {
+ fb_c_stuff::effect($$app, ${$background->display_format});
     }
 
     $display_on_app_disabled = 0;
Comment 6 User1001 2004-08-24 20:04:48 UTC
Have applied patch below and tested it. FBSD Frozen-Bubble-0.9.3_4 is again
playable (albeit somewhat slow). Thanks!


On 24 Aug, Jaap Boender wrote:
> Here is a patch, based on the one from debian, which solves the problem:
> 
> --- /usr/local/bin/frozen-bubble.pl Tue Aug 24 09:15:36 2004
> +++ frozen-bubble.pl Tue Aug 24 09:14:43 2004
> @@ -319,7 +319,11 @@
>  sub add_image($) {
>      my $file = "$FPATH/gfx/$_[0]";
>      my $img = new SDL::Surface(-name => $file);
> -    $img->{-surface} or die "FATAL: Couldn't load `$file' into a 
> SDL::Surface.\n";
> +    if (UNIVERSAL::isa($img, "HASH")) {
> +      $img->{-surface} or die "FATAL: Couldn't load `$file' into a 
> SDL::Surface.\n";
> +    } else {
> +      $img or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
> +    }
>      add_default_rect($img);
>      return $img;
>  }
> @@ -1244,7 +1248,11 @@
>   $imgbin{back_1p}->blit($high_rect, $background, $high_rect);
>   open_level($high->{level});
>   put_image($imgbin{hiscore_frame}, $high_posx - 7, $high_posy - 6);
> - fb_c_stuff::shrink($app->{-surface}, 
> $background->display_format()->{-surface}, $high_posx, $high_posy, 
> $high_rect->{-rect}, 4);
> + if (UNIVERSAL::isa($app, "HASH")) {
> +   fb_c_stuff::shrink($app->{-surface}, 
> $background->display_format()->{-surface}, $high_posx, $high_posy, 
> $high_rect->{-rect}, 4);
> + } else {
> +   fb_c_stuff::shrink($$app, ${$background->display_format}, $high_pox, 
> $high_posy, $$high_rect, 4); 
> + }
>   $centered_print->($high_posx, $high_posy,    $high->{name});
>   $centered_print->($high_posx, $high_posy+20, $high->{level} eq 'WON' ? 
> "WON!" : "LVL-".$high->{level});
>   my $min = int($high->{time}/60);
> @@ -1412,8 +1420,10 @@
>      if ($graphics_level == 1) {
>   $background->blit($apprects{main}, $app, $apprects{main});
>   $app->flip();
> -    } else {
> +    } elsif (UNIVERSAL::isa($app, "HASH")) {
>   fb_c_stuff::effect($app->{-surface}, 
> $background->display_format()->{-surface});
> +    } else {
> + fb_c_stuff::effect($$app, ${$background->display_format});
>      }
>  
>      $display_on_app_disabled = 0;
Comment 7 Pav Lucistnik freebsd_committer freebsd_triage 2004-11-02 23:14:37 UTC
State Changed
From-To: analyzed->closed

Patch with the fix committed!