Ticket #798 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

[BUG] and [PATCH] SDL Font color is wrong

Reported by: richardh Owned by:
Priority: normal Milestone:
Component: library Version: 1.3.0
Severity: high Keywords:
Cc: Language:
Patch status: applied Platform: unix

Description

<parrot>/example/sdl/blue_font.pir is rarely blue and changes each time it is run.

Attached is parrotbug report and diff output for the suggested changes

Attachments

sdl_font_patches Download (4.0 KB) - added by richardh 5 years ago.
SDL_Font.report Download (3.2 KB) - added by richardh 5 years ago.

Change History

Changed 5 years ago by richardh

Changed 5 years ago by richardh

in reply to: ↑ description ; follow-ups: ↓ 2 ↓ 3   Changed 5 years ago by jkeenan

Replying to richardh:

<parrot>/example/sdl/blue_font.pir is rarely blue and changes each time it is run.

I tried to reproduce the bug, but got this output:

$ ./parrot examples/sdl/blue_font.pir 
libSDL not found!
current instr.: 'parrot;SDL;_init_video' pc 129 (runtime/parrot/library/SDL.pir:110)
called from Sub 'parrot;SDL;_sdl_init' pc 7 (runtime/parrot/library/SDL.pir:63)
called from Sub 'parrot;SDL::App;_initialize' pc 0 (runtime/parrot/library/SDL/App.pir:70)
called from Sub 'main' pc 0 (examples/sdl/blue_font.pir:25)

I presume this means I'm missing certain libraries. Would you know what Debian packages I would need to install to get past this?

Thank you very much.
kid51

in reply to: ↑ 1   Changed 5 years ago by bacek

Replying to jkeenan:

I presume this means I'm missing certain libraries. Would you know what Debian packages I would need to install to get past this?

libsdl-dev or libsdl1.2-dev

-- Bacek

in reply to: ↑ 1   Changed 5 years ago by richardh

I presume this means I'm missing certain libraries. Would you know what Debian packages I would need to install to get past this? Thank you very much.
kid51

In addition to Bacek's comment, you need:
a) to have a link called libSDL.so pointing to whatever the deb package installed;
b) libSDL_ttf which can be found in libsdl-ttf2.0-0 deb
c) to ensure that you have a link called libSDL_ttf.so to whatever is installed.
d) to have a link called times.ttf in the path (I put a link in the current directory to /usr/share/fonts/truetype/freefont/FreeSerif.ttf

I think that's all.
Richard

  Changed 5 years ago by NotFound

Note that in Debian the .so -> .so.n link is provided by the corresponding -dev package. So if you install libsdl1.2-dev and libsdl-ttf2.0-dev you should not need to create the links.

  Changed 5 years ago by coke

on win32, with a SDL 1.2.13 DLL dropped in the top level of the build directory, the example file (sans patches) fails for me with:

.\parrot examples/sdl/blue_font.pir
No such string attribute '0'
current instr.: 'parrot;SDL;_init_ttf' pc 412 (runtime\parrot\library\SDL.pir:24
0)
called from Sub 'parrot;SDL::Font;_sdl_init' pc 8 (runtime\parrot\library\SDL\Fo
nt.pir:43)
called from Sub 'main' pc 6 (examples/sdl/blue_font.pir:28)

So I'm kind of stuck on evaluating the patch. Anyone else?

  Changed 5 years ago by NotFound

  • status changed from new to closed
  • resolution set to fixed
  • patch set to applied

I checked it. The problem in the example is solved, and looks like it doesn't break any example that wasn't already broken. So applied in r40110, closing ticket.

Note: See TracTickets for help on using tickets.