In this Discussion

G4P GUI Builder Error/Crash

While working in the G4P GUI Builder I inadvertently must have dragged one of the labels such that it's width became <0. At least that's what seems to be causing the an error An error occurred inside "G4P GUI Builder" with the following error dump (First few lines only shown):

Best Answer

Answers

How were you able to access this line of code? Not much experience with G4P. However, if your file is a pde, then you could open it with your favorite text editor(vim, notepad++) and change those values. Then, if you run it in G4P builder, it should work (?) I am also tagging @quark as he can tell you better what you could do.... hopefully he has a great suggestion.

That line of code is part of the code that is autogenerated by GUI Builder to create all the controls. Although you **can **edit it this won't work because the error is still in the GUI Builder data file that is created when you use GUI Builder to design your UI.

You can change the width/height of the label in GUI Builder. Select the label from the tree view (top right pane) and then change the width and height values in the properties grid (bottom left pane. This can be used to correct negative values.

Unfortunately I can't get into GUI Builder to fix the values. When I try to open it I get the error I quoted in my OP: An error occurred inside "G4P GUI Builder" with the error dump that I quoted the first few lines of.

If I try to run the sketch I get a blank window and the error Width (-20) and Height (20) cannot be <=0 and the line of code referring to label5 that I quoted is highlighted.

**However **I've just managed to get it to run by changing the bad value in the gui tab back to the correct value of +20 again. The problem is that the G4P GUI Builder option on the Tools menu is now greyed out.