[Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25"
Date | 2015-12-05 13:08 |
From | Peter Burgess |
Subject | [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Hi there. I am trying to work out why csound occasionally freezes after the output "libsndfile-1.0.25". I am running csound through the c++ API. It runs and resets csound many times over, and just occasionally it trips up as mentioned above. The debugger won't pick it up, presumably because it's not throwing up any errors. I have tried looking through the output using verbose mode, but I'm not sure if that reveals anything either. Here is a portion of the output (I'm not sure how much is relevant, so I've included a reasonable chunk) ... [ It repeats this line "DAG REINIT*************************" so many times it took me around a minute to scroll up to the top of it in terminal ] DAG REINIT************************ After this, it does nothing until you close the app or terminal window. Any thoughts? |
Date | 2015-12-05 14:19 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Did the previous message get through? Usually I get a copy in my inbox straight away, but nothing has come through... On Sat, Dec 5, 2015 at 1:08 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
|
Date | 2015-12-05 14:21 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
It did. On 5 December 2015 at 14:19, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
|
Date | 2015-12-05 14:35 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
ah ok, sorry. maybe it was the old list that sends a copy straight to me On Sat, Dec 5, 2015 at 2:21 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-12-05 15:45 |
From | jpff |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
The DAG renit message should probably go as it says very little Two immediatethoughts 1: did you combine stdout aand stderr? I fnd (in tcsh) csound .... |& tee foo ofte removes some confusions 2: Running under gdb in this case a ^c wen it hangs gives access to a backtrace and clues Of ciyrse this is all linux/unix specific so may be irreklevent. Also valgrind sometimes indicates where to look and just thought.... 3: does it hang the same with -j1 |
Date | 2015-12-05 16:16 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
I got it. I too find sometimes csound fails after many restarts. Regards, On Dec 5, 2015 9:20 AM, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
|
Date | 2015-12-05 16:17 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Yes, try valgrind, it can sometimes identify data races. Regards, On Dec 5, 2015 11:16 AM, "Michael Gogins" <michael.gogins@gmail.com> wrote:
|
Date | 2015-12-05 16:34 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
There is an issue open on a related matter. It appears that there is either some memory corruption or there is something that is not quite reentrant (in the parsing stage). It seems to happen on OSX, not Linux. I could not get to the bottom of it yet. Regards Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-12-05 18:05 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Thanks for all your responses! I forgot to clarify that I am on Linux (ubuntu 14.04) and using the Codeblocks IDE. It's also occured to me that I haven't changed over to 6.06 yet, should I do that? I still see lots of messages regarding bug fixes for the new version.I've just looked up stderr. I don't think I've used that, but then I can't remember what I've done in the GUI code, nor do I know what the GUI library itself might do. I don't know anything about debugger commands, and didn't know what to do with ^c (pressing shift c in terminal closes it) but I just looked up how to get a backtrace, and I've put bt 100 in the debugger initialisation commands in Codeblocks.This makes the debugger say "no stack" lol. I only get to see the callstack when an error is detected. It would be helpful if I could find a way to see the callstack when I want... that side, I've also changed some settings for my debugger that means it shows me lods more info now. I got this error just now: [debug]1546 ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: No such file or directory. It looked like it was just stuck at the same point when it happened, but it also threw a segmentation fault. It hasn't thrown a segmentation fault or produced this error on any other occasion, so this might be a different error again... I'm researching the memcpy error now anyway, see if that leads me anywhere. I have downloaded valgrind, but my app never quite gets going when I try running it under valgrind. Maybe I need to be more patient, just read it slows the run-speed down by around 30 times. I will also test with -j1, and I'll get back to you guys with my results. On Sat, Dec 5, 2015 at 4:34 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2015-12-05 18:44 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
You need to build with the Debug configuration otherwise you will not be able to look up your symbols. I suggest you take some time out learning how to use gdb, if you have not already done so. Learning about valgrind is also useful, but gdb is essential for the work you want to do. regards Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-12-07 10:25 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Ah yes, I hadn't rebuilt with the new settings before debugging again. I think I am starting to track down the bug now, it's not a csound or libsnd error at all. I'm sorry to hassle you guys about it. I've just realised that I reset csound just after each performance cycle, which is when it displays: Csound version 6.05 (double samples) Aug 3 2015 Nothing else comes up in the terminal until the next csound run at the moment, so that means, based on the terminal output alone, the freeze up could occur anywhere in my code between the two csound performances. Victor: You're right ofcourse about learning the debugger, I've taken the easy way out by using an IDE to program in, which means I have yet to learn some of the basics, like how to build and debug from the command line and things like that. I am generally reliant on settings in the IDE. I should spend a bit of time learning to program from the command line, if nothing else, it will probably help me use the IDE better. Cheers for all your continuing help and advice and guys! Pete On Sat, Dec 5, 2015 at 6:44 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2015-12-07 11:01 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
No one said anything about having to use a debugger from the command line! CodeBlocks, along with most IDEs provide access to gdb through their graphical interface. Just don't forget to build and link against the debug version of Csound. Otherwise you won't be able to step through its code. On 7 December 2015 at 10:25, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
|
Date | 2015-12-07 11:40 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
I know, but I don't know anything about the debugger commands, so I'd probably learn more about it if I used it from the command line. Up until this conversation I'd never thought to change any settings to get more info out of the debugger. On Mon, Dec 7, 2015 at 11:01 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-12-07 11:52 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
If you plan to to use the debugger from the command line, then learn to use it from the command line. If you plan to use the debugger in an IDE(which you already use for development), then learn to use it in your IDE. The underlying commands are the exact same, it's just a different interface. On 7 December 2015 at 11:40, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
|
Date | 2015-12-07 11:57 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Hmmm, maybe you're right, I just thought I might benefit from learning what goes on under the hood. On Mon, Dec 7, 2015 at 11:52 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-12-07 12:12 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Thankfully it's hard to learn to use a debugger in any context without learning about what's going on under the hood ;) On 7 December 2015 at 11:57, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
|
Date | 2015-12-07 12:19 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Lol, alright then, maybe I'll stick with my IDE On Mon, Dec 7, 2015 at 12:12 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-12-07 12:41 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Which IDE are you using? Most of them contain an embedded debugger. Did you say CodeBlocks? That one has a pretty good debugger but you might have to configure it. Regards, On Dec 7, 2015 7:19 AM, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
|
Date | 2015-12-07 12:49 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Yeah, CodeBlocks. I've just yesterday found the 'watches' and 'running threads' windows, and found out how to get alot more output from the debugger. All this time I've been adding a pile of 'cout' to my code to work out what's going on. What a chump! :D Pete On Mon, Dec 7, 2015 at 12:41 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2015-12-07 14:21 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
You are not a chump, you are learning. You may be interested to read this: http://michaelgogins.tumblr.com/How_to_Program Regards, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Mon, Dec 7, 2015 at 7:49 AM, Peter Burgess |
Date | 2015-12-07 15:00 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] csound occasionally freezes after "libsndfile-1.0.25" |
Haha, I know, and it's probably a good thing I didn't know about the extra debugger tools really. It forced me to think really hard about what my program was doing instead, and there's no harm in that. I'll give that a look. I've been pooling my learning resources recently. Just started reading "The Linux Programming Interface" as well. I'm reading it from the start, and it's amazing how much basic stuff I didn't know! Every time I think I'm really starting to nail programming (high level programming at least), something happens that shows me that I'm still only scratching the surface. On Mon, Dec 7, 2015 at 2:21 PM, Michael Gogins <michael.gogins@gmail.com> wrote: You are not a chump, you are learning. |