[Gambas-user] Program not starting

Tony Morehen tmorehen at ajm-software.com
Sat Dec 12 17:44:05 CET 2020


Yes I read the commit logs and I studied the exact changes each commit 
made.  Unfortunately, I didn't notice the problem until several commits 
later.  It took a while to identify the particular commit.

I never thought to check my startup form.  It's visible property should 
have been set to true.  Unfortunately, I got sidetracked. That form 
contains several custom controls, versions of DirView and FileChooser, 
some of which are hidden.  Since those controls are form-based and the 
program exited after initializing those controls, I thought my problem 
was there.

My startup form is quite complicated and I've had forms get corrupted in 
the past.  So, I decided to recreate the form, one part at a time.  The 
form had three major components, the menu, toolbar and body.  I copied 
the body and code over to the new form and edited the code to account 
for the missing objects.  The new form opened successfully.  Copied the 
toolbar over and re-edited the code for the new objects.  Again a 
successful open.  Now to copy the menu over.  I decided to do that with 
a text editor.  I opened the two form files to copy over the 
menu-related lines and then noticed that the original form has its 
visible property set to false.  A light goes on!

Sometimes we overlook the obvious.  I assumed I screwed up in my 
customization of DirView and FileChooser controls that your commit was 
only now revealing.  Instead it was another, simpler error on my part, a 
very careless error.

On 2020-12-12 10:58 a.m., Benoît Minisini wrote:
> Le 12/12/2020 à 16:16, Tony Morehen a écrit :
>> Just a warning, hopefully a helpful one.
>>
>> Since commit d4a0982a, one of my programs refused to start. The 
>> startup form would begin, run some initialization code, then exit 
>> with error code 1.  There were no error messages, nothing to indicate 
>> what the problem was.  Stepping through the program was not helpful.  
>> All it showed was that the exit occurred between one sub-routine and 
>> the next.
>>
>> Several days of debugging my program and recompiling Gambas to 
>> identify the exact change followed.  I finally started to recreate 
>> the startup form.  The new form ran!  Looking at the differences 
>> between the two forms revealed my error and it certainly was _*my*_  
>> error.  The visible property of the original form was set to false!
>>
>> How that happened I have no idea.  Most likely I was trying to change 
>> the visibility of a control on the form, but selected the form by 
>> mistake.
>>
>> Cheers
>>
>
> Do you read the commit logs?
>


More information about the User mailing list