From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 42970BC2F for ; Mon, 29 Nov 2004 21:08:22 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iATK8LPj014689 for ; Mon, 29 Nov 2004 21:08:22 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA08895 for ; Mon, 29 Nov 2004 21:08:21 +0100 (MET) Received: from janus.eecs.berkeley.edu (janus.EECS.Berkeley.EDU [128.32.48.150]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iATK8JhW016686 for ; Mon, 29 Nov 2004 21:08:20 +0100 Received: by janus.EECS.Berkeley.EDU with Internet Mail Service (5.5.2657.72) id ; Mon, 29 Nov 2004 12:08:19 -0800 Message-ID: <4E06A937DADC3842ACE4D3A1096A9EAC016AF38B@janus.EECS.Berkeley.EDU> From: George Necula To: caml-list@inria.fr Subject: Difficulty tracking Not_found uncaught exception from Labltk Date: Mon, 29 Nov 2004 12:08:18 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain X-Miltered: at nez-perce with ID 41AB81B5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41AB81B3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; uncaught:01 labltk:01 trivial:01 uncaught:01 backtrace:01 backtrace:01 hashtbl:01 hashtbl:01 callbacks:01 exception:01 exception:01 exceptions:01 eecs:01 callback:02 top-level:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: Hi, If I bind a trivial action to the `FocusIn event of a canvas, I get "Uncaught exception: Not_found" printed on the console and nothing else. The code that I write is shown below: Tk.bind ~events:[`FocusIn] ~fields:[`MouseX] ~action:(fun _ -> ignore (E.log "got the focus\n")) srccode I was able to track this message to Protocol.protected_dispatch. I tried to change this function to propagate the exception further so that the top-level can print the backtrace. This did not work (the exception is still intercepted by somebody else). I then tried to put a call to call_print_exception_backtrace in the protected_dispatch function. This printed a couple of "caller unknown" lines for the Hashtbl module (but with a wrong line number?). If I turn on Protocol.debug then all I see is "camlcb 29 0". Since I do not see the << printed, this led me to believe that the problem is the Hashtbl.find in Protocol.dispatch_callback. From there I was able to find my problem: I was calling remove_callbacks afterwards. Is there a better way to debug such intercepted exceptions? Thanks, George Necula.