Why I play/preload soundEffect with error in cocos2dx (ios)? - simpleaudioengine

Whether play or preload sound effect.
code here:
CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect("debug.mp3");
I will get this error:
ExtAudioFileOpenURL
The sound file is exist in app. And file is right.

Now I fix that.
It cause by I add a "All C++ Exceptions".

Your solution is a a valid workaround, but you are not debugging the rest of exceptions. I'm doing this to get rid of this problem:
Add a symbolic exception with this settings:
symbol:
objc_exception_throw
condition:
(BOOL)(! (BOOL)[[(NSException
*)$eax className] hasPrefix:#"_CDOpen"])
Please refer to this answer for more information:
Ignore certain exceptions when using Xcode's All Exceptions breakpoint

Related

Why does a generic UWP app show an error?

I created a simple UWP app from the VS 2017 blank UWP template. No added XAML or C# code-behind:
Create new app with Blank Universal Windows template
Set Debugger type to Mixed (Managed and Native)
Build and Run (No XAML or code added)
Following error: WinRT originate error - 0x80070490 : 'Element not found.'
This happens every time. Does anyone have a handle on this error? If I don't have Mixed Mode debugging on, I don't see the error but I'm assuming it's still there. Is this an error that I should be concerned about?
Thank you.
A lot of problem may result this error, and it should not be a fatal error in your case. Most likely you changed the default Exception Settings in visual studio.
Just like all other apps, Windows use exceptions and catch them at different level.
For end user, you should not see this exception and app should not crash.
In your situation, I think you click continue and the program should not crash, and it should not be a big concern.
I suggest you:
1, start and debug your app, open Debug|Windows|Exception Setting, then click the 'restore the list to default settings' button
2, restart your app.
3, You should not catch the exception, but you still see error message in Output window.
If you still see a exception window popup, you need to post more information like your os version, and then someone can help you
I met this error when I call the winRT api CommunityToolkit.WinUI.Notifications.ToastNotificationHistoryCompat.Clear(). Then let the app toast someting once the error had gone.

MSB4030 "Debug" is an invalid value

FYI, I am using a MCVS 2013 to build and run my program. However, I kept getting the error as shown in the picture, I have try to google the solution out, but there are no much information available. Besides that, I also getting 127 warnings. Some one from here please tell me how to prevent this error happen. Thanks!
In the properties page for your project, under the Linker -> Debugging tab, you need to use true or false instead of Debug as shown in the figure I attached.

How to debug Dojo in browser?

I'm currently (trying) to develop an app with Worklight Studio 5.0.6 and Dojo (Mobile) 1.8.3. I have a really hard time to to find a proper method for debugging. After waiting 5-10 minutes for the build an deploy-process on the server, an error usually looks like this in the Chrome debugger:
How am I supposed to track down this error in MY source? The whole stack trace consists entirely of Dojo code which generates an absolutely useless error message after 20 abstraction layers.
Seriously, how do you guys handle this in real life? What methods do you use for debugging Dojo-driven apps in the browser?
spyro
For dojo.parse errors, I find it useful to pause the Chrome debugger on all exceptions (the purple icon on your screenshot, should be blue). You usally get more details about the cause of the error, the name of the DOM node being parsed, etc. in the first exception being raised.
Rémi.
Debugging dojo based application should be the same as debugging any javascript application.
Usually I will follow these steps:
add console.log() somewhere in code: this is fast and most of time this is enough.
set breakpoint in debugger: if step 1 is not enough, you can base on error information to set breakpoint before error line, then step in or step out.
comment out recently changes: for some error which is hard to find the error line, for example, parse error in your case, the good way is comment out your recently changes one by one till back to your last working version. Or, return to your last working version, then add code back one by one.
Create a simple application to reproduce the error : if your application is very complicate and it is hard for you to follow above methods, you can try to create a new application which mimics your current application but with simple logics and try to reproduce the error.
Based on experience : Some errors, for example, extra ',' in the end of array which works at chrome and firefox, will report a nonsense error information at IE. Debug these kinds of errors is very difficult, you can base on your experience or do a google search.
Did you provide isDebug: true in your dojoConfig? Also, try to see if the same occurs in other browsers.
Update: I recently discovered that there are issues with Google Chrome and Dojo debugging and I think it has to do with the asynchronous loading of files. As you can see in the provided screenshot of #spyro, the ReferenceError object is blank (which you can notice because of the empty brackets {}). If you want to solve that, reopen the console of Google Chrome, (for example by tapping F12 twice). After reopening the ReferenceError should not be empty anymore and now you can expand that object by using the arrow next to it and get a more detailed message about what failed.
Usually what I do in situations like that is to place a breakpoint inside the error callback (line 3398 in your case) and then look into the error variable ("e").
I am not sure how familiar you are with the Web Inspector, but once you hit the breakpoint open the Web Inspector 'console' and check for the error properties "e.message" and "e.stack" (just type in "e.message " in the console).
Also, during development it is better to avoid Dojo optimization / minification, which greatly improve your debug-ability.
Bottom line is to try to place the breakpoint before the error is thrown.

How to find the location of error in Xcode

How can I change the preferences in Xcode so that it highlights the exact location of an error like other programming environments instead of simply returning SIGABRT? Or is this not possible?
Xcode should already stop and show where execution is when a signal like SIGABRT occurs. (It does for me, without any special configuration).
a NSInvalidArgumentException occurs Xcode only highlights main.m
It's not signals you need to catch for that, it's exceptions. Go to the breakpoint navigator and add an exception breakpoint.

is the console output in XCode the equivalent of the error message window in Visual Studio?

The only error I ever get is SIGABRT in main. This is getting incredibly frustrating as I have to guess what line caused the error and why.
This is a far cry from visual studio's informative error messages. It's basically like sending off an entire novel to an editor and the only notes you get back are: "There is a problem somewhere in your book. There may be many or just one and they are either gramatical or to do with spelling."
I just don't know how anyone can work like this. What am I doing wrong? Surely I'm missing something essential.
Write some NSLog() into your code and you'll see it in the console. It's a great help to narrow down a crash.
if you have encountered memory problems (aka – your app crashes for no apparent reason because you attempted to use an object that you deallocated to soon) setting NSZombieEnabled = YES can help you diagnose the problem.
Normally, when your app crashes in this way and you look at the log it tells you nothing (thanks Apple!). However, if you select your executable (under Executables in Xcode), hit the info button (round blue thing at the top), select arguments and put this in the bottom screen NSZombieEnabled = YES the log will give you more information.
Now, if your app crashes the log will have an indication of the object you attempted to access that has already been deallocated. Not forget to turn it off before you deploy it – you don’t want a bunch of nszombies running around your clients phones…
http://howtomakeiphoneapps.com/nszombie-and-xcode-oh-my/27/

Resources