Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null Pointer Exception in VSCodeDebugProtocolPlugin #47

Closed
piotrzarzycki21 opened this issue Oct 17, 2017 · 1 comment
Closed

Null Pointer Exception in VSCodeDebugProtocolPlugin #47

piotrzarzycki21 opened this issue Oct 17, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@piotrzarzycki21
Copy link
Collaborator

In debugging version of Moonshine (run from IDE) I'm getting NPE in VSCodeDebugProtocolPlugin with following stack trace:

[Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference. at actionScripts.plugins.vscodeDebug::VSCodeDebugProtocolPlugin/parseSource()[D:\flex_sdk\Projects\Prominic.NET\Moonshine Project\Moonshine-IDE\ide\MoonshineDESKTOPevolved\src\actionScripts\plugins\vscodeDebug\VSCodeDebugProtocolPlugin.as:555] at actionScripts.plugins.vscodeDebug::VSCodeDebugProtocolPlugin/parseStackFrame()[D:\flex_sdk\Projects\Prominic.NET\Moonshine Project\Moonshine-IDE\ide\MoonshineDESKTOPevolved\src\actionScripts\plugins\vscodeDebug\VSCodeDebugProtocolPlugin.as:548] at actionScripts.plugins.vscodeDebug::VSCodeDebugProtocolPlugin/parseStackTraceResponse()[D:\flex_sdk\Projects\Prominic.NET\Moonshine Project\Moonshine-IDE\ide\MoonshineDESKTOPevolved\src\actionScripts\plugins\vscodeDebug\VSCodeDebugProtocolPlugin.as:529] at actionScripts.plugins.vscodeDebug::VSCodeDebugProtocolPlugin/parseResponse()[D:\flex_sdk\Projects\Prominic.NET\Moonshine Project\Moonshine-IDE\ide\MoonshineDESKTOPevolved\src\actionScripts\plugins\vscodeDebug\VSCodeDebugProtocolPlugin.as:343] at actionScripts.plugins.vscodeDebug::VSCodeDebugProtocolPlugin/parseProtocolMessage()[D:\flex_sdk\Projects\Prominic.NET\Moonshine Project\Moonshine-IDE\ide\MoonshineDESKTOPevolved\src\actionScripts\plugins\vscodeDebug\VSCodeDebugProtocolPlugin.as:295] at actionScripts.plugins.vscodeDebug::VSCodeDebugProtocolPlugin/parseMessageBuffer()[D:\flex_sdk\Projects\Prominic.NET\Moonshine Project\Moonshine-IDE\ide\MoonshineDESKTOPevolved\src\actionScripts\plugins\vscodeDebug\VSCodeDebugProtocolPlugin.as:232] at actionScripts.plugins.vscodeDebug::VSCodeDebugProtocolPlugin/parseMessageBuffer()[D:\flex_sdk\Projects\Prominic.NET\Moonshine Project\Moonshine-IDE\ide\MoonshineDESKTOPevolved\src\actionScripts\plugins\vscodeDebug\VSCodeDebugProtocolPlugin.as:254] at actionScripts.plugins.vscodeDebug::VSCodeDebugProtocolPlugin/socket_socketDataHandler()[D:\flex_sdk\Projects\Prominic.NET\Moonshine Project\Moonshine-IDE\ide\MoonshineDESKTOPevolved\src\actionScripts\plugins\vscodeDebug\VSCodeDebugProtocolPlugin.as:968]

In released version 1.6.0 and built by ANT version from current master it's not occurs or at least we don't gets any information about it. However once I have started application and set break point as you can see on the screenshot I don't get's code highlighting, debugged application freezes.

image

Example app attached.
NewFlexDesktopProject.zip

@piotrzarzycki21 piotrzarzycki21 added this to the v1.7.0 milestone Oct 17, 2017
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Oct 18, 2017

I can able to reproduce the null error @piotrzarzycki21 described; and also able to reproduced when it happens and when not.

@joshtynjala can you please take a look into this (?) Following is the detailed test case.

This same null point exception I noticed when running Moonshine source or sample project's source, in VSCodeDebugProtocolPlugin.as:

image

  • Create a new Flex Desktop project
  • Add a method inside <fx:Script> area - here's the source I used to test
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
					   xmlns:s="library://ns.adobe.com/flex/spark" 
					   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
			   
	<fx:Declarations>
	</fx:Declarations>
	
	<fx:Script>
		<![CDATA[
			
			private function abcd():void
			{
				trace("help!");
			}
			
		]]>
	</fx:Script>
	
	<s:Label fontSize="24" fontWeight="bold" textAlign="center"
		horizontalCenter="0" verticalCenter="0"
		text="Hello World!"/>
		<s:Button label="hei!" click="abcd()"/>
</s:WindowedApplication>
  • Add a breakpoint to the above method's (abcd) code
  • Run the application with Build & Debug
  • Application starts in debugging mode, clicking on the button highlights and stop to the breakpoint in appropriate place
  • Stop the debugger
  • Add the abcd() in application's creation complete event now:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
					   xmlns:s="library://ns.adobe.com/flex/spark" 
					   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="abcd()">
  • Restart Build & Debug
  • Moonshine thrown above null pointer exception
  • Removing the method running from application's creationComplete event makes everything good again

@joshtynjala joshtynjala self-assigned this Oct 18, 2017
rat-moonshine added a commit that referenced this issue Nov 10, 2021
- In-progress Firewalls List
(#47)
rat-moonshine added a commit that referenced this issue Nov 10, 2021
- Exposed API of GBAuth to GBAuthHaxe
- Cleaning GBAuthInterfaceProvider and SharedGBAuthBridgeImp (working..)
(#47)
rat-moonshine added a commit that referenced this issue Nov 10, 2021
rat-moonshine added a commit that referenced this issue Nov 10, 2021
rat-moonshine added a commit that referenced this issue Nov 10, 2021
- Relocation and removal of some class-files between GBAuth and Native
- Introduction of PCDHaxe
rat-moonshine added a commit that referenced this issue Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants