BTCs for free

Forums
Discussions and forums
Valarsoft forum section, you can register to write in the forums or you can only read forum posts.
You can post in english (main language) or italian (if you prefer).

All the forums Games Ghouls and ghosts Remix
only in discussions
Ghouls and ghosts Remix
Discussions about Ghouls and ghosts Remix game
Creato il July 19 2009 (16:57:42), moderator: arraffaele (group: Default)
You can: read posts.

Author Message

ivprimi77
March 22 2011 (14:24:58)

Problemi con Linux

Ciao,

Anche se non sono mai stato un grande giocatore di Ghost'n Goblins
mi ha fatto molto piacere vedere che qualcuno ne aveva creato una sorta di clone open source,
per giunta migliore dell'originale.
Purtroppo, a partire dalla versione 0.47 ho dei problemi a giocare sotto Linux.
Subito dopo la presentazione (quella in cui viene mostrata la mappa del percorso da completare)
il programma crasha con il seguente messaggio:

Shutting down Allegro due to signal #11
Segmentation fault

Il sistema operativo con cui lavoro è Slackware Linux 13.1 (64 bit). Questo
è il risultato di uname -a sulla mia macchina

Linux starhunter 2.6.33.4 #3 SMP Tue Sep 21 17:42:09 CDT 2010 x86_64 Intel(R) Core(TM)2 Duo CPU U9400 @ 1.40GHz GenuineIntel GNU/Linux

Il mio compilatore è GCC 4.4.4 e la versione di Allegro installata sulla mia macchina è 4.2.2 .
La mia scheda grafica è una ATI mobility Radeon HD 4330 che funziona
con il driver open di X.org (X11) versione 7.4 .

Purtroppo non so darti altre informazioni, non ho mai debuggato un programma di questo tipo
con GDB.
Grazie ancora per il gioco,

Ivano

arraffaele
March 22 2011 (20:33:43)

Io sono ruscito a compilarlo ed eseguirlo senza problemi sotto linux (anche se uso ubuntu x86 a 32 bit), non so se il problema è legato ai tuoi 64bit, puoi provare prima a ricompilare allegro a 64 bit, magari il problema dipende dalla libreria... Ciao

ivprimi77
March 26 2011 (10:23:49)

La mia versione di Allegro è a 64 bit e probabilmente il problema è proprio il passaggio
dai 32 ai 64 bit. Compilando il programma noto diverse "deprecated conversions".
Non vorrei che il problema fossero delle conversioni di tipo (o magari assunzioni
sulle dimensioni dei tipi 'int', 'long' etc.) che funzionano su macchine a 32 ma non su
macchine a 64 bit
Grazie per la tua pronta risposta.

arraffaele
March 26 2011 (11:04:34)

di nulla!
Se riesci a capire qualcosa di più comunicacelo...
Ciao!

kur1g3n
September 19 2011 (23:00:13)

Hello, i dont know what language you are speaking, but i think we do have the same bug.

Im trying to run this game on a 64bits archlinux distro, and i get a segfault at the begin of the first level (after the “map show”)

Running GDB, here is what i get first :

(gdb) bt
#0 0x0000000000406309 in map::drawMap (this=0x1214700) at class/map.h:225
#1 0x0000000000451f34 in layer_0 () at game.h:2337
#2 0x000000000045ed03 in main () at game.cpp:61



The pointed line is :
draw_sprite(out,tile[data[x+tilepos_x][y+tilepos_y]],x*tile_w-scroll_dx,y*tile_h-scroll_dy);


GDB says some weird values for tilepos_x and tilepos_y :

(gdb) print x
$9 = 0
(gdb) print y
$10 = 0
(gdb) print tilepos_x
$11 = -16711681
(gdb) print tilepos_y
$12 = -65281




Also, while i tried to make a proper gdb log (relaunched the game), i got a different segfault, with the game that started to show :


And the segfault changed :
Program received signal SIGSEGV, Segmentation fault.
0x0000000000401c85 in draw_sprite (bmp=0x707960, sprite=0x610000006100, x=0, y=224)
at /usr/include/allegro/inline/draw.inl:238
238 AL_INLINE(void, draw_sprite, (BITMAP *bmp, BITMAP *sprite, int x, int y),
(gdb) bt
#0 0x0000000000401c85 in draw_sprite (bmp=0x707960, sprite=0x610000006100, x=0, y=224)
at /usr/include/allegro/inline/draw.inl:238
#1 0x0000000000406330 in map::drawMap (this=0x7fffe18b1950) at class/map.h:225
#2 0x0000000000452dd7 in layer_h () at game.h:2394
#3 0x000000000045ed33 in main () at game.cpp:64


So this still is a segfault happening when calling draw_sprite().
I can help more since i dont know much about C++ and allegro (im a C dev) but x and y looks OK, so the bug might be affecting bmp or sprite which are pointers, and bmp pointer looks short.
Too bad i cant get address for "out" variable in the first GDB.

I hope this will help to solve this.


Total visitors 21670069 (10055 today) (Page generated in 0.25306 seconds, 83 queries)
Powered by: Webmatic 3.1.2 beta