caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Line number for index out of bounds
@ 2006-03-06 13:11 Jonathan Harrop
  2006-03-07  9:39 ` Nicolas Pouillard
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Harrop @ 2006-03-06 13:11 UTC (permalink / raw)
  To: Andries Hekstra, Richard Jones; +Cc: caml-list

On Mon Mar  6 11:14 , Richard Jones <rich@annexia.org> sent:
>* Surround every possible array index with a try ... with expression

Perhaps you could write a camlp4 macro to wrap uses of a.(i) in a try ... with block that logs the 
line number?

Cheers,
Jon.


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Line number for index out of bounds
@ 2006-03-06 10:44 Andries Hekstra
  2006-03-06 11:14 ` [Caml-list] " Richard Jones
  2006-03-07 15:55 ` Alan Falloon
  0 siblings, 2 replies; 9+ messages in thread
From: Andries Hekstra @ 2006-03-06 10:44 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

Dear OCaml-List,

Thanks for replies to my previous email about a crashing Objective Caml 
program which simulates a next generation optical storage system that 
crashed due to an NFS error after 2 days of running. Special thanks to 
Gerd Stolpmann. In the mean time the program has computed for one and a 
half day more, ca. 3.5 days, and gives an index out of bound error, see 
below.

===================================================================================================

                 BestDelayLeadingPitEdgeInPerc = 23.0, 
bestAsymmetryInPerc= 10.1 
                 1-Track ScalarDiffr. for 38.8 rawGb with 6.1 pixels/bit 
and 83.3 bits/spot ................Fatal error: exception 
Invalid_argument("index out of bounds")
===================================================================================================

This is better than a C++ program giving a segmentation fault, as one now 
knows the reason of the crash. 
Of course, I am very curious in which line number of the program this 
exception occurs. 
Is there any way to get hold of this line number?

Best regards,

=Andries

------------------------------------------------------------------------
Dr. Ir. Andries P. Hekstra
Philips Research 
High Tech Campus 27  (WL-1-4.15)
5656 AG Eindhoven
Tel./Fax/Secr. +31 40 27 42048/42566/44051 
   *  Good open source break software for computer users : 
http://www.workrave.org 

[-- Attachment #2: Type: text/html, Size: 1962 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-03-12 11:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-06 13:11 [Caml-list] Line number for index out of bounds Jonathan Harrop
2006-03-07  9:39 ` Nicolas Pouillard
  -- strict thread matches above, loose matches on Subject: below --
2006-03-06 10:44 Andries Hekstra
2006-03-06 11:14 ` [Caml-list] " Richard Jones
2006-03-06 14:39   ` Markus Mottl
2006-03-06 19:08   ` Andries Hekstra
2006-03-06 19:53     ` Richard Jones
2006-03-12 10:17     ` Martin Jambon
2006-03-12 11:02       ` Richard Jones
2006-03-07 15:55 ` Alan Falloon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).