LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-29-2002, 12:37 PM   #1
tommyclee
LQ Newbie
 
Registered: May 2002
Location: Redmond, WA USA
Distribution: www.linux.org
Posts: 11

Rep: Reputation: 0
Question Allegro create_bitmap() returns NULL


With Allegro 3.9.36 and SVGAlib 1.4.3 on STPC
CONSUMERBD running Red Hat Linux 7.2, my Allegro
application crashes at calling to create_bitmap(18
* 220, 200) in the 640*480 mode. I tried smaller width
values, e.g. 4 * 220, 2 * 220, 220. It fails anyway.

If the constant (18) is replaced with a static variable, for example int numOfBitmap, create_bitmap(numOfbitmap * 220, 200) succeeds in execution. This is an unacceptible solution but it does fix my create_bitmap() problem. I am currently looking for the real solution via the debugging of Allegro and SVGALib source code.

Based on the research I did on Allegro, I believe, this
problem is not in my application. It is an internal
issue between Allegro 3.9.36/SVGALib 1.4.3 and Red
Hat Linux 7.2, which is handled improperly.

I also tried Allegro 3.9.37 and the later versions upto 4.0.1 but their tests/test programs no longer recognize the existence of SVGALib driver. In the Allegro 3.9.37 case, my
application crashes at calling set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) because the driver Allegro is looking for, either VBE/AF or FB driver, does not exist.

Please help develop the real solution. FYI, my application has
no problems to run on STPC CONSUMERBD running Red Hat
Linux 6.2. It is still using GFX_AUTODETECT as the
first paramater to set_gfx_mode(). In allegro.cfg, the
gfx_card= value is "SVGA".
 
Old 05-31-2002, 11:41 AM   #2
tommyclee
LQ Newbie
 
Registered: May 2002
Location: Redmond, WA USA
Distribution: www.linux.org
Posts: 11

Original Poster
Rep: Reputation: 0
I did following steps to install 3.9.37:

# ./configure
# make;make install

Then I discovered *alleg*.so files under /usr/local/src/allegro-3.9.37 and /usr/local/lib/allegro as below:

[root@localhost allegro-3.9.37]# find . -name *alleg*.so
./lib/unix/liballeg-3.9.37.so
./lib/unix/alleg-esddigi-3.9.37.so
./lib/unix/alleg-dga2-3.9.37.so
[root@localhost allegro-3.9.37]# find /usr -name *alleg*.so
/usr/local/lib/liballeg-3.9.37.so
/usr/local/lib/allegro/alleg-esddigi-3.9.37.so
/usr/local/lib/allegro/alleg-dga2-3.9.37.so
/usr/local/src/allegro-3.9.37/lib/unix/liballeg-3.9.37.so
/usr/local/src/allegro-3.9.37/lib/unix/alleg-esddigi-3.9.37.so
/usr/local/src/allegro-3.9.37/lib/unix/alleg-dga2-3.9.37.so

After that I found two identical modules.lst files under /usr/local/src/allegro-3.9.37 and /usr/local/lib/allegro. Looking into one of them, I found "alleg-svgalib-3.9.37.so" on the *so list:

[root@localhost allegro-3.9.37]# cat < /usr/local/lib/allegro/modules.lst
# List of modules to be loaded by the Unix version of Allegro.

alleg-svgalib-3.9.37.so
alleg-dga2-3.9.37.so
alleg-esddigi-3.9.37.so
alleg-alsadigi-3.9.37.so
alleg-alsamidi-3.9.37.so

I am finding out why alleg-svgalib-3.9.37.so is listed but not created by the 3.9.37 installation sequence.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setlocale() returns NULL mic Programming 2 11-08-2005 03:49 AM
fstab-sync: error: libhal_ctx_init_direct: (null): (null) rpz Linux - Hardware 1 11-01-2005 05:42 AM
Rhythmbox returns failed to activate the shell: (null) Minderbinder Linux - Software 0 06-04-2004 05:41 PM
Kmalloc returns null iannou Linux - General 0 06-28-2003 10:36 AM
Allegro Trex005 Linux - General 6 09-06-2001 07:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration