Thread: [Gambas-user] Problem with Process_Read
Brought to you by:
gambas
|
From: Jussi L. <jus...@gm...> - 2014-11-23 16:32:30
Attachments:
GambasTester-0.9.28.tar.gz
|
With latest revision (6670) my GambasTester crashes randomly when run from terminal. 1. Unpack attached project into some folder, and open terminal to it. 2. gbc3 -ag 3. run "gbx3" several times. mTest.Process_Read.1616: #13: Null object It seem not to crash when run from IDE. [System] Gambas=3.6.90 OperatingSystem=Linux Kernel=3.13.0-39-generic Architecture=x86_64 Distribution=Ubuntu 14.04.1 LTS Desktop=XFCE Theme=QGtk Language=en_US.UTF-8 Memory=3953M [Libraries] Cairo=libcairo.so.2.11301.0 Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.7.6 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.204.0 GTK+3=libgtk-3.so.0.1000.8 GTK+=libgtk-x11-2.0.so.0.2400.23 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 Qt4=libQtCore.so.4.8.6 SDL=libSDL-1.2.so.0.11.4 Jussi |
|
From: Benoît M. <ga...@us...> - 2014-11-23 18:24:16
|
Le 23/11/2014 17:32, Jussi Lahtinen a écrit : > With latest revision (6670) my GambasTester crashes randomly when run from > terminal. > > 1. Unpack attached project into some folder, and open terminal to it. > 2. gbc3 -ag > 3. run "gbx3" several times. > > mTest.Process_Read.1616: #13: Null object > > It seem not to crash when run from IDE. > 1) Can you try with revision #6671? It should not change anything, but then we will run exactly the same code. 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. 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... Thanks! -- Benoît Minisini |
|
From: Jussi L. <jus...@gm...> - 2014-11-23 23:15:47
Attachments:
output.txt
|
> 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 |
|
From: Jussi L. <jus...@gm...> - 2014-11-26 00:43:04
|
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 <jus...@gm...>
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
>
>
|
|
From: Benoît M. <ga...@us...> - 2014-11-27 23:35:08
|
Le 23/11/2014 17:32, Jussi Lahtinen a écrit : > With latest revision (6670) my GambasTester crashes randomly when run from > terminal. > > 1. Unpack attached project into some folder, and open terminal to it. > 2. gbc3 -ag > 3. run "gbx3" several times. > > mTest.Process_Read.1616: #13: Null object > > It seem not to crash when run from IDE. > The bug has been fixed in revision #6681: the SHELL or EXEC command could sometimes raise the "Read" event before its return value has been assigned. Regards, -- Benoît Minisini |
|
From: Jussi L. <jus...@gm...> - 2014-11-28 00:34:45
Attachments:
GambasTestercmd-0.9.29.tar.gz
|
> The bug has been fixed in revision #6681: the SHELL or EXEC command > could sometimes raise the "Read" event before its return value has been > assigned. > GUI version of GambasTester passes without errors (tested 20 times). But command-line version doesn't (the project attached). Test 239 (exec test) fail very often, and test 240 (shell test) rarely. Jussi |
|
From: Benoît M. <ga...@us...> - 2014-11-28 01:08:09
|
Le 28/11/2014 01:34, Jussi Lahtinen a écrit : >> The bug has been fixed in revision #6681: the SHELL or EXEC command >> could sometimes raise the "Read" event before its return value has been >> assigned. >> > > GUI version of GambasTester passes without errors (tested 20 times). > But command-line version doesn't (the project attached). Test 239 (exec > test) fail very often, and test 240 (shell test) rarely. > > > Jussi > Did you recompile your project entirely before running it? -- Benoît Minisini |
|
From: Jussi L. <jus...@gm...> - 2014-11-28 01:54:59
|
> Did you recompile your project entirely before running it? > Yes, and now twice. I deleted my trunk folder, checked it out again. Uninstalled Gambas entirely from my system and recompiled it. Same result. Jussi |
|
From: Benoît M. <ga...@us...> - 2014-11-28 20:16:07
|
Le 28/11/2014 02:54, Jussi Lahtinen a écrit : >> Did you recompile your project entirely before running it? >> > > Yes, and now twice. I deleted my trunk folder, checked it out again. > Uninstalled Gambas entirely from my system and recompiled it. > Same result. > > > Jussi Can you try revision #6683? I removed a check that was there to fix something I don't rembember. But that check leads to loss of data from the process, so it had to be removed anyway. -- Benoît Minisini |
|
From: Jussi L. <jus...@gm...> - 2014-11-28 22:30:37
|
Now something else happens... again with command line version. mTest.Process_Read.1623: #47: Read error mTest.DoTests.1543 mTest.Main.1832 Jussi On Fri, Nov 28, 2014 at 10:15 PM, Benoît Minisini < ga...@us...> wrote: > Le 28/11/2014 02:54, Jussi Lahtinen a écrit : > >> Did you recompile your project entirely before running it? > >> > > > > Yes, and now twice. I deleted my trunk folder, checked it out again. > > Uninstalled Gambas entirely from my system and recompiled it. > > Same result. > > > > > > Jussi > > Can you try revision #6683? > > I removed a check that was there to fix something I don't rembember. But > that check leads to loss of data from the process, so it had to be > removed anyway. > > -- > Benoît Minisini > > > ------------------------------------------------------------------------------ > 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 > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gambas-user > |
|
From: Benoît M. <ga...@us...> - 2014-11-29 14:46:57
|
Le 28/11/2014 23:30, Jussi Lahtinen a écrit : > Now something else happens... again with command line version. > > mTest.Process_Read.1623: #47: Read error > mTest.DoTests.1543 mTest.Main.1832 > > > Jussi > Nothing happens there after having run the test an hundred times. Can you try revision #6686 and tell me if it changes anything? -- Benoît Minisini |
|
From: Jussi L. <jus...@gm...> - 2014-11-30 00:11:51
|
> Nothing happens there after having run the test an hundred times. > > Can you try revision #6686 and tell me if it changes anything? > Sorry to tell but something is still not right. But things are already better, GUI version works perfectly, but command-line version reported error after 40 runs. mTest.DoTests.1545: ERROR: 240 So, I think sTest got null string. Jussi |
|
From: Jussi L. <jus...@gm...> - 2014-11-30 00:13:37
|
> > > Nothing happens there after having run the test an hundred times. >> >> Can you try revision #6686 and tell me if it changes anything? >> > > > Sorry to tell but something is still not right. But things are already > better, GUI version works perfectly, but command-line version reported > error after 40 runs. > > mTest.DoTests.1545: > ERROR: 240 > > So, I think sTest got null string. > This was with revision 6688. Jussi |
|
From: Benoît M. <ga...@us...> - 2014-11-30 12:25:47
|
Le 30/11/2014 01:13, Jussi Lahtinen a écrit : >> >> >> Nothing happens there after having run the test an hundred times. >>> >>> Can you try revision #6686 and tell me if it changes anything? >>> >> >> >> Sorry to tell but something is still not right. But things are already >> better, GUI version works perfectly, but command-line version reported >> error after 40 runs. >> >> mTest.DoTests.1545: >> ERROR: 240 >> >> So, I think sTest got null string. >> > > This was with revision 6688. > > > Jussi What is your CPU exactly? -- Benoît Minisini |
|
From: Jussi L. <jus...@gm...> - 2014-11-30 12:38:19
|
Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz I think with latest microcode... I'll check later. Jussi On Sun, Nov 30, 2014 at 2:25 PM, Benoît Minisini < ga...@us...> wrote: > Le 30/11/2014 01:13, Jussi Lahtinen a écrit : > >> > >> > >> Nothing happens there after having run the test an hundred times. > >>> > >>> Can you try revision #6686 and tell me if it changes anything? > >>> > >> > >> > >> Sorry to tell but something is still not right. But things are already > >> better, GUI version works perfectly, but command-line version reported > >> error after 40 runs. > >> > >> mTest.DoTests.1545: > >> ERROR: 240 > >> > >> So, I think sTest got null string. > >> > > > > This was with revision 6688. > > > > > > Jussi > > What is your CPU exactly? > > -- > Benoît Minisini > > > ------------------------------------------------------------------------------ > 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 > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gambas-user > |
|
From: Lewis B. <le...@ke...> - 2014-11-30 13:48:33
|
It is claimed that Henry Ford said, "You can have a Model 'T' in any color you want as long as it is black." I am having a similar problem with the button controls but in grey. This all started when I was testing 'tabbing' between controls. The difference in color between the control that has focus and the ones that do not was barely perceptible. So first I tried making the text Bold when they got focus but some controls do not seem to be getting focus. So I though I would try changing the background color. I select button one on the form in the IDE and changed the background to bright yellow &H00BFBF&. Then I ran the program and sure enough: Any color I want as long as it is grey. OK ... there is more than one way to skin a cat. I put this line in the Sub Form_Open(): Button1.Background = &H00BFBF& Then I ran the program again. Any color I want as long as it is grey. Well at least it is consistent. So I am guessing that there is a system (gb.desktop or gb.qt4) class color array that I need to 'tamper' with to change the button background colors: normal, focus, selected? /The Wiki could use a search feature./ The original question I was trying to resolve: What is the order of and is there a way to control the Tab Order of controls on a form? Lewis [System] Gambas=3.6.2 OperatingSystem=Linux Kernel=3.13.0-24-generic Architecture=x86_64 Distribution=Linux Mint 17 Qiana Desktop=MATE Theme=QGtk Language=en_US.UTF-8 Memory=15994M [Libraries] Cairo=libcairo.so.2.11301.0 Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.7.6 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.204.0 GTK+3=libgtk-3.so.0.1000.8 GTK+=libgtk-x11-2.0.so.0.2400.23 OpenGL=libGL.so.1.2.0 Poppler=libpoppler.so.44.0.0 Qt4=libQtCore.so.4.8.6 SDL=libSDL-1.2.so.0.11.4 |
|
From: Lewis B. <le...@ke...> - 2014-11-30 15:27:13
|
OK --- I found the answer to the Tab order. Kind of makes the Button Color Question mute ... On 11/30/2014 07:48 AM, Lewis Balentine wrote: > It is claimed that Henry Ford said, "You can have a Model 'T' in any > color you want as long as it is black." > > I am having a similar problem with the button controls but in grey. This > all started when I was testing 'tabbing' between controls. The > difference in color between the control that has focus and the ones that > do not was barely perceptible. So first I tried making the text Bold > when they got focus but some controls do not seem to be getting focus. > So I though I would try changing the background color. I select button > one on the form in the IDE and changed the background to bright yellow > &H00BFBF&. > > Then I ran the program and sure enough: > Any color I want as long as it is grey. > > OK ... there is more than one way to skin a cat. > I put this line in the Sub Form_Open(): > Button1.Background = &H00BFBF& > > Then I ran the program again. > Any color I want as long as it is grey. > Well at least it is consistent. > > So I am guessing that there is a system (gb.desktop or gb.qt4) class > color array that I need to 'tamper' with to change the button background > colors: normal, focus, selected? /The Wiki could use a search feature./ > > The original question I was trying to resolve: > What is the order of and is there a way to control the Tab Order of > controls on a form? > > Lewis > > [System] > Gambas=3.6.2 > OperatingSystem=Linux > Kernel=3.13.0-24-generic > Architecture=x86_64 > Distribution=Linux Mint 17 Qiana > Desktop=MATE > Theme=QGtk > Language=en_US.UTF-8 > Memory=15994M > > [Libraries] > Cairo=libcairo.so.2.11301.0 > Curl=libcurl.so.4.3.0 > DBus=libdbus-1.so.3.7.6 > GStreamer=libgstreamer-0.10.so.0.30.0 > GStreamer=libgstreamer-1.0.so.0.204.0 > GTK+3=libgtk-3.so.0.1000.8 > GTK+=libgtk-x11-2.0.so.0.2400.23 > OpenGL=libGL.so.1.2.0 > Poppler=libpoppler.so.44.0.0 > Qt4=libQtCore.so.4.8.6 > SDL=libSDL-1.2.so.0.11.4 > > ------------------------------------------------------------------------------ > 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 > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gambas-user |
|
From: Benoît M. <ga...@us...> - 2014-11-30 14:50:51
|
Le 30/11/2014 13:37, Jussi Lahtinen a écrit : > Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz > > I think with latest microcode... I'll check later. > > > Jussi > I have tested 100x times on my own 64 bits system, and in a 32 bits VM running ArchLinux. No problem... Are you sure that you have correctly compile the last revision? I will re-run the tests longer anyway... -- Benoît Minisini |
|
From: Benoît M. <ga...@us...> - 2014-11-30 15:42:03
|
Le 30/11/2014 15:50, Benoît Minisini a écrit : > Le 30/11/2014 13:37, Jussi Lahtinen a écrit : >> Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz >> >> I think with latest microcode... I'll check later. >> >> >> Jussi >> > > I have tested 100x times on my own 64 bits system, and in a 32 bits VM > running ArchLinux. No problem... > > Are you sure that you have correctly compile the last revision? > > I will re-run the tests longer anyway... > Note that yours tests (239 & 240) are not reliable. If the command takes more than 0.1 second to run, your test will fail. And nothing ensures that the command will return before 0.1 seconds. You must wait for the end of the process. -- Benoît Minisini |
|
From: Benoît M. <ga...@us...> - 2014-11-30 15:45:51
|
Le 30/11/2014 16:41, Benoît Minisini a écrit : > Le 30/11/2014 15:50, Benoît Minisini a écrit : >> Le 30/11/2014 13:37, Jussi Lahtinen a écrit : >>> Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz >>> >>> I think with latest microcode... I'll check later. >>> >>> >>> Jussi >>> >> >> I have tested 100x times on my own 64 bits system, and in a 32 bits VM >> running ArchLinux. No problem... >> >> Are you sure that you have correctly compile the last revision? >> >> I will re-run the tests longer anyway... >> > > Note that yours tests (239 & 240) are not reliable. If the command takes > more than 0.1 second to run, your test will fail. And nothing ensures > that the command will return before 0.1 seconds. You must wait for the > end of the process. > OK, I finally got one error (but 239), even if I replaced "Wait 0.1" by "hProcess.Wait". Let's go back investigating... -- Benoît Minisini |
|
From: Jussi L. <jus...@gm...> - 2014-11-30 18:11:10
|
> OK, I finally got one error (but 239), even if I replaced "Wait 0.1" by > "hProcess.Wait". Let's go back investigating... > I'll make the change in the code. "Good" to see it's not fault in my system. Jussi |
|
From: Lewis B. <le...@ke...> - 2014-12-01 13:01:05
|
I created a sample application for gb.settings as I worked through how to use this Gambas component. I decided that short and simple is probably better for new users. The project is released to the PUBLIC DOMAIN (without restrictions) and available at the following URL: ScreenShot: http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-screenshot.png Archive: http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-0.0.2.tar.gz I hope that someone will find it useful. Comments and/or suggestions are welcomed. Very Best regards, Lewis Balentine le...@ke... |
|
From: Benoît M. <ga...@us...> - 2014-12-01 13:11:41
|
Le 01/12/2014 14:00, Lewis Balentine a écrit : > I created a sample application for gb.settings as I worked through how > to use this Gambas component. I decided that short and simple is > probably better for new users. The project is released to the PUBLIC > DOMAIN (without restrictions) and available at the following URL: > > ScreenShot: > http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-screenshot.png > Archive: > http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-0.0.2.tar.gz > > I hope that someone will find it useful. Comments and/or suggestions are > welcomed. > > Very Best regards, > > Lewis Balentine > le...@ke... > Why do you hijack the thread? You must create a new thread for a new topic, otherwise things become unreadable. Anyway, thanks for your example. If you use the development version, you can publish it on the Gambas farm server for testing it. Regards, -- Benoît Minisini |
|
From: Lewis B. <le...@ke...> - 2014-12-01 13:26:59
|
>> Why do you hijack the thread? << My apologies. I hit the reply button and changed the subject line thinking that it would create a new thread. I will not make the same mistake in the future :-( I will probably make a different one). >> If you use the development version, you can publish it on the Gambas farm server for testing it. << I am very much in a learning curve having recently switched from Windows/VB6(decades) to Linux/Gambas(weeks/days). I prefer to run the released version on my main computer and have not yet created a virtual machine to load the developement version (and I have to figure out how, learn to deal with svn, etc). Again my sincere apologies. I will try to learn the proper protocols and etiquette. Very Best regards, Lewis On 12/01/2014 07:11 AM, Benoît Minisini wrote: > Le 01/12/2014 14:00, Lewis Balentine a écrit : >> I created a sample application for gb.settings as I worked through how >> to use this Gambas component. I decided that short and simple is >> probably better for new users. The project is released to the PUBLIC >> DOMAIN (without restrictions) and available at the following URL: >> >> ScreenShot: >> http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-screenshot.png >> Archive: >> http://www.keywild.com/linux-stuff/Gambas/Demos/Demo-gb.settings-0.0.2.tar.gz >> >> I hope that someone will find it useful. Comments and/or suggestions are >> welcomed. >> >> Very Best regards, >> >> Lewis Balentine >> le...@ke... >> > Why do you hijack the thread? You must create a new thread for a new > topic, otherwise things become unreadable. > > Anyway, thanks for your example. If you use the development version, you > can publish it on the Gambas farm server for testing it. > > Regards, > |
|
From: Benoît M. <ga...@us...> - 2014-12-01 13:31:35
|
Le 01/12/2014 14:26, Lewis Balentine a écrit : >>> Why do you hijack the thread? << > > My apologies. > I hit the reply button and changed the subject line thinking that it > would create a new thread. I will not make the same mistake in the > future :-( I will probably make a different one). Alas, mailing-lists put magic numbers inside the e-mails to identify threads, so modifying the subject does nothing! It's not a bug, it's a feature! :-) -- Benoît Minisini |