3.16 runtime error: Program returns the value 1

Post your Gambas programming questions here.
Post Reply
bazzvn
Posts: 18
Joined: Wednesday 22nd February 2017 11:06am
Location: Vietnam

3.16 runtime error: Program returns the value 1

Post by bazzvn »

I use the KDE Plasma version of Sparky LInux 6 (based on Debian Bullseye) as my daily workhorse. Debian Bullseye has Gambas 3.15.2, which likely will not see an upgrade to 3.16. However, I have been experimenting with the KDE version of Sparky LInux 7 (based on Debian Testing) which has Gambas 3.16.3. While I can load and edit my Gambas 3.15 projects in the 3.16 development environment of Debian Testing, they will not run and I get an error message "The program has returned the value: 1". This only happens if I load an existing or create a new Qt-based project (all my current projects are based on the Qt5 toolkit); a new project created with the gtk3 toolkit seems to run just fine (though I haven't tested it exhaustively). The only general information relating to this error that I can find online suggests that it is caused by a missing dependency, and in this case I guess it's most likely a Qt-related runtime dependency. Any suggestions or help would be much appreciated.

bazzvn
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: 3.16 runtime error: Program returns the value 1

Post by cogier »

No guarantees, but I have found that you need to make the code 'dirty' before you run it in a new environment.

Load one of your programs that will result in an error, and before you run it add an extra blank line in the program, then try and compile it (Project > Compile All). Then try and run it.
bazzvn
Posts: 18
Joined: Wednesday 22nd February 2017 11:06am
Location: Vietnam

Re: 3.16 runtime error: Program returns the value 1 [SOLVED]

Post by bazzvn »

Thanks for the suggestion, Cogier; it is much appreciated. It didn't work, but it did lead me indirectly to find the missing component. After adding a blank line and compiling one of my programs, and then trying to run it, the Console output indicated that the gb.qt5.x11 component was missing. I did not get that message before, just the "Program returns the value: 1" error. When I installed Gambas from Debian Testing, I just installed the meta-package - which I thought is supposed to install all Gambas components. In my case it failed to install the gb.qt5.x11 package. After installing the gb.qt5.x11 component from the repository everything seems to work just fine.
Post Reply