I have been struggling with this stupid error from couple of hours. Have tried everything but it still persists. I'm unable to run any Flash Mobile AS3 project in FlashDevelop.
This is what it says in Output panel:
Debugger startup error. For troubleshooting see: http://www.flashdevelop.org/wikidocs/index.php?title=F.A.Q
Error details: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at net.sf.jni4net.jni.JNI.Dll.JNI_GetDefaultJavaVMInitArgs(JavaVMInitArgs* args)
at net.sf.jni4net.jni.JNI.Init()
at net.sf.jni4net.jni.JNI.CreateJavaVM(JavaVM& jvm, JNIEnv& env, Boolean attachIfExists, String[] options)
at net.sf.jni4net.Bridge.CreateJVM()
at net.sf.jni4net.Bridge.CreateJVM(BridgeSetup setup)
at FlashDebugger.DebuggerManager.Start(Boolean alwaysStart)
[Capturing traces with FDB]
and this is what it shows in the console/command prompt:
error while loading initial content
Please if anyone had seen this error and solved it successfully, I would really appreciate any help. Screenshot attached below.
Thanks!
Looks like you are using wrong Java SDK version 64 bit rather than 32 bit which FlashDevelop requires
Related
Edited version, after suggestion from community:
In a Windows 8.1 Phone project (Part of a VB.Net Solution with also a Store app and a Portable Class Library) I get this error message:
Call not possible because VB Runtime is not loaded.
but as far as I can trace the code keeps running in spite of this. Until... eventually an error pops up, telling me that
Could not find Windows Runtime type 'Windows.foundation'
What I have found so far on this subject seems to have a relation with Silverlight and very old versions of VB Runtime. Nothing recent.
Further on during execution in the error trap the following explanation is given:
at System.StubHelpers.WinRTTypeNameConverter.GetTypeFromWinRTTypeName(String typeName, Boolean& isPrimitive)
at System.StubHelpers.SystemTypeMarshaler.ConvertToManaged(TypeNameNative* pNativeType, Type& managedType)
at Windows.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType)
at Dossier365.Mobile.Behaviors.MenuTegelClickAction.ReageerOpMenuKeuze(Object sender, Object parameter).
I have attached a screenshot with the different messages. The Store App runs fine, based on the same PCL.
EDIT: after suggestions below: added DirectCast:
Now a new error message appears: I have no clue what goes on here or moreover: how to overcome this situation. My attempts so far have not lead to a workable solution.
Anyone with a good suggestion or solution?
I'm working on some flash app. Now, to test customer side of it I can use Flash Player debugger version that will save logs and show error messages. When it's deployed on the customer side - they will have a regular Flash Player version which means I will have no access to error messages if errors will happen. So I would like to equip it with some tool that would capture all of my trace messages in code and errors text. As for trace messages that's fairly simple, I just override the function in my code so it sends a POST request with trace message to a logger server, but how can I get a hold of the error message? Is there a known approach to this or some trick that somebody can suggest?
You can install the debug version of flash as your browser's default (in Chrome, you must disable the built-in player), so if you wanted to test user experience and debug, this would be the ideal solution.
However, to answer your question: there's no method for universally catching all errors, and redirecting them (that I know of). You'd have to encapsulate problem code ahead of time with try...catch statements, and send the property back on catch. For example:
try {
this["foo"]();
} catch (e:Error) {
trace(e);
}
In the debug version, the traced value would be TypeError: Error #1006: value is not a function. And while the standard version will only output TypeError: Error #1006, (a notably less descriptive error), what we're missing is any reference to where the error occured. To get this, we need to use Error.getStackTrace() to see the call stack and the line where the error occurred. In debug, this outputs the following:
TypeError: Error #1006: value is not a function.
at Shell_fla::MainTimeline/init()[C:\Projects\shell.as:91
In the standard client, we get a dissapointing null. In short, you cannot get any valuable info from the client versions.
The best advice I can give is to write around your problem code with your own custom error reports. For example, catch IO errors and trace the file it failed to load, or if you're expecting an object.foo, first try if (object.hasOwnProperty("foo")) { // do something } else { trace("foo not found in " + object.name) }. Code defensively.
Cheers,
I've discovered this post on StackOverflow:
How to catch all exceptions in Flex?
It answers my question, strange that I haven't ran into it while I was googling prior to asking.
Is is possible to debug actionscript via Flash Builder to see line number where exception happened? Currently i only see error code and description of error.
Any good articles are welcome.
Thanks.
If you catch an error you can trace the result of the
getStackTrace()
method. look here: as3 reference
In the compiler options panel of your run configuration, set -debug=true. This should enable the output of line numbers for all stack traces, including those of uncaught errors.
I have already spent a few hours to resolve this error. The weird thing is when I use this libraries independently, it works absolutely fine but when I integrate them with my ASP .NET MVC website, it start throwing the following exception. I have also used MachineKeySet flag based on suggestion here but still no luck. Could anyone please help me to get rid of this exception. Thanks.
An internal error occurred.
Description: An unhandled exception
occurred during the execution of the
current web request. Please review the
stack trace for more information about
the error and where it originated in
the code.
Exception Details:
System.Security.Cryptography.CryptographicException:
An internal error occurred.
Source Error:
Line 194: if
(string.IsNullOrEmpty(p12FilePassword))
Line 196: certificate = new X509Certificate2(p12FileBytes, "", X509KeyStorageFlags.MachineKeySet);
Line 197: else
I found the solution here. Looks like a known issue. I used X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable flags together and problem disappeared. Other solution is to change the identity of applicationpool to LOCALSERVICE.
I have a DLL with some COM objects. Sometimes, this objects crashes and register an error event in the Windows Event Log with lots of hexadecimal informations. I have no clue why this crashes happens.
So, How can I trace those COM objects exceptions?
The first step is to lookup the Fail code's hex value (E.G. E_FAIL 0x80004005). I've had really good luck with posting that value in Google to get a sense of what the error code means.
Then, I just use trial and error to try to isolate the location in code that's failing, and the root cause of the failure.
If you just want a really quick way to find out what the error code means, you could use the "Error Lookup" tool packaged with Visual Studio (details here). Enter the hex value, and it will give you the string describing that error code.
Of course, once you know that, you've still got to figure out why it's happening.
A good way to look up error (hresult) codes is HResult Plus or welt.exe (Windows Error Lookup Tool).
I use logging internally in the COM-classes to see what is going on. Also, once the COM-class is loaded by the executable, you can attach the VS debugger to it and debug the COM code with breakpoints, watches, and all that fun stuff.
COM objects don't throw exceptions. They return HRESULTs, most of which indicate a failure. So if you're looking for the equivalent of an exception stack trace, you're out of luck. You're going to have to walk through the code by hand and figure out what's going on.