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

Error parsing Default.NUI #349

Open
subaMmackowski opened this issue Apr 20, 2016 · 13 comments
Open

Error parsing Default.NUI #349

subaMmackowski opened this issue Apr 20, 2016 · 13 comments
Labels

Comments

@subaMmackowski
Copy link

subaMmackowski commented Apr 20, 2016

am getting a bad access EXC_BAD_ACCESS on line 17 in NUIDefinition.h

this line @Property (strong) NSString *variable;

This only happens when I try to init NUI like this: [NUISettings initWithStylesheet:@"Blue.NUI"];

it work fines this way: [NUIAppearance init];

I didn't use CocoaPods and I can't use CocoaPods due to the nature of my project. I did not have any trouble adding NUIParse to the project.

@Stunner
Copy link
Collaborator

Stunner commented Apr 20, 2016

Thanks for the report. Could you post a stacktrace and the line it is crashing on (please provide a couple lines above and below for context)? I am thinking it may very well be possible you didn't install the proper version of NUIParse.

@subaMmackowski
Copy link
Author

I install https://github.com/tombenner/NUIParse

I added it as a subproject as instructed by the NUI read me.

The call starts with:

Call stack from Xcode.

Main (1)Queue : com.apple.main-thread (serial)
Main (1)Queue : com.apple.main-thread (serial)
#0 0x2333467a in objc_retain ()
#1 0x23327ff4 in objc_setProperty_atomic ()
#2 0x00aebd1a in -[NUIDefinition setVariable:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/Parser/NUIDefinition.h:17
#3 0x00aebbcc in -[NUIDefinition initWithSyntaxTree:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/Parser/NUIDefinition.m:20
#4 0x005079be in -[NUIPShiftReduceParser parse:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUIParse-master/NUIParse/Parsers/NUIPShiftReduceParser.m:172
#5 0x00af5942 in -[NUIStyleParser parse:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/NUIStyleParser.m:188
#6 0x00af45ba in -[NUIStyleParser getStylesFromFile:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/NUIStyleParser.m:33
#7 0x00545a82 in +[NUISettings initWithStylesheet:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/NUISettings.m:33
#8 0x00aece7c in -[GameAppDelegate application:didFinishLaunchingWithOptions:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/Engine/Core/Platform/iOS/GameAppDelegate.mm:206
#9 0x27d251fc in -UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:
#10 0x27f4bfe4 in -UIApplication _callInitializationDelegatesForMainScene:transitionContext:
#11 0x27f4feba in -UIApplication _runWithMainScene:transitionContext:completion:
#12 0x27f63b9c in 84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3228 ()
#13 0x27f4d3aa in -UIApplication workspaceDidEndTransaction:
#14 0x24e58c7e in -FBSSerialQueue _performNext
#15 0x24e58f70 in -FBSSerialQueue _performNextFromRunLoopSource
#16 0x23b3768e in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
()
#17 0x23b3768e in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION ()
#18 0x23b3727c in __CFRunLoopDoSources0 ()
#19 0x23b355ea in __CFRunLoopRun ()
#20 0x23a88bf8 in CFRunLoopRunSpecific ()
#21 0x23a889e4 in CFRunLoopRunInMode ()
#22 0x27d1e5bc in -UIApplication _run
#23 0x27d18ba0 in UIApplicationMain ()
#24 0x00aeb744 in main at //Client/Code/Engine/Core/Platform/iOS/main.mm:16
#25 0x23737872 in start ()

@subaMmackowski
Copy link
Author

Any insights or help?

@Stunner
Copy link
Collaborator

Stunner commented Apr 23, 2016

You mentioned that it crashes within CPShiftReduceParser but there is no such class in NUIParse. Something seems fishy here. Are you sure your project doesn't have CoreParse included in it? It should be using only NUIParse to avoid any such conflicts/erroneous behavior.

@Stunner
Copy link
Collaborator

Stunner commented Apr 23, 2016

Also, is your project using ARC? If it isn't, this may be a source of contention as the EXC_BAD_ACCESS is caused when an object is overreleased.

@subaMmackowski
Copy link
Author

NUIParse project doesn't compile if its set to use ARC.

@subaMmackowski
Copy link
Author

I updated my original post.

Here is the call stack again.

Main (1)Queue : com.apple.main-thread (serial)
#0 0x0000000180ab40b0 in objc_retain ()
#1 0x0000000180aaae00 in objc_setProperty_atomic ()
#2 0x0000000100dc4440 in -[NUIDefinition setVariable:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/Parser/NUIDefinition.h:17
#3 0x0000000100dc42f0 in -[NUIDefinition initWithSyntaxTree:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/Parser/NUIDefinition.m:20
#4 0x0000000100631fa0 in -[NUIPShiftReduceParser parse:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUIParse-master/NUIParse/Parsers/NUIPShiftReduceParser.m:172
#5 0x0000000100dcef74 in -[NUIStyleParser parse:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/NUIStyleParser.m:188
#6 0x0000000100dcdda8 in -[NUIStyleParser getStylesFromFile:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/NUIStyleParser.m:33
#7 0x0000000100686670 in +[NUISettings initWithStylesheet:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/3rdParty/NUI/Core/NUISettings.m:33
#8 0x0000000100dc5460 in -[GameAppDelegate application:didFinishLaunchingWithOptions:] at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/Engine/Core/Platform/iOS/GameAppDelegate.mm:206
#9 0x00000001865ee8a8 in -UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:
#10 0x000000018681e094 in -UIApplication _callInitializationDelegatesForMainScene:transitionContext:
#11 0x0000000186822500 in -UIApplication _runWithMainScene:transitionContext:completion:
#12 0x000000018681f674 in -UIApplication workspaceDidEndTransaction:
#13 0x0000000182dd77ac in FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK ()
#14 0x0000000182dd7618 in -FBSSerialQueue _performNext
#15 0x0000000182dd79c8 in -FBSSerialQueue _performNextFromRunLoopSource
#16 0x00000001813ed124 in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION ()
#17 0x00000001813ecbb8 in __CFRunLoopDoSources0 ()
#18 0x00000001813ea8b8 in __CFRunLoopRun ()
#19 0x0000000181314d10 in CFRunLoopRunSpecific ()
#20 0x00000001865e7834 in -UIApplication _run
#21 0x00000001865e1f70 in UIApplicationMain ()
#22 0x0000000100dc3dc8 in main at /Users/Matt/Perforce/mmackowski_Stream_IOS/Client/Code/Engine/Core/Platform/iOS/main.mm:16
#23 0x0000000180eb28b8 in start ()

@subaMmackowski
Copy link
Author

Is the manual install method correct? I mean this step.

"Add NUIParse as a subproject, set its iOSNUIParse target as a dependency of your target, and add libNUIParse.a to your linked libraries."

When I do that I get linking errors because there are duplicate symbols.

@subaMmackowski
Copy link
Author

I just made NUIParse a subproject and a target dependency.

@subaMmackowski
Copy link
Author

Anyways I cannot get it to parse one of the style sheets provide in the project.

@Stunner
Copy link
Collaborator

Stunner commented May 3, 2016

Would it be possible for you to create a sample project with this exact issue that you could provide to me? I would then happily investigate and attempt to fix this issue. It's hard otherwise (unless you are willing to fix it of course).

Not sure about manual setup instructions as I have never done it before. Both active maintainers (including me) use CocoaPods and are not privy to the specifics of manual installation (which was written long ago). I'd have to dig a bit into a project with problems to understand the cause/attempt a fix.

@subaMmackowski
Copy link
Author

Ok, I will set up a sample project when I get the chance. Thanks for the
reply..

On Tue, May 3, 2016 at 2:47 PM, Aaron Jubbal notifications@github.com
wrote:

Would it be possible for you to create a sample project with this exact
issue that you could provide to me? I would then happily investigate and
attempt to fix this issue. It's hard otherwise (unless you are willing to
fix it of course).

Not sure about manual setup instructions as I have never done it before.
Both active maintainers (including me) use CocoaPods and are not privy to
the specifics of manual installation (which was written long ago). I'd have
to dig a bit into a project with problems to. After understand the
cause/attempt a fix.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#349 (comment)

@subaMmackowski
Copy link
Author

I am really swamped at work and maybe a while before I can get your a
project.

On Tue, May 3, 2016 at 2:47 PM, Aaron Jubbal notifications@github.com
wrote:

Would it be possible for you to create a sample project with this exact
issue that you could provide to me? I would then happily investigate and
attempt to fix this issue. It's hard otherwise (unless you are willing to
fix it of course).

Not sure about manual setup instructions as I have never done it before.
Both active maintainers (including me) use CocoaPods and are not privy to
the specifics of manual installation (which was written long ago). I'd have
to dig a bit into a project with problems to. After understand the
cause/attempt a fix.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#349 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants