Console outputting other running gambas programs

Questions and info about the Gambas IDE itself and not what you are making with it.
(not bug reports)
Post Reply
Donald D Ross
Posts: 6
Joined: Sunday 29th January 2023 1:50pm

Console outputting other running gambas programs

Post by Donald D Ross »

Suprise!!

I was programming and debuging a program in the the Gambas IDE that starts a 2nd compiled Gambas program with a shell statement. The 2nd program's console output is displaying while I'm running and debuging the 1st main program on the 1st main program's console. On the 2nd program a Shell started ffmpeg with -nostdin option results are displaying. It looked like the 1st main program was running code that shouldn't have ran. I hope the 2nd program's Wait's are not stopping the 1st main program execution! :oops: I thought that a bit strange. What I would think SHOULD be 2 independent programs. I don't know if its important or not but the outputs were in timers. Because of the time delay's of if Exist(filename) & wait 2 result waiting for a response the 2nd program is doing the waiting and lug and tug while the 1st Main program is maintaining a regular ryithmatic display output. The 2 program's communicate across a network node for continuous communications. I have also used the same process between Gambas and Python3 (Python3 supports IO cards with Include for data AQ). I also found that while communications are good calling from the 1st program to the 2nd program. I use a second form on the 1st main program for network communications for calling return responses. On it's textbox, I get the first 2 characters dropped even though the communications form show's them there. This is a old problem that I've had before on older versions of Gambas. I can usually write from a string on the communications form to a string on the main form successfully. Just some QuirkE's I have found. :mrgreen: :ugeek:

Also....
I found that sliders written in RPI Buster, Gambas 3.12.2 don't show in RPI Bullseye, Gambas 3.15.2 with the same program code. Also if I save the program in 3.15.2 it may not load back into the IDE on 3.12.2 for more programing changes. (I was testing compatability between OS's.) I found Ubuntu 22.04 (64bit), Gambas 3.16.3 is close to RPI 3.15.2. I wonder.... Which version of gambas can I program on will work on all systems, runtime if possable? RPI Buster's Gambas seems to be stopped at 3.12.2 at least on a default repository install. I kind of want to write a Gambas program that can be used on all the systems that support a Gambas runtime. Incompatablities seem to be extreme. A Gambas program will only work on a system that its programmed and compiled on or another that's VERY close.
Sorry Python3 is Not a option, I use HUGE 3 dimensional array's (I do program in Python3 also & VB, php, html(&5), esp32, etc).

Current program I am working on about 5000 lines +. Time delays upset sound playback and generate skipped frames at 10fps. It supports Karaoke & most video formats at 32 minutes or less per song. Scheduler holds 50 songs in Que with nearly unlimited backgrounds and Hot audio shorts & singers. It even has a speaking clock & mp3 tag reader. The 2nd program helps a lot on the time delay's for the 1st Main program. I would like to publish this one soon as a Karaoke Hoster for linux OS's.
Karaoke Hoster V5 (Duel Screen)
Karaoke Hoster V5 (Duel Screen)
2023-09-23-210633_3840x1080_scrot.png (606.29 KiB) Viewed 5694 times
This is a much scaled down version of another program I've written that support 20 catagories at 1/2 mil per Cat. Duel Screen outputs, I just got a new RPI 4 8Gig, I'm seeing what it will do! How much can I cram into a computer the size of a cigarette pack. :lol:
Been having FUN! :D
Here's a window'd example
Here's a window'd example
2023-09-23-204925_1920x1080_scrot.png (519.62 KiB) Viewed 5683 times
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Console outputting other running gambas programs

Post by BruceSteers »

Sliders fail to appear of they are too thin for the widget theme/config.

Increase their thickness. Or try changing theme or font size of the rpi

And if a gambas application is launched from running another application in the ide then the ide console is stdout.
So it's normal for any output from the second command to print in the ide console.
If at first you don't succeed , try doing something differently.
BruceS
Donald D Ross
Posts: 6
Joined: Sunday 29th January 2023 1:50pm

Re: Console outputting other running gambas programs

Post by Donald D Ross »

Do you have any suggestions for the audio playback breaking playback during a file load? Just fails to make sound for a 1/4 second. :roll: :?:
Componet is gb.sdl2.audio. I playing a mp3 file.

The slider thickness was the problem. Works with thin sliders on RPI Buster, Gambas 3.12.2, just the new kid on the block RPI Bullseye & also Ubuntu 22.04 had problems.
I have also had some problems with clicking a option on NOT the main form but another form (No Persistance) when prob a File.Save happens and the form closes. This happens so far with a compiled to executable program. All the forms in the program just go away instantly. Most often with music playing. Has happend 2 times in the last 3 days, RPI Buster, Gambas 3.12.2.

If there is NO solution to the audio break I may try using the Sox player thru a form running a terminal. I tried to get MediaView to work but after adding its 2 componets, I could add the player to the form but it wouldn't play anything. (I have other older Gambas programs that I have written and used it so I have my own examples of what to do. Mp3's would not play sound and Mp4s would NOT play video in the player screen. My program is over 5000 lines and has several forms so there is a lot to go wrong!
User avatar
cogier
Site Admin
Posts: 1127
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Console outputting other running gambas programs

Post by cogier »

Do you have any suggestions for the audio playback breaking playback during a file load? Just fails to make sound for a 1/4 second.
You could try using a Task for the file load. That way you would use 2 cpu processes instead of one.
vuott
Posts: 263
Joined: Wednesday 5th April 2017 6:07pm
Location: European Union

Re: Console outputting other running gambas programs

Post by vuott »

I think the solution, proposed by cogier, is the most appropriate.
Anyway, I suppose you are using the Class "Music " of Component "gb.sdl2.audio".
If so, :? you could - while loading the file - use the "Pause()" Method:

https://gambaswiki.org/wiki/comp/gb.sdl ... usic/pause
Europaeus sum !

Amare memorentes atque deflentes ad mortem silenter labimur.
Post Reply