TkHTML 2.0 and Tk-Cocoa

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

TkHTML 2.0 and Tk-Cocoa

by Kevin Walzer-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

Because of some dissatisfaction with the performance of my tkwebview
widget (http://www.codebykevin.com/opensource/xplat_oss.html), I'm
taking another look at TkHTML 2.0. I know that version 3.0 of TkHTML is
under development, but it's an unwieldy and incomplete beast with no
work done on it for at least a year. Hence, my interest in 2.0.

I was able get TkHTML 2.0 to build using the source code from Daniel's
old Tcl/Tk BI source tree, including his patches. While I am able to get
the package to build as a 64-bit universal binary, it freezes and
crashes when I try to run the "hv.tcl" browser script. With debugging
turned on and running the script in gdb, here is the backtrace I get:

(gdb) bt
#0  0x00000001163cd505 in _XFlushGCCache ()
#1  0x00000001163d033f in XFillRectangles ()
#2  0x00000001163aa028 in HtmlRedrawCallback ()
#3  0x0000000100318634 in TclServiceIdle () at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclTimer.c:738
#4  0x00000001002f1397 in Tcl_DoOneEvent (flags=-1) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclNotify.c:993
#5  0x000000010001a3dd in Tk_UpdateObjCmd (clientData=0x100a1f610,
interp=0x1007fb010, objc=1, objv=0x100a0a340) at
/Users/kevin/tk85-patched/tk/unix/../generic/tkCmds.c:1108
#6  0x0000000100243c9f in TclEvalObjvInternal (interp=0x1007fb010,
objc=1, objv=0x100a0a340, command=0x1162cf26a "update\nif {$file!=\"\"}
{\n  LoadFile $file\n}\n\n\n# This binding changes the cursor when the
mouse move over\n# top of a hyperlink.\n#\nbind HtmlClip <Motion> {\n
set parent [winfo parent %W]\n  set url [$pare"..., length=7, flags=0)
at /Users/kevin/tk85-patched/tcl/unix/../generic/tclBasic.c:3688
#7  0x00000001002450d4 in TclEvalEx (interp=0x1007fb010,
script=0x1162cd010 "#\n# This script implements the \"hv\" application.
  Type \"hv FILE\" to\n# view FILE as HTML.\n#\n# This application is
used for testing the HTML widget.  It can\n# also server as an example
of how to use the"..., numBytes=9130, flags=0, line=352) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclBasic.c:4336
#8  0x0000000100244620 in Tcl_EvalEx (interp=0x1007fb010,
script=0x1162cd010 "#\n# This script implements the \"hv\" application.
  Type \"hv FILE\" to\n# view FILE as HTML.\n#\n# This application is
used for testing the HTML widget.  It can\n# also server as an example
of how to use the"..., numBytes=9130, flags=0) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclBasic.c:4041
#9  0x00000001002dc81a in Tcl_FSEvalFileEx (interp=0x1007fb010,
pathPtr=0x112a4fa30, encodingName=0x0) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclIOUtil.c:1814
#10 0x000000010025cf16 in Tcl_SourceObjCmd (dummy=0x0,
interp=0x1007fb010, objc=2, objv=0x100a0a088) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclCmdMZ.c:956
#11 0x0000000100243c9f in TclEvalObjvInternal (interp=0x1007fb010,
objc=2, objv=0x100a0a088, command=0xffffffffffffffff <Address
0xffffffffffffffff out of bounds>, length=-1, flags=0) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclBasic.c:3688
#12 0x00000001002a9cd2 in TclExecuteByteCode (interp=0x1007fb010,
codePtr=0x112d29f10) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclExecute.c:2327
#13 0x00000001002a7428 in TclCompEvalObj (interp=0x1007fb010,
objPtr=0x112cb4d60, invoker=0x0, word=0) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclExecute.c:1450
#14 0x0000000100245f7a in TclEvalObjEx (interp=0x1007fb010,
objPtr=0x112cb4d60, flags=131072, invoker=0x0, word=0) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclBasic.c:5130
#15 0x0000000100245b33 in Tcl_EvalObjEx (interp=0x1007fb010, objPtr=0x0,
flags=131072) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclBasic.c:4938
#16 0x00000001002bf6db in Tcl_RecordAndEvalObj (interp=0x1007fb010,
cmdPtr=0x112cb4d60, flags=131072) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclHistory.c:161
#17 0x00000001002bf473 in Tcl_RecordAndEval (interp=0x1007fb010,
cmd=0x100a1ee28 "source /Users/kevin/Downloads/htmlwidget/hv/hv.tcl\n",
flags=131072) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclHistory.c:59
#18 0x0000000100037284 in StdinProc (clientData=0x112a3ea10, mask=2) at
/Users/kevin/tk85-patched/tk/unix/../generic/tkMain.c:390
#19 0x00000001002cf47e in Tcl_NotifyChannel (channel=0x112a3ea10,
mask=2) at /Users/kevin/tk85-patched/tcl/unix/../generic/tclIO.c:7811
#20 0x0000000100339196 in FileHandlerEventProc (evPtr=0x112a5a050,
flags=-3) at
/Users/kevin/tk85-patched/tcl/unix/../macosx/tclMacOSXNotify.c:1137
#21 0x00000001002f0f11 in Tcl_ServiceEvent (flags=-3) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclNotify.c:677
#22 0x00000001002f1381 in Tcl_DoOneEvent (flags=-3) at
/Users/kevin/tk85-patched/tcl/unix/../generic/tclNotify.c:980
#23 0x000000010002426e in Tk_MainLoop () at
/Users/kevin/tk85-patched/tk/unix/../generic/tkEvent.c:2139
#24 0x0000000100037053 in Tk_MainEx (argc=-1, argv=0x7fff5fbff538,
appInitProc=0x10000450b, interp=0x1007fb010) at
/Users/kevin/tk85-patched/tk/unix/../generic/tkMain.c:321

I'm not sure what's causing the crash here, but I'm posting this in case
it might touch on something in Tk-Cocoa that needs to be looked at...

(P.S. I am running the patched version of Tk-Cocoa that includes
Daniel's recent fixes for the notifier and drawing of images with
transparency.)

Thanks,
Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac

Re: TkHTML 2.0 and Tk-Cocoa

by Daniel A. Steffen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kevin,

On Sat, Aug 22, 2009 at 18:18, Kevin Walzer<kw@...> wrote:
> I was able get TkHTML 2.0 to build using the source code from Daniel's
> old Tcl/Tk BI source tree, including his patches. While I am able to get
> the package to build as a 64-bit universal binary, it freezes and
> crashes when I try to run the "hv.tcl" browser script. With debugging
> turned on and running the script in gdb, here is the backtrace I get:
>
> (gdb) bt
> #0  0x00000001163cd505 in _XFlushGCCache ()

this symbol does not exist anywhere in the Tk sourcetree, I thus
suspect a configuration error or a bug in the TkHtml buildsystem (did
you update to latest tcl.m4 and regenerate configure) that caused it
to pick up and link against the system X11 instead of using the TkAqua
X11 emulation... (check with otool -L against the TkHTML dylib)

HTH

Cheers,

Daniel

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac

Re: TkHTML 2.0 and Tk-Cocoa

by Kevin Walzer-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 8/22/09 3:42 PM, Daniel A. Steffen wrote:

>
> this symbol does not exist anywhere in the Tk sourcetree, I thus
> suspect a configuration error or a bug in the TkHtml buildsystem (did
> you update to latest tcl.m4 and regenerate configure) that caused it
> to pick up and link against the system X11 instead of using the TkAqua
> X11 emulation... (check with otool -L against the TkHTML dylib)
>

Daniel,

You're right, it was linking against X11. However, updating tcl.m4 and
regenerating autoconf has caused a boatload of other problems/errors in
building, owing most likely to the fact that this particular package
hasn't been updated since 2001(?). At this point I'm going to move on.
I've worked out some of the issues I was having with my own simple html
widget (issues with encoding mainly) and so I see no point in pursuing
this further. Thanks.

Kevin


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac

Re: TkHTML 2.0 and Tk-Cocoa

by Kevin Walzer-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 8/22/09 3:42 PM, Daniel A. Steffen wrote:

> Hi Kevin,
>
> On Sat, Aug 22, 2009 at 18:18, Kevin Walzer<kw@...>  wrote:
>> I was able get TkHTML 2.0 to build using the source code from Daniel's
>> old Tcl/Tk BI source tree, including his patches. While I am able to get
>> the package to build as a 64-bit universal binary, it freezes and
>> crashes when I try to run the "hv.tcl" browser script. With debugging
>> turned on and running the script in gdb, here is the backtrace I get:
>>
>> (gdb) bt
>> #0  0x00000001163cd505 in _XFlushGCCache ()
>
> this symbol does not exist anywhere in the Tk sourcetree, I thus
> suspect a configuration error or a bug in the TkHtml buildsystem (did
> you update to latest tcl.m4 and regenerate configure) that caused it
> to pick up and link against the system X11 instead of using the TkAqua
> X11 emulation... (check with otool -L against the TkHTML dylib)
>

Hi Daniel,

I'm revisiting the TkHTML 2.0 build.

I'm getting some very weird output. I've updated tcl.m4 and have run
autoconf. I run configure with these flags:

../configure \
  --prefix=/usr/local --libdir=/Library/Tcl \
          --with-tcl=/Library/Frameworks/Tcl.framework \
          --with-tclinclude=/Library/Frameworks/Tcl.framework/Headers \
          --with-tk=/Library/Frameworks/Tk.framework \
          --with-tkinclude=/Library/Frameworks/Tk.framework/Headers \
          --enable-threads

This should link against my build of Tk-Cocoa 8.5.

However, it still doesn't build. First, make chokes early in the build
with this complaint:

i686-apple-darwin9-gcc-4.0.1: @EXTRA_CFLAGS@: No such file or directory

Tracking down the offending line in the makefile, I find this:

EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@

I have no idea what the issue is, so I comment the line out.

What happens next is that the build goes farther along, to the
"makeheaders" target, and then assumes it's finished...it jumps ahead to
the pkgMakeIndex stuff and generates package files. It skips over all
the rest of the immediate steps and no dylib is built.

I've never seen this kind of bizarre behavior in a build before. It
builds flawlessly against X11. I have no idea what's going on here. Any
advice is appreciated.

Thanks,
Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tcl-mac mailing list
tcl-mac@...
https://lists.sourceforge.net/lists/listinfo/tcl-mac