G4P gui-builder caused trouble


This one might be serious: Right in the middle of the development of a project, the gui-builder “broke down”, meaning, it all of a sudden wasn’t any longer able to open the gui for design. The project itself continued to function, but as the gui was unfinished, this was of no value to me. (Sorry for not being able to produce the error message, but I was in a hurry and had to move on. However, there was an error message about not being able to open the gui.) I am not aware of anything bad or strange or whatever, I might have done. The effect simply wasn’t there – until it was.

I tried to replace the folder GUI_BUILDER_DATA and gui.pde from a backed up project, but to no avail. I ended up deleting folder and file and starting to build the gui from scratch. (This was a bit of a hassle, as in gui.pde sat a few lines of code already.)

However, let me share the work-around, I implemented in case this should occur again (which it didn’t):

I opened another tab “gui_hlp”. In gui, all event procedures do nothing but to call a procedure with the same name as the element, which is, where I put my code now. Like this:


public void button1_click1(GButton source, GEvent event) { //_CODE_:button1:590660:
  println("button1 - GButton >> GEvent." + event + " @ " + millis());
} //_CODE_:button1:590660:


public void button1() {
  println( "Button clicked." );

Besides, I create a zip archive of GUI_BUILDER_DATA, gui.pde and gui_hlp.pde whenever the gui is changed. It turned out that a functioning version of these elements can actually replace existing ones. So, should this ever occur again, I can replace a broken gui with the last working one and have lost no code as it resides elsewhere.

The machine is running Manjaro Linux 23.1.3 with Linux Kernel 6.1.77-2-MANJARO. Processing is build no 1293, G4P 4.3.9.

Hope, this might help someone!

Cheers, Mat

What do you mean - did it crash were there any error messages?

Just some points about GUI Builder and G4P.

  1. GUI Builder is a tool to help users design and create GUIs using G4P. At runtime GUI Builder is not used in anyway whatsoever !!
  2. In most cases it is not possible to edit a design created with an earlier version of GUI Builder.

Point (2) is the most common issue experienced by users of GUI Builder. They create a design using GUI Builder then update GUI Builder to a later version only to discover they can no longer edit the design.

In the GUI_BUILDER_DATA folder there is a file called something like gui.ser.4.4 The digits indicate the version of GUI Builder used in the design process so in this case Version 4.4

You can check what version of GUI Builder you are using in the contributions manager or in the Processing IDE console pane when GUI Builder is first used. If they differ and the new version is incompatible then you will have to manually download the earlier version of GUI Builder.

  • GUI Builder’s home page discusses version numbers
  • Earlier versions can be downloaded here
  • Guide to manually installing a GUI Builder can be found here

I’m sorry, I can’t tell you more than what I already have: I was in an ordinary editing session. The builder worked just fine and the next time it didn’t (and wouldn’t any more, no matter what). There was an error message saying that the builder couldn’t be opened, but I missed to save it.

The builder was not touched during the entire project. The version failing at some point in time was the very same one, the project was started with. The same holds true for the IDE and g4p itself. No updates.

The builder version installed is 4.4.2.