ProjectSWGCore / Holocore

This is the Star Wars Galaxies server emulator for the Java Virtual Machine
https://www.projectswg.com
GNU Affero General Public License v3.0
31 stars 19 forks source link

SUI message box windows no longer display #1568

Closed madsboddum closed 4 months ago

madsboddum commented 5 months ago

One or more regressions in SUI windows have been introduced, where they don't appear to the player.

Example of the newbie quest being granted when spawning:

29-06-24 15:06:01.095 T: [QuestService] user/Venne Uthaxars received quest quest/c_newbie_start
29-06-24 15:06:01.096 T: [QuestService] user/Venne Uthaxars activating task 0 of quest quest/c_newbie_start
29-06-24 15:06:01.110 E: Fatal Exception while processing intent: SuiWindowIntent(player=Player[226295 NAME=user / Venne Uthaxars STATE=ZONED_IN], window=com.projectswg.holocore.resources.support.global.zone.sui.SuiMessageBox@3f735f22, windowId=-1, event=NEW)
29-06-24 15:06:01.110 E: Exception in thread "intent-processor-8" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
29-06-24 15:06:01.110 E: Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
29-06-24 15:06:01.110 E:     me.joshlarson.jlcommon.control.Service.invoke(Service.java:135)
29-06-24 15:06:01.110 E:     me.joshlarson.jlcommon.control.Service.lambda$registerIntentHandlers$1(Service.java:119)
29-06-24 15:06:01.110 E:     me.joshlarson.jlcommon.control.IntentManager$IntentRunner.broadcast(IntentManager.java:214)
29-06-24 15:06:01.110 E:     me.joshlarson.jlcommon.control.IntentManager$IntentExecutor.run(IntentManager.java:269)
29-06-24 15:06:01.110 E:     me.joshlarson.jlcommon.utilities.ThreadUtilities.safeRun(ThreadUtilities.java:47)
29-06-24 15:06:01.110 E:     me.joshlarson.jlcommon.concurrency.ThreadPool$ThreadExecutor.threadExecutor(ThreadPool.java:174)
29-06-24 15:06:01.110 E:     java.base/java.lang.Thread.run(Thread.java:1583)
29-06-24 15:06:01.110 E:   Exception in thread "intent-processor-8" java.lang.reflect.InvocationTargetException: null
29-06-24 15:06:01.111 E:   Caused by: java.lang.reflect.InvocationTargetException: null
29-06-24 15:06:01.111 E:       java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:115)
29-06-24 15:06:01.111 E:       java.base/java.lang.reflect.Method.invoke(Method.java:580)
29-06-24 15:06:01.111 E:       me.joshlarson.jlcommon.control.Service.invoke(Service.java:133)
29-06-24 15:06:01.111 E:       me.joshlarson.jlcommon.control.Service.lambda$registerIntentHandlers$1(Service.java:119)
29-06-24 15:06:01.111 E:       me.joshlarson.jlcommon.control.IntentManager$IntentRunner.broadcast(IntentManager.java:214)
29-06-24 15:06:01.111 E:       me.joshlarson.jlcommon.control.IntentManager$IntentExecutor.run(IntentManager.java:269)
29-06-24 15:06:01.111 E:       me.joshlarson.jlcommon.utilities.ThreadUtilities.safeRun(ThreadUtilities.java:47)
29-06-24 15:06:01.111 E:       me.joshlarson.jlcommon.concurrency.ThreadPool$ThreadExecutor.threadExecutor(ThreadPool.java:174)
29-06-24 15:06:01.111 E:       java.base/java.lang.Thread.run(Thread.java:1583)
29-06-24 15:06:01.111 E:     Exception in thread "intent-processor-8" java.lang.NullPointerException: null
29-06-24 15:06:01.111 E:     Caused by: java.lang.NullPointerException: null
29-06-24 15:06:01.111 E:         com.projectswg.common.data.sui.SuiBaseWindow.getLength(SuiBaseWindow.kt:240)
29-06-24 15:06:01.111 E:         com.projectswg.common.network.packets.swg.zone.server_ui.SuiCreatePageMessage.encode(SuiCreatePageMessage.java:58)
29-06-24 15:06:01.112 E:         com.projectswg.holocore.resources.support.global.network.NetworkClient.addToOutbound(NetworkClient.kt:215)
29-06-24 15:06:01.112 E:         com.projectswg.holocore.resources.support.global.network.NetworkClient.player$lambda$2(NetworkClient.kt:77)
29-06-24 15:06:01.112 E:         com.projectswg.holocore.resources.support.global.player.Player.sendPacket(Player.java:168)
29-06-24 15:06:01.112 E:         com.projectswg.holocore.services.support.global.zone.sui.SuiService.displayWindow(SuiService.kt:106)
29-06-24 15:06:01.112 E:         com.projectswg.holocore.services.support.global.zone.sui.SuiService.handleSuiWindowIntent(SuiService.kt:56)
29-06-24 15:06:01.112 E:         java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
29-06-24 15:06:01.112 E:         java.base/java.lang.reflect.Method.invoke(Method.java:580)
29-06-24 15:06:01.112 E:         me.joshlarson.jlcommon.control.Service.invoke(Service.java:133)
29-06-24 15:06:01.112 E:         me.joshlarson.jlcommon.control.Service.lambda$registerIntentHandlers$1(Service.java:119)
29-06-24 15:06:01.112 E:         me.joshlarson.jlcommon.control.IntentManager$IntentRunner.broadcast(IntentManager.java:214)
29-06-24 15:06:01.112 E:         me.joshlarson.jlcommon.control.IntentManager$IntentExecutor.run(IntentManager.java:269)
29-06-24 15:06:01.112 E:         me.joshlarson.jlcommon.utilities.ThreadUtilities.safeRun(ThreadUtilities.java:47)
29-06-24 15:06:01.112 E:         me.joshlarson.jlcommon.concurrency.ThreadPool$ThreadExecutor.threadExecutor(ThreadPool.java:174)
29-06-24 15:06:01.112 E:         java.base/java.lang.Thread.run(Thread.java:1583)
madsboddum commented 5 months ago

Upon further investigation, the issue with /qatool appears to be a separate problem. I will extract this into a different issue.

madsboddum commented 5 months ago

The tests pass because the problem occurs when encoding the SuiCreatePageMessage. Up until this point, the sui script can be null. No tests currently trigger encoding of the SUI window packets, which is why everything is passing.

Perhaps it would be a good idea to at invoke the encode/decode methods during tests, just to have some hope of catching issues like this.