Artifacts Associated With Ticket 1481986
Ticket change [dc5a836544] (rid 114463) by nobody on 2006-05-04 16:57:19:
- assignee initialized to: "nijtmans"
- cmimetype initialized to: "text/plain"
- comment initialized to:
From: [email protected] (Andrew Lin) After some discussion, DonP thinks it is necessary to patch this misfeature. A quick patch will be appreciated. OS: Redhat Fedora 4 Problem: I use Tcl_SetMainLoop to setup myEventLoop for Qt window. However, Tcl_Main first blocks at tcl prompt "%" instead of starting myEventLoop until I hit RETURN, then myEventLoop starts properly while tcl prompt continues to accept command. Expected: Tcl_Main should enter interactive mode and run myEventLoop without waiting for RETURN at tcl prompt. Sample: Tcl_SetMainLoop(myEventLoop); Tcl_Main(1, argv, Tcl_AppInit);
- foundin initialized to: "obsolete: 8.4.9"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "02. Event Loops"
- title initialized to:
Tcl_Main blocks before starting my loop in Tcl_SetMainLoop
- type initialized to: "Bug"
Ticket change [562fd8139b] (rid 94274) by dgp on 2006-05-05 00:27:13:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Here's a patch against 8.4.13 to test.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "50. Embedding Support"
- username: "dgp"
Ticket change [42f3f078f8] (rid 116466) by dgp on 2006-05-05 00:27:14:
- icomment:
File Added - 176859: 1481986.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1481986.patch" [0858c38c92] (rid 89549) by dgp on 2006-05-05 23:48:04.
Ticket change [72598e55b8] (rid 100841) by dgp on 2006-05-05 23:48:04:
- icomment:
File Deleted - 176859: File Added - 176962: 1481986.patch Logged In: YES user_id=80530 New patch cleans up the code indentation, and supplies a test case showing the patch works.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [caa94d45b1] (rid 95395) by dgp on 2006-05-05 23:52:39:
- icomment:
Logged In: YES user_id=80530 hmmm.... and now that test case is showing the fix to be incomplete. investigating...
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2c704cabcd] (rid 118903) by dgp on 2006-05-06 00:02:32:
- icomment:
Logged In: YES user_id=80530 I think my testing just went off a bit. Try the patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [158f2c5c21] (rid 124585) by nobody on 2006-05-06 00:58:16:
- icomment:
Logged In: NO Thanks Don, I downloaded 1481986.patch against 8.4.13 but it still had the same blocking problem. Then I traced down to Tcl_GetsObj() is actually blocking for RETURN in Tcl_Main, so I added "if (mainLoopProc == NULL)" to skip that code segment when Tcl_SetMainLoop is used. With this change, now Tcl_Main starts myEventLoop properly while giving me the interactive tcl prompt. Do you expect any side-effect from this change in tclMain.c? 352a353,354 > // 2006.5.5 alin Do not block if mainLoopProc set > if (mainLoopProc == NULL) { 374a377 > } - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [d4f219685a] (rid 123532) by dgp on 2006-05-06 01:06:27:
- icomment:
Logged In: YES user_id=80530 Somehow you're not testing the patched version. If you use the patched version, you should not reach Tcl_GetObj() (line 354) because the (mainLoopProc == NULL) test on line 338 should be false and send control on to line 415. Re-check your testing, or use the test suite case in the more recent patch to verify the bug fix.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [cf8a4d6a6e] (rid 112998) by dgp on 2006-05-06 01:10:25:
- closedate changed to: "2006-05-05T18:10:25"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 fix committed for 8.4.14 and 8.5a5
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
Ticket change [c80b6f6e93] (rid 122041) by nobody on 2006-05-06 04:04:28:
- icomment:
Logged In: NO Yes the new patch is good! After I rebuilt my application, Tcl_Main starts myEventLoop properly while giving me the interactive tcl prompt as expected. Thank you for fixing this problem so quickly, will wait for patch in 8.4.14 release. Thanks, Andrew ([email protected])
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment: