![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Strange error on Allegro upgrade |
Fabiano Lopes
Member #3,024
December 2002
![]() |
I was compiling my emulator with Allegro 4.0.3 (stable) with no problems. On recent upgrade to Allegro 4.1.6 WIP, there's a strange error... Program received signal SIGSEGV, Segmentation fault. 0x67fece63 in clear_bitmap () (gdb) q The program is running. Exit anyway? (y or n) y
I am using an Allegro GUI. In an easy Quit to OS, it freezes. The GDB shows that message. I don't call clear_bitmap() or clear_to_color() in my code. |
ReyBrujo
Moderator
January 2001
![]() |
That is a bug indeed, I think I remember WH suffered it. Let me see if I find the thread... -- |
Kitty Cat
Member #2,815
October 2002
![]() |
Make sure you properly installed the new headers. Also make sure to delete and rebuild all object files and libraries using Allegro. -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
Well, I trust Allegro's makefile firstly... since I did (now) a clean installation of everything, and the problem persists. I use MinGW. In the makefile, i changed '-mcpu=pentium' to '-march=i686', since '-mcpu' is deprecated. |
Kitty Cat
Member #2,815
October 2002
![]() |
Except for the headers part, I meant your program. -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
Needless to say that... |
Daniel Schlyder
Member #257
April 2000
![]() |
Quote: I use MinGW. In the makefile, i changed '-mcpu=pentium' to '-march=i686', since '-mcpu' is deprecated. Not really helping with your problem, but the replacement for -mcpu is -mtune. EDIT: Oh, and pentium is deprecated in favour of i586, not i686, so "-mcpu=pentium" should be changed to "-mtune=i586". |
Fabiano Lopes
Member #3,024
December 2002
![]() |
Oh, thanks for the info. Anyway, I use i686 because I run on Duron 1.1GHz (non-Intel if matters)... Is just me with this clear_bitmap() problem? |
Kitty Cat
Member #2,815
October 2002
![]() |
It sounds like a vtable problem. Everytime I've seen it, it's either due to older headers with a newer lib (or vice versa), stale object files from the project, or libraries that rely on Allegro that haven't been recompiled. -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
During the compiling, there are a few warning messages, related to deprecated items in Allegro... I use the latest gcc (3.4.2 candidate). |
ReyBrujo
Moderator
January 2001
![]() |
Quite possible. Some of the most common functions, like textprintf, have changed to _ex (like textprintf_ex). -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
I'm not saying the comiplation of my emulator, but the Allegro source compiling - like the 'timer_retrace_whatever is deprecated'. |
ReyBrujo
Moderator
January 2001
![]() |
Hmm... where? I did not have problems with that (last time I compiled .16 were months ago). -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
Follows the output: gcc -DALLEGRO_SRC -Wall -Wno-unused -mtune=i686 -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/graphics.o -c src/graphics.c src/graphics.c: In function `set_gfx_mode': src/graphics.c:659: warning: `timer_simulate_retrace' is deprecated (declared at ./include/allegro/alcompat.h:240) Here another warning: gcc -DALLEGRO_SRC -Wall -Wno-unused -mtune=i686 -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/timer.o -c src/timer.c src/timer.c: In function `timer_simulate_retrace': src/timer.c:219: warning: `timer_can_simulate_retrace' is deprecated (declared at src/timer.c:204) Here one more, about lvalues: gcc -DALLEGRO_SRC -Wall -Wno-unused -mtune=i686 -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/wddbmp.o -c src/win/wddbmp.c src/win/wddbmp.c: In function `make_bitmap_from_surface': src/win/wddbmp.c:333: warning: use of cast expressions as lvalues is deprecated src/win/wddbmp.c: In function `gfx_directx_destroy_video_bitmap': src/win/wddbmp.c:509: warning: use of cast expressions as lvalues is deprecated src/win/wddbmp.c: In function `flip_with_forefront_bitmap': src/win/wddbmp.c:565: warning: use of cast expressions as lvalues is deprecated src/win/wddbmp.c:569: warning: use of cast expressions as lvalues is deprecated Here: gcc -DALLEGRO_SRC -Wall -Wno-unused -mtune=i686 -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/wddwin.o -c src/win/wddwin.c src/win/wddwin.c: In function `gfx_directx_show_video_bitmap_win': src/win/wddwin.c:478: warning: use of cast expressions as lvalues is deprecated
|
Peter Wang
Member #23
April 2000
|
The timer retrace ones are fixed in CVS. The cast expression ones come from macros in the DirectX header files so are not our problem.
|
Elias
Member #358
May 2000
|
Did you call "make uninstall" with 4.0.3, and "make install" with the new? Just want to make sure, since as KittyCat said, this problem is normally a version conflict. -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
I deleted the entire C:\Dev-Cpp directory (MinGW + Allegro), and I did a reinstall from scratch. |
Elias
Member #358
May 2000
|
Hm. Also remove the alleg*.dll from the windows system folder. And are you sure all the headers are in C:\Dev-Cpp? Some people also have c:\mingw and c:\msys\mingw and so on Anyway, of course it's possible that there's a bug in clear_bitmap. But it just is quite unlikely, given how many times it is used. Maybe try recompiling, but don't change any optimization flags. It may be connected to that, AJ also reported problems when compiling with /G7 for MSVC. -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
No C:\mingw directories! ^_^;; About the CVS, if this is the package, the graphics.c file is outdated (september), still giving the same warning message. |
Elias
Member #358
May 2000
|
Well, provide some more info then. Can you show the output of "bt" in gdb? And do any of the examples crash? -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
Output of "bt"? What is this? It's not 'an error' in my code, but something 'unusual' to the library that causes such crash. I'll be tracking my GUI to see what's up. |
Elias
Member #358
May 2000
|
Well, you posted some gdb output.. now, instead of typing "q" for quit, type "bt" for backtrace -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
Not much news... Is this a 'loop'? Program received signal SIGSEGV, Segmentation fault. 0x67fece63 in clear_bitmap () (gdb) bt #0 0x67fece63 in clear_bitmap () (gdb) bt #0 0x67fece63 in clear_bitmap () (gdb) q The program is running. Exit anyway? (y or n) y
|
Elias
Member #358
May 2000
|
Hm, no, it means, gdb is somehow confused. try: "info threads" to list all threads - maybe that gives us a hint. Which gdb is this btw? I'm surprised you have a working gdb in windows.. but it's some time I tried to use it there myself, so things apparently improved I assume, since exgui crashes, also other examples crash. I somehow can't help but think this is some sort of version problem, i.e. this isn't about clear_bitmap, but just the symbols got messed up or something. -- |
Fabiano Lopes
Member #3,024
December 2002
![]() |
Program received signal SIGSEGV, Segmentation fault. 0x67fece63 in clear_bitmap () (gdb) info threads 9 thread 1380.0x514 0x7c90eb94 in _libwinmm_a_iname () 8 thread 1380.0x694 0x7c90eb94 in _libwinmm_a_iname () 7 thread 1380.0xf0 0x7c90eb94 in _libwinmm_a_iname () 4 thread 1380.0x4e4 0x7c90eb94 in _libwinmm_a_iname () 3 thread 1380.0x4a0 0x7c90eb94 in _libwinmm_a_iname () 2 thread 1380.0x168 0x7c90eb94 in _libwinmm_a_iname () * 1 thread 1380.0x198 0x67fece63 in clear_bitmap () (gdb) info symbol 0x67fece63 clear_bitmap + 19 in section .text
|
|
1
2
|