Getting segfault running with 8.5.2 and Mac OS X 10.5.3

View: New views
4 Messages — Rating Filter:   Alert me  

Getting segfault running with 8.5.2 and Mac OS X 10.5.3

by Trevor Williams-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After upgrading to Tcl/Tk to version 8.5.2 (I was using the 8.5b3  
version which exhibited the same behavior) and Mac OS X 10.5.3, I am  
now getting a segfault when I bring up my Tcl/Tk application, move the  
mouse around on the application window and then wait for a couple of  
seconds.  Here's the stacktrace:


(gdb) where
#0  0x0b0d2978 in Tk_ResetUserInactiveTime ()
#1  0x0b0d30ff in Tk_UpdatePointer ()
#2  0x0b0c59f2 in TkGenerateButtonEvent ()
#3  0x0b0b9d07 in TkMacOSXGetHostToplevel ()
#4  0x0b0d1b5f in Tk_ResetUserInactiveTime ()
#5  0x94661763 in DispatchEventToHandlers ()
#6  0x94660b9d in SendEventToEventTargetInternal ()
#7  0x9467d4ee in SendEventToEventTarget ()
#8  0x9468fb90 in ToolboxEventDispatcherHandler ()
#9  0x94661b1c in DispatchEventToHandlers ()
#10 0x94660b9d in SendEventToEventTargetInternal ()
#11 0x9467d4ee in SendEventToEventTarget ()
#12 0x0b0d1f4b in Tk_ResetUserInactiveTime ()
#13 0x0b0c5dd7 in Tk_MacOSXSetupTkNotifier ()
#14 0x0a07c871 in Tcl_DoOneEvent ()
#15 0x0b013cc8 in Tk_MainLoop ()
#16 0x00076757 in command_report (argc=3, last_arg=1, argv=0xbffff740)  
at report.c:983
#17 0x00067eb5 in main (argc=3, argv=0xbffff740) at main.c:196


Anyone else seeing something similar?  Should I being using a  
particular version of Tcl/Tk on my Mac?  I appreciate anyone's help.

Thanks,
Trevor Williams

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac

Re: Getting segfault running with 8.5.2 and Mac OS X 10.5.3

by Jeff Hobbs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Trevor Williams wrote:

> After upgrading to Tcl/Tk to version 8.5.2 (I was using the 8.5b3  
> version which exhibited the same behavior) and Mac OS X 10.5.3, I am  
> now getting a segfault when I bring up my Tcl/Tk application, move the  
> mouse around on the application window and then wait for a couple of  
> seconds.  Here's the stacktrace:
>
> (gdb) where
> #0  0x0b0d2978 in Tk_ResetUserInactiveTime ()
> #1  0x0b0d30ff in Tk_UpdatePointer ()
> #2  0x0b0c59f2 in TkGenerateButtonEvent ()
> #3  0x0b0b9d07 in TkMacOSXGetHostToplevel ()
> #4  0x0b0d1b5f in Tk_ResetUserInactiveTime ()
        ...

Anything specific your app is doing?  Can you pare it down?

Jeff

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac

Re: Getting segfault running with 8.5.2 and Mac OS X 10.5.3

by Daniel A. Steffen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Trevor,

I cannot reproduce this crash, it looks like you may not be running  
your application on stock Tcl/Tk?

your backtrace seems to indicate that the crashing  
Tk_ResetUserInactiveTime() is called from non-standard places, in  
stock tk this is only every called from the implementation of [tk  
inactive reset] (i.e. from Tk_TkObjCmd()). Are you using this command?

the backtrace as a whole does not make a lot of sense to me, I don't  
understand e.g. why SendEventToEventTarget() should be called from  
Tk_ResetUserInactiveTime() or why DispatchEventToHandlers() would be  
calling Tk_ResetUserInactiveTime() in turn...

possibly the stacktrace is bogus due to stack corruption, you can try  
putting a breakpoint in Tk_ResetUserInactiveTime() to get a backtrace  
from immediately before the crash.

otherwise you will need to provide more detailed instructions to  
reproduce the problem and/or debug yourself any custom code and  
modifications you made to tcl/tk.


On 07/06/2008, at 18:58, Trevor Williams wrote:

> #0  0x0b0d2978 in Tk_ResetUserInactiveTime ()
> #1  0x0b0d30ff in Tk_UpdatePointer ()
> #2  0x0b0c59f2 in TkGenerateButtonEvent ()
> #3  0x0b0b9d07 in TkMacOSXGetHostToplevel ()
> #4  0x0b0d1b5f in Tk_ResetUserInactiveTime ()
> #5  0x94661763 in DispatchEventToHandlers ()
> #6  0x94660b9d in SendEventToEventTargetInternal ()
> #7  0x9467d4ee in SendEventToEventTarget ()
> #8  0x9468fb90 in ToolboxEventDispatcherHandler ()
> #9  0x94661b1c in DispatchEventToHandlers ()
> #10 0x94660b9d in SendEventToEventTargetInternal ()
> #11 0x9467d4ee in SendEventToEventTarget ()
> #12 0x0b0d1f4b in Tk_ResetUserInactiveTime ()
> #13 0x0b0c5dd7 in Tk_MacOSXSetupTkNotifier ()
> #14 0x0a07c871 in Tcl_DoOneEvent ()
> #15 0x0b013cc8 in Tk_MainLoop ()
> #16 0x00076757 in command_report (argc=3, last_arg=1, argv=0xbffff740)
> at report.c:983
> #17 0x00067eb5 in main (argc=3, argv=0xbffff740) at main.c:196


Cheers,

Daniel

--
** Daniel A. Steffen                   **
** <mailto:das@...>  **



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac

Re: Getting segfault running with 8.5.2 and Mac OS X 10.5.3

by Trevor Williams-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The Tcl/Tk is stock.  I have not made any modifications to its code; however, I would agree that the stack trace doesn't make sense to me either (from what little I have looked at the source code).  I attempted to run valgrind on it and saw several errors from within Tk libraries (I don't have access to my machine at the moment, but I can provide those error messages this evening if folks would like to see them).  Additionally, I am not calling the 'tk inactive reset' command from within any of my code, so most likely the stack trace is corrupted as you have suggested.

My project is open source, so I would be very comfortable providing the source (about 2MB tar/gzipped) and  build instructions (the project doesn't require any third-party libraries -- just stock GNU tools) if someone would be willing to replicate this problem exactly.

Let me know what would be helpful.

Thanks,
Trevor


On Mon, Jun 9, 2008 at 11:59 AM, Daniel A. Steffen <das@...> wrote:
Hi Trevor,

I cannot reproduce this crash, it looks like you may not be running your application on stock Tcl/Tk?

your backtrace seems to indicate that the crashing Tk_ResetUserInactiveTime() is called from non-standard places, in stock tk this is only every called from the implementation of [tk inactive reset] (i.e. from Tk_TkObjCmd()). Are you using this command?

the backtrace as a whole does not make a lot of sense to me, I don't understand e.g. why SendEventToEventTarget() should be called from Tk_ResetUserInactiveTime() or why DispatchEventToHandlers() would be calling Tk_ResetUserInactiveTime() in turn...

possibly the stacktrace is bogus due to stack corruption, you can try putting a breakpoint in Tk_ResetUserInactiveTime() to get a backtrace from immediately before the crash.

otherwise you will need to provide more detailed instructions to reproduce the problem and/or debug yourself any custom code and modifications you made to tcl/tk.



On 07/06/2008, at 18:58, Trevor Williams wrote:

#0  0x0b0d2978 in Tk_ResetUserInactiveTime ()
#1  0x0b0d30ff in Tk_UpdatePointer ()
#2  0x0b0c59f2 in TkGenerateButtonEvent ()
#3  0x0b0b9d07 in TkMacOSXGetHostToplevel ()
#4  0x0b0d1b5f in Tk_ResetUserInactiveTime ()
#5  0x94661763 in DispatchEventToHandlers ()
#6  0x94660b9d in SendEventToEventTargetInternal ()
#7  0x9467d4ee in SendEventToEventTarget ()
#8  0x9468fb90 in ToolboxEventDispatcherHandler ()
#9  0x94661b1c in DispatchEventToHandlers ()
#10 0x94660b9d in SendEventToEventTargetInternal ()
#11 0x9467d4ee in SendEventToEventTarget ()
#12 0x0b0d1f4b in Tk_ResetUserInactiveTime ()
#13 0x0b0c5dd7 in Tk_MacOSXSetupTkNotifier ()
#14 0x0a07c871 in Tcl_DoOneEvent ()
#15 0x0b013cc8 in Tk_MainLoop ()
#16 0x00076757 in command_report (argc=3, last_arg=1, argv=0xbffff740)
at report.c:983
#17 0x00067eb5 in main (argc=3, argv=0xbffff740) at main.c:196


Cheers,

Daniel

--
** Daniel A. Steffen                   **
** <mailto:das@...>  **




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac
LightInTheBox - Buy quality products at wholesale price!