Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8867409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:01:19+00:00 2026-06-14T17:01:19+00:00

Our Mac cocos2d app (http://deepworldgame.com) has been randomly throwing TSMProcessRawKeyCode failed exceptions for some

  • 0

Our Mac cocos2d app (http://deepworldgame.com) has been randomly throwing “TSMProcessRawKeyCode failed” exceptions for some time now, and I’m wondering if anyone has experienced this error or knows how to prevent it.

It always happens via the [NSEvent charactersIgnoringModifiers] call within ccKeysDown or ccKeysUp (it also happens for [NSEvent characters] without the modifiers). I don’t think it’s related to specific keys. Sometimes it only happens one time and the app continues to function afterward (if the exception is caught), but other times it essentially locks up keyboard input indefinitely and continues to cause exceptions with all future keypresses (again, when these exceptions are caught).

I’ve found little on the internets regarding this issue, unfortunately. One place I did find was in the Adium source code (https://bitbucket.org/adium/adium/src/6d1f9b903525/Source/AIExceptionController.m), which catches this exception with the comments:

//Ignore various known harmless or unavoidable exceptions (From the system or system hacks) 
...
// [TSMProcessRawKeyCode] May be raised by -[NSEvent charactersIgnoringModifiers]

It is indeed harmless when thrown once, but when the occasion happens that it continuously fires, it’s a real problem – especially when you’re in fullscreen mode and can’t use cmd-F to escape!

So, if anyone has any thoughts or experience, I would be HIGHLY grateful. This is pretty much the one remaining superbug in our application, and I would love to squash it into dust.

Thanks!

Here is the typical stack trace (MacManager.m is our object which implements the cocos2d keyboard delegate protocol):

Crashed Thread:  7  CVDisplayLink

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
objc[28871]: garbage collection is OFF
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'TSMProcessRawKeyCode failed (-192)'
*** Call stack at first throw:
(
0   CoreFoundation                      0x95b27d87 __raiseError + 231
1   libobjc.A.dylib                     0x9315a149 objc_exception_throw + 155
2   CoreFoundation                      0x95a8f619 +[NSException raise:format:arguments:] + 137
3   CoreFoundation                      0x95a8f589 +[NSException raise:format:] + 57
4   AppKit                              0x9ac01c1f _convertEventRefToString + 300
5   AppKit                              0x9ab23b5e -[NSEvent charactersIgnoringModifiers] + 880
6   Deepworld                           0x0001fd8a -[MacManager ccKeyDown:] + 65
7   CoreFoundation                      0x95a7d091 -[NSObject performSelector:withObject:] + 65
8   Deepworld                           0x0006bc95 -[CCEventDispatcher keyDown:] + 80
9   CoreFoundation                      0x95a7d091 -[NSObject performSelector:withObject:] + 65
10  Deepworld                           0x0006c014 -[CCEventDispatcher dispatchQueuedEvents] + 143
11  Deepworld                           0x0006a9a4 -[CCDirectorDisplayLink getFrameForTime:] + 155
12  Deepworld                           0x0006aaf1 MyDisplayLinkCallback + 40
13  CoreVideo                           0x9b44a5e1 _ZN13CVDisplayLink9performIOEP11CVTimeStamp + 489
14  CoreVideo                           0x9b4494e4 _ZN13CVDisplayLink11runIOThreadEv + 876
15  CoreVideo                           0x9b449161 _ZL13startIOThreadPv + 160
16  libsystem_c.dylib                   0x968a4ed9 _pthread_start + 335
17  libsystem_c.dylib                   0x968a86de thread_start + 34
)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:01:20+00:00Added an answer on June 14, 2026 at 5:01 pm

    I don’t think sending events in general is thread-safe, not to mention from a thread that has been created not within +[NSThread detachNewThreadSelector:toTarget:withObject:] (a thread created using the Objective-C run-time has __NSThread__main__ in the backtrace).

    I guess your app is the Deepworld binary part – when dispatching events, try using -[NSObject performSelectorOnMainThread:waitUntilDone:] instead, dispatching the events on the main thread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have found an issue in our app where Safari on the Mac randomly
I am trying to run our App on Mac Lion. App is built on
I am starting macruby and I am following this tutorial: http://blog.phusion.nl/2010/03/12/creating-our-very-first-mac-application-with-ruby-how-exciting/ I am stuck
I'm developing a Mac App in Java that logs into any one of our
Our application has a file format similar to the OpenDocument file format (see http://en.wikipedia.org/wiki/OpenDocument
In our website, some Mac users have troubles when they copy-paste text from PDF
We're using SCons + swtoolkit for our build system on Mac, Linux, and Windows.
Our web app uses SystemPropertyPlaceholder to load property files depending on the value of
Our company has a share point document server where the UNC looks something like
We're building our project (with Xcode 3.2.2 on Mac OS X 10.6.3, GCC 4.0.1)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.