#201: Crashes out of the blue
-------------------------+--------------------------------------------------
  Reporter:  paulvt      |       Owner:  admin    
      Type:  Bugs        |      Status:  new      
  Priority:  1           |   Milestone:           
 Component:  Liquidsoap  |     Version:  0.3.8+svn
Resolution:              |    Keywords:           
       Mac:  1           |       Linux:  1        
    Netbsd:  1           |       Other:  1        
   Freebsd:  1           |  
-------------------------+--------------------------------------------------
Comment (by mrpingouin):

 Hi. Thanks for the backtrace, it's very useful.

 It says that you're using list.map() in your liq script. This maps a
 function which, directly or not, uses list.nth(). Currently, if list.nth()
 attempts to access an index that is outside a list, an OCaml-level
 exception will be raised: there's no way to handle it at the level of the
 liq script, and it even crashes the whole app. Your map() is used
 dynamically, during the streaming, and at some point it fails in that way.

 In other words it is a programming error in your script -- or perhaps in
 our utils.liq, where nth is used in two places that I haven't checked, one
 in playlist.once() one for using the metaflac program for getting the
 metadata of FLAC files). The bug is that liq should really do more to help
 you debug it, maybe handle it.

 If you can't spot the error, don't hesitate to show us your script. We may
 also be able to help in designing a solution that does not use nth().

 I see two ways of fixing the bug. Either we let the exception occur but
 catch it as soon as it gets back to the OCaml level. Or we do not allow
 any exception to be produced by script executions, which would involve
 adding a default value to list.nth() that would be returned when the index
 is out of range.

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/201#comment:1>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac

Reply via email to