# G4p GUI editor issues

**URL:** <https://discourse.processing.org/t/g4p-gui-editor-issues/26781>\
**Category:** Libraries\
**Created:** [January 5, 2021, 1:06am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781 "2021-01-05T01:06:20Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimlee](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jimlee](https://discourse.processing.org/u/jimlee)\
**Post date:** [January 5, 2021, 1:06am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/1 "2021-01-05T01:06:20Z")

</div>

I set up a new app and created my interface using G4P GUI editor. Everyhting was wonderful. App actually did pretty much what I wanted. Went to bed a happy camper.

Next day, I can still edit my app code in processing but the G4P editor will not open anymore.

Is this a thing?

Edit :  
Seems like it may be a thing? It opens fine if I restart processing and ask it to open on a new blank sketch. But it won’t have anything to do with my sketch. As soon as I open mine and close the new sketch it vanishes and won’t open again.

Errors…

```auto
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.awt.Component$AccessibleAWTComponent$AccessibleAWTComponentHandler
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1577)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
	at javax.swing.event.EventListenerList.readObject(EventListenerList.java:274)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1170)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2178)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
	at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:561)
	at javax.swing.tree.DefaultTreeModel.readObject(DefaultTreeModel.java:667)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1170)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2178)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
	at g4p.tool.gui.treeview.CtrlSketchView.loadModel(Unknown Source)
	at g4p.tool.gui.GuiControl.loadGuiLayout(Unknown Source)
	at g4p.tool.gui.GuiDesigner.<init>(Unknown Source)
	at g4p.tool.G4PTool.run(Unknown Source)
	at processing.app.contrib.ToolContribution.run(ToolContribution.java:124)
	at processing.app.Base$5.actionPerformed(Base.java:852)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
	at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
	at java.awt.MenuItem.processEvent(MenuItem.java:628)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:763)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.io.NotSerializableException: java.awt.Component$AccessibleAWTComponent$AccessibleAWTComponentHandler
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
	at javax.swing.event.EventListenerList.writeObject(EventListenerList.java:259)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1140)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
	at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:441)
	at javax.swing.tree.DefaultTreeModel.writeObject(DefaultTreeModel.java:656)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1140)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
	at g4p.tool.gui.treeview.CtrlSketchView.saveModel(Unknown Source)
	at g4p.tool.gui.GuiControl.saveGuiLayout(Unknown Source)
	at g4p.tool.gui.GuiDesigner$2.windowDeactivated(Unknown Source)
	at java.awt.AWTEventMulticaster.windowDeactivated(AWTEventMulticaster.java:399)
	at java.awt.AWTEventMulticaster.windowDeactivated(AWTEventMulticaster.java:399)
	at java.awt.Window.processWindowEvent(Window.java:2069)
	at javax.swing.JFrame.processWindowEvent(JFrame.java:305)
	at java.awt.Window.processEvent(Window.java:2013)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1024)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:714)
	at java.awt.Component.dispatchEventImpl(Component.java:4760)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.SentEvent.dispatch(SentEvent.java:70)
	at java.awt.DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent.dispatch(DefaultKeyboardFocusManager.java:239)
	at java.awt.DefaultKeyboardFocusManager.sendMessage(DefaultKeyboardFocusManager.java:266)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:493)
	at java.awt.Component.dispatchEventImpl(Component.java:4760)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.SentEvent.dispatch(SentEvent.java:70)
	at java.awt.DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent.dispatch(DefaultKeyboardFocusManager.java:239)
	at java.awt.DefaultKeyboardFocusManager.sendMessage(DefaultKeyboardFocusManager.java:266)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:388)
	at java.awt.Component.dispatchEventImpl(Component.java:4760)
	at java.awt.Container.dispatchEventImpl(Container.java:2297)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
	... 17 more
java.lang.NullPointerException
	at g4p.tool.gui.GuiControl.makeGUIfromTreeModel(Unknown Source)
	at g4p.tool.gui.GuiControl.loadGuiLayout(Unknown Source)
	at g4p.tool.gui.GuiDesigner.<init>(Unknown Source)
	at g4p.tool.G4PTool.run(Unknown Source)
	at processing.app.contrib.ToolContribution.run(ToolContribution.java:124)
	at processing.app.Base$5.actionPerformed(Base.java:852)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
	at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
	at java.awt.MenuItem.processEvent(MenuItem.java:628)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:763)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
	at java.awt.EventQueue$4.run(EventQueue.java:733)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

```

Thanks!

-jim lee

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 5, 2021, 10:11am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/2 "2021-01-05T10:11:17Z")

</div>

Sorry you are experiencing problems with GUI Builder.

Looking at the exception trace you have included I can only assume that the serialised data file that stores the GUI design has become corrupted in which case there is nothing you can do about it.

OK So I have looked at the stack trace in more detail and I have found the interesting bit

```auto
java.lang.NullPointerException
	at g4p.tool.gui.GuiControl.makeGUIfromTreeModel(Unknown Source)
	at g4p.tool.gui.GuiControl.loadGuiLayout(Unknown Source)
	at g4p.tool.gui.GuiDesigner.<init>(Unknown Source)
	at g4p.tool.G4PTool.run(Unknown Source)

```

Starting at the bottom we have a call to the `run()` method. All Processing tools must have this method and is used by Processing to start the tool.

The line above it calls the constructor in the GUIDesigner class which creates the GUI Builder window and this is where things start going wrong because the window doesn’t open for you. The constructor calls the `loadGuiLayout()` method which is responsible for loading the GUI design from the serial file and creating a tree-model which is then passed to the `makeGUIfromTreeModel(model)` method

It is in this method that a null-pointer exception is thrown. Looking at the source code it is most likely that a null reference is passed instead of an actual tree model object.

Everything seems to point to the serial file being corrupted and this is extremely rare in fact in the 9 years since GUI Builder was first released no one has reported a similar experience.

Sorry I can’t be more helpful. 😞

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 5, 2021, 10:39am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/3 "2021-01-05T10:39:56Z")

</div>

Pease tell me the versions of Processing, G4P and GUI Builder you are using - thanks

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [January 5, 2021, 11:29am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/4 "2021-01-05T11:29:29Z")

</div>

Looking at the stack trace I wonder if this is related to [https://bugs.openjdk.java.net/browse/JDK-8192915](https://bugs.openjdk.java.net/browse/JDK-8192915) and [https://github.com/AdoptOpenJDK/openjdk-jdk11u/blame/d08179796bd1de747c9afb79177f999481116821/src/java.desktop/share/classes/java/awt/Component.java#L9359](https://github.com/AdoptOpenJDK/openjdk-jdk11u/blame/d08179796bd1de747c9afb79177f999481116821/src/java.desktop/share/classes/java/awt/Component.java#L9359)

@quark using serialization as a data storage format with anything with AWT in it is probably a bad idea.

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 5, 2021, 12:29pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/5 "2021-01-05T12:29:34Z")

</div>

Thanks for the links they make interesting reading but I _ **don’t** _ believe this problem is related to the issues raised in the article because

1. This exception would be experienced by everyone using GUI Builder and OpenJDK and that is not happening
2. GUI Builder does not serialize any AWT or Swing components

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [January 5, 2021, 2:25pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/6 "2021-01-05T14:25:35Z")

</div>

@quark taking your points in reverse order …

> [@quark](#):
>
> GUI Builder does not serialize any AWT or Swing components

Directly, maybe, but this is in the stack trace.

> [@jimlee](#):
>
> ```auto
> Caused by: java.io.NotSerializableException: java.awt.Component$AccessibleAWTComponent$AccessibleAWTComponentHandler
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
> ...
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
> at g4p.tool.gui.treeview.CtrlSketchView.saveModel(Unknown Source)
> 
> ```

> [@quark](#):
>
> This exception would be experienced by everyone using GUI Builder and OpenJDK and that is not happening

I just looked up if/when that particular type was Serializable. It looks like it wasn’t in JDK 8 (OpenJDK specifically isn’t relevant - same code), unless it’s been backported. As far as I can tell triggering the bug in this case (judging from the git commit) may be macOS specific, and perhaps only then in certain circumstances.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 5, 2021, 2:47pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/7 "2021-01-05T14:47:32Z")

</div>

We can use the keyword `transient` in order to mark fields to be skipped when their class is serialized:

> **[Transient (computer programming) - Wikipedia](https://en.Wikipedia.org/wiki/Transient_(computer_programming)#Java)**

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 5, 2021, 2:53pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/8 "2021-01-05T14:53:54Z")

</div>

When using GUI Builder, the design is serialized and deserialized every time the focus shifts between the GUI Builder editor window and the Processing IDE window. If the problem was OS and/or JDK specific I would have expected this problem to show itself when the OP was creating the sketch but that wasn’t the case.

The fact that he created the sketch using GUI Builder without problem but then was unable to open it the next day makes me think the serial file has been corrupted.

---

<div class="post-metadata">

**Author:** ![jimlee](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jimlee](https://discourse.processing.org/u/jimlee)\
**Post date:** [January 5, 2021, 8:18pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/9 "2021-01-05T20:18:13Z")

</div>

G4p 4.4.1  
Processing 3.5.3 – Processing revision 0269  
MacOS 10.13.6

Where’s this serial file you speak of stored? Maybe I can post it somewhere?  
I think this is it : [link](http://leftcoast.biz/justStuff/gui.ser.4.4)

-jim lee

---

<div class="post-metadata">

**Author:** ![jimlee](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jimlee](https://discourse.processing.org/u/jimlee)\
**Post date:** [January 5, 2021, 8:49pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/10 "2021-01-05T20:49:30Z")

</div>

So  
I started a new sketch.  
Fired up the G4p builder tool.  
Lay out everything.  
Did NOT edit any code.  
Ran the app. It worked, didn’t do anything interesting but it worked as I expected.  
Saved my processing file, shut down processing and…

I can’t get the G4p to open and edit the file again.

Something’s wrong and repeatable.

-jim lee

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 6, 2021, 5:31pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/11 "2021-01-06T17:31:50Z")

</div>

I see you found the serial file, unfortunately its not much use on its own.

Please select Archive Sketch from the tools menu and make the zip file available then I can try and discover what’s wrong.

---

<div class="post-metadata">

**Author:** ![jimlee](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jimlee](https://discourse.processing.org/u/jimlee)\
**Post date:** [January 6, 2021, 7:03pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/12 "2021-01-06T19:03:28Z")

</div>

Ok, here’s the archive : [link](http://leftcoast.biz/justStuff/Serial_monitor-210106a.zip)

-jim lee

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 7, 2021, 10:16am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/13 "2021-01-07T10:16:16Z")

</div>

You are using GUI Builder 4.4.1 but what version of G4P are you using?

I have tried your sketch and get the same problem. Please try this [sketch](http://lagers.org.uk/zzz/SerialGUItest-210107a.zip) and let me know how you get on with it.

---

<div class="post-metadata">

**Author:** ![jimlee](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jimlee](https://discourse.processing.org/u/jimlee)\
**Post date:** [January 8, 2021, 12:32am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/14 "2021-01-08T00:32:34Z")

</div>

That opened fine. How do I figure out the version of the G4P library?

-jim lee

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 8, 2021, 9:09am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/15 "2021-01-08T09:09:07Z")

</div>

> [@jimlee](#):
>
> How do I figure out the version of the G4P library?

When you start a sketch that uses G4P it will put a message in the Processing IDE -

 ![Screenshot 2021-01-08 at 09.01.07](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/aecbc7a44bb1a8add5820a435c2e009a7d0a6324.png)

The sketch I uploaded which you managed to open was created with

- GUI Builder 4.4.1
- G4P 4.3.6
- Processing 3.5.4
- on an iMac running osx 10.14.6

> [@jimlee](#):
>
> That opened fine.

Please try and edit the uploaded sketch then

1. save it
2. close Processing then
3. restart Processing and see if it opens.

Tell me how you got on.

---

<div class="post-metadata">

**Author:** ![jimlee](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jimlee](https://discourse.processing.org/u/jimlee)\
**Post date:** [January 8, 2021, 9:00pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/16 "2021-01-08T21:00:37Z")

</div>

Same as you 4.3.6

Opened your file. Made a change adda an int, changed its value and printed it to the monitor. Saved, quit Processing, Reopened and was able to reopen the GUI tool.

Closed up everything, reopened everything, added a label to the UI. Saved, closed and I was able to re open it again.

So I guess if you start the file, I can edit it. If I start the file, I can’t.

-jim lee

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 9, 2021, 9:50am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/17 "2021-01-09T09:50:26Z")

</div>

So I go back to my original statement -

> [@quark](#):
>
> Everything seems to point to the serial file being corrupted and this is extremely rare in fact in the 9 years since GUI Builder was first released no one has reported a similar experience.

The only other thing I can think of is that it is some issue with the Java distribution you are using. Here is a screen shot from my Java Control Panel (accessible through System Preferences)

 ![Screenshot 2021-01-09 at 09.46.39](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/2560293bc30f1e6f6dfde0cb12fccd898ec113d3.png)

This is not an area I get involved in so I think I have gone as far as I can. Sorry I can’t resolve the issue for you.

---

<div class="post-metadata">

**Author:** ![jimlee](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jimlee](https://discourse.processing.org/u/jimlee)\
**Post date:** [January 9, 2021, 7:27pm UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/18 "2021-01-09T19:27:49Z")

</div>

As far as I can tell, I have no Java control panel. Certainly not in system preferences.

-jim lee

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 10, 2021, 9:35am UTC](https://discourse.processing.org/t/g4p-gui-editor-issues/26781/19 "2021-01-10T09:35:56Z")

</div>

OK I suspect I have it because I have Eclipse installed.
