I did more testing with latest revision (6679). I made pure command-line version of the tester and I do not get the crash. However I get random failing of the test. Sometimes the string is not returned, instead null string. The project is attached. Test 239 is disabled, and test 240 reports always fail because the string gets mangled ("test\n" --> "init_child_tty: /dev/pts/13\ntest\n") when debugging is on. However, when you look the output files, you will see that without mangling only the other case would really fail.
Adjusting the wait value (from 0.1 to 0.5) doesn't make any difference. Jussi On Mon, Nov 24, 2014 at 1:15 AM, Jussi Lahtinen <jussi.lahti...@gmail.com> wrote: > > 1) Can you try with revision #6671? It should not change anything, but >> then we will run exactly the same code. >> > > I did that and nothing seemed to change in regards of this problem, just > like expected. > > > > 2) Can you uncomment the line #64 in the >> '/trunk/main/gbx/gbx_c_process.c' source file before recompiling? That >> way you will have many debugging message that will allow to know what >> happens behind the curtain. >> > > I recompiled with the debugging on, but this changed the situation. > No more crash, but GambasTester gave error 239, which means the content of > sTest was not "test" as expected. > Instead the string contains "init_child_tty: /dev/pts/13\ntest\n", so I > temporarily commented out the return line. > Still, no more crashing. > I attached output of non-crashing run, if there is any help from it. > > I will investigate more later. > > > > 3) In the future, will you modify your project to be purely command-line >> (no dialog, no window, no GUI used at all)? Note that if you use a GUI >> component, you use its event loop, not the one provided by the >> interpreter. That may change the behaviour of bugs... >> > > Yes I can do that, but not sure if I have understood this right... > shouldn't there then be GambasTester for Qt4, GTK+ and for command line? > > > > Jussi > >
mTest.DoTests.364: This Gambas version is somewhat tested for string errors. run_process 0xd4ab58: echo 'This Gambas version is somewhat tested for string errors.' | md5sum init_child() fork: pid = 25520 watch: out = 3 err = 5 run_process: check child state immediately run_process: child is OK Waiting for 25520 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 >> callback_child Process 25520 has returned 0 stop_process: 0xd4ab58 stop_process_after: 0xd4ab58 callback_error: 5 0xd4ab58 exit_process: 0xd4ab58 unwatch & close: 3 unwatch & close: 5 Raising Kill event for 0xd4ab58: parent = 0xd3df88 can raise = 0 exit_child() << callback_child Waiting for: got it ! Process_free 0xd4ab58 exit_process: 0xd4ab58 run_process 0xd4ab58: echo test run_process: slave = /dev/pts/12 init_child() fork: pid = 25523 watch: out = 3 err = -1 run_process: check child state immediately run_process: child is OK callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 callback_write: 3 0xd4ab58 unwatch & close: 3 >> callback_child Process 25523 has returned 0 stop_process: 0xd4ab58 stop_process_after: 0xd4ab58 Raising Kill event for 0xd4ab58: parent = 0xd3df88 can raise = 0 exit_child() << callback_child mTest.DoTests.1544: init_child_tty: /dev/pts/12 Process_free 0xd4ab58 exit_process: 0xd4ab58 ERROR: 240
mTest.DoTests.364: This Gambas version is somewhat tested for string errors. run_process 0x1060b58: echo 'This Gambas version is somewhat tested for string errors.' | md5sum init_child() fork: pid = 25532 watch: out = 3 err = 5 run_process: check child state immediately run_process: child is OK Waiting for 25532 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 >> callback_child Process 25532 has returned 0 stop_process: 0x1060b58 stop_process_after: 0x1060b58 callback_error: 5 0x1060b58 exit_process: 0x1060b58 unwatch & close: 3 unwatch & close: 5 Raising Kill event for 0x1060b58: parent = 0x1053f88 can raise = 0 exit_child() << callback_child Waiting for: got it ! Process_free 0x1060b58 exit_process: 0x1060b58 run_process 0x1060b58: echo test run_process: slave = /dev/pts/12 init_child() fork: pid = 25535 watch: out = 3 err = -1 run_process: check child state immediately run_process: child is OK callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 callback_write: 3 0x1060b58 >> callback_child Process 25535 has returned 0 stop_process: 0x1060b58 stop_process_after: 0x1060b58 exit_process: 0x1060b58 unwatch & close: 3 Raising Kill event for 0x1060b58: parent = 0x1053f88 can raise = 0 exit_child() << callback_child mTest.DoTests.1544: init_child_tty: /dev/pts/12 test Process_free 0x1060b58 exit_process: 0x1060b58 ERROR: 240
GambasTestercmd-0.9.28.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user