Login Action Required

The NinevehGL Forum uses a new concept of "socialized forum" or as we like to say "Tweet Forum".

Here is the deal:
  1. No new registration is required. Just sign in with your Twitter account and authorize the NinevehGL Forum.
  2. Once you’re in, you'll be able to "Follow a Thread", that means every time that thread receive a new post or update you'll receive a mention on your twitter.
  3. Besides, you can enable "Auto Share", then every new post and/or thread you make will be tweeted on your timeline. (By default, auto-share is enabled only for your threads)

Forum Rules:

1. We understand human comunication can become "hot" sometimes. So some insults and bad words ARE allowed. Just don't push too much being an asshole all the time.

2. SPAMMERS are not allowed. There are penalties for this kind of user and they can be banned forever.

3. You can report other users, if you judge necessary. An user reported many times by many people can also be banned forever. However you can also receive penalties for report deliberately for no apparent reason.

If there is a similar thread title, make sure the other one doesn't already have the answer you're looking for.

This forum uses the BBCode (Bulletin Board Code), here are some instructions:

Bold: [b]text[/b]
Italic: [i]text[/i]
Underline: [u]text[/u]

Code: [code]text[/code]

[ul] [*]item [/ul]
[ol] [*]item [/ol]



Embed (videos, code, 3D):

Welcome to the NinevehGL's world!
NinevehGL is a 3D engine forged with pure Obj-C.
Welcome to the
Hello, Guest.

Your current vote:

You can change your vote many times. But it's still one single vote.

Setting nglGlobalMultithreading two times causes crash
Vote this thread:


Posts: 41


Fri, Jun 29 2012

In my app, I set nglGlobalMultiThreading to only multi-thread on Rendering, then I load all of the models, and upon completion of loading all of the models I set nglGlobalMultiThreading to full. Doing so causes a crash with the error:

-[__NSCFType stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance 0xe6680e0

-[__NSCFType stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance 0x4a4ed0

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance 0xe6680e0'

If I don't do this and just stick to either full multithreading or render-only multithreading (IE only set the global once instead of twice) then the crash does not occur.

I am calling nglGlobalFlush() after both occurences of setting the globals. Also, should I be setting ALL of my nglGlobals everytime Im going to call nglGlobalFlush? Because I've set other non-changing nglGlobals such as textureQuality and lighting earlier on in the app and called nglGlobalFlush there.

To re-iterate, this is essentially what I am doing:

//Set basic nglGlobals


//Later on in the app when its time to load the models...

//...Load models

//Loading complete, turn full multi-threading back on

You may be wondering why I am turning off the multi-threading for mesh parsing when I'm loading in the models. I am doing this because I've noticed if you attempt to load too many models into NinevehGL with multi-threading for parsing turned on, a crash occurs with something along the lines of "Array was mutated while being looped through", which I can only assume is due to the threads conflicting with each other and an NGLCamera trying to loop through all of it's meshs and render them while new meshs are being added to the camera in the background. So I turn off multi threading for parsing during the phase where many models are loaded, and then I turn it back on to allow for quick mesh parsing when the user is placing individual meshs, as this doesn't seem to raise an issue.

Any help / input would be greatly appreciated,
- Adam Eisfeld
0% like this - 0/0


Posts: 571


Sun, Jul 1 2012

In response to: @adameisfeld

Hello Adam,

This is why our advice is to always set the globals once and always before start anything your 3D render, specially the multithreading one.

If you notice a problem when loading multiple meshes, please report it, because if you try to make a work around by your self you can get stuck in this dead end situation.

Please report the first problem and we'll try to solve that one.
0% like this - 0/0

NinevehGL is a 3D engine built right on top of OpenGL ES and it uses all the programmable pipeline power, making it easy for you to create great application with shaders.

Share on

Follow NinevehGL
Fastest way to contact us:

Copyright © 2011 db-in. All rights reserved.