. - .
 
Hively Tracker
News ::  About ::  Forum ::  Download ::  Tunes ::  Screenshots ::  Competition ::  Links
 
. - .
. - .
 
User 
Password 
Create new account
 
. - .

. - .
 
Cool Sites
 
. - .

. - .
 
Link to us
 
. - .

. - .
  Forums > Hively Tracker Support > chiprolled crashes the replayer...even with hvl_replay.c 1.6!!!

Page: 1

chiprolled crashes the replayer...even with hvl_replay.c 1.6!!!

freedrull
Posted: 2009-08-28 02:47:07
Just looking around
Posts: 7

Member since:
2009-07-28 18:05:23
On my machine, the linux command line replayer segfaults when you try to play chiprolled.hvl. I copied the latest hvl_replay.c and hvl_replay.h from the windows command line replayer and compiled it with those, but it still crashes! I tried to modify play_hvl.c to make it behave more like the windows replayer...but I have not figured it out yet...
freedrull
Posted: 2009-08-28 03:14:11
Just looking around
Posts: 7

Member since:
2009-07-28 18:05:23
Ran it through GDB and it looks like its crashing at hvl_mixchunk...


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7ea1b70 (LWP 10098)]
0x0804ee19 in hvl_mixchunk (ht=0xb7671008, samples=0,
 buf1=0x817e980 "y�", buf2=0x817f000
 <Address 0x817f000 out of bounds>, bufmod=4)
    at hvl_replay.c:1999
Xeron
Posted: 2009-09-06 14:34:12
Supreme Being
Posts: 448

Member since:
2006-12-13 11:34:00
I'll have a look when I get a chance.
AHX forever!
freedrull
Posted: 2009-09-17 02:03:25
Just looking around
Posts: 7

Member since:
2009-07-28 18:05:23
I noticed chiprolled is one of the few songs that has a Speed Multiplier of 2. I changed it to Speed 1 and it plays fine with segfaulting. So perhaps it is related to this?

I changed a song I made to have speed 2, and it also segfaults. I changed the part of the code that loads the module from this:
ht->ht_SpeedMultiplier = ((buf[6]>>5)&3)+1;


to this:
ht->ht_SpeedMultiplier = 1;


And the segfault does not occur, although obviously the speed is not correct. So perhaps something is wrong with:

ht->ht_SpeedMultiplier = ((buf[6]>>5)&3)+1;

Xeron
Posted: 2009-09-29 09:33:38
Supreme Being
Posts: 448

Member since:
2006-12-13 11:34:00
No, the problem is not with that line. That just reads the speed multiplier from the line. I haven't had a chance to look at it yet, but I will try to this week.
AHX forever!
freedrull
Posted: 2009-10-07 18:46:39
Just looking around
Posts: 7

Member since:
2009-07-28 18:05:23
Sorry, obviously the problem is not with the hively replayer libs themselves >_<, as the windows replayer does not crash on chiprolled.hvl. It is simply with this replayer code.
dc_coder_84
Posted: 2010-10-15 21:13:27
Just looking around
Posts: 8

Member since:
2010-10-15 20:44:15
I got a segmentation fault too with the linux replayer under Xubuntu 10.10. I did some investigation:

manu@manus-pc:~/bin/replayer_linux$ gdb ./hvlplayer
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.o
rg/licenses/gpl.html>
This is free software: you are free to change and redist
ribute it.
There is NO WARRANTY, to the extent permitted by law.  T
ype "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"
;.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/manu/bin/replayer_linux/hvlpl
ayer...done.
(gdb) set args drainage\ problem.hvl
(gdb) break hvl_replay.c:1962
Breakpoint 1 at 0x4081fd: file hvl_replay.c, line 1962.
(gdb) start
Temporary breakpoint 2 at 0x408402: file play_hvl.c, lin
e 79.
Starting program: /home/manu/bin/replayer_linux/hvlplaye
r drainage\ problem.hvl
[Thread debugging using libthread_db enabled]

Temporary breakpoint 2, main (argc=2, argv=0x7fffffffe1e
8) at play_hvl.c:79
79      int i, loop=0;
(gdb) c
Continuing.
[New Thread 0x7fffef5d6710 (LWP 2691)]
[Thread 0x7fffef5d6710 (LWP 2691) exited]
[New Thread 0x7fffef5d6710 (LWP 2692)]
[New Thread 0x7fffeedd5710 (LWP 2693)]
Songname: drainage problem
Channels: 7
Instruments:
01: xeron / iris
02: 2008
03: 
04: I wanted to do
05: something different
06: and i guess this
07: is different :-)
08: 
09: 
10: 
[Switching to Thread 0x7fffeedd5710 (LWP 2693)]

Breakpoint 1, hvl_DecodeFrame (ht=0x7fffee5a6010, buf1=0
x66fce0 "", 
    buf2=0x670460 "", bufmod=2) at hvl_repla
y.c:1964
1964      samples = ht->ht_Frequency/50/ht->ht_SpeedMult
iplier;
(gdb) n
1965      loops   = ht->ht_SpeedMultiplier;
(gdb) n
1969        hvl_play_irq( ht );
(gdb) n
1970        hvl_mixchunk( ht, samples, buf1, buf2, bufmo
d );
(gdb) n
1971        buf1 += samples * 4;
(gdb) n
1972        buf2 += samples * 4;
(gdb) n
1973        loops--;
(gdb) n
1974      } while( loops );
(gdb) n
1969        hvl_play_irq( ht );
(gdb) n
1970        hvl_mixchunk( ht, samples, buf1, buf2, bufmo
d );
(gdb) n
1971        buf1 += samples * 4;
(gdb) n
1972        buf2 += samples * 4;
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fd7700 (LWP 2688)]
0x0000000000408589 in main (argc=2, argv=0x7fffffffe1e8)
 at play_hvl.c:117
117            while(!tune->ht_SongEndReached)


It looks like there is a problem with buf1 and buf2. They get their addresses from the audio buffer in play_hvl.c. I doubled the memory of this buffer when he is declared (line 15, play_hvl.c):

int16 audiobuffer[2][1920];


Now it works fine. I am too lazy at the moment to investigate further...but hey, better than nothing :)

Kind regards,
dc_coder_84

C programmers never die, they just get cast into void.

Page: 1
 
. - .