xamarin.android project deployment errors - deployment

i made a project to try and use admob banner but when i deploy the project on my device (api 21) i get a "there were deployment errors. continue?" massege but when i run it on my emulator(api 23) it works perfectly.
my target android version and target framework version are both set to api 21
this is what i get in the output window
sorry for the length i wasnt sure how much of it to put
:Deployment failed
2>Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
2> ב- Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2> ב- Mono.AndroidTools.AndroidDevice.<InstallPackage>c__AnonStoreyE.<>m__0(Task`1 t)
2> ב- System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2> ב- System.Threading.Tasks.Task.Execute()
2>The "InstallPackageAssemblies" task failed unexpectedly.
2>System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
2> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2> at Mono.AndroidTools.AndroidDevice.<InstallPackage>c__AnonStoreyE.<>m__0(Task`1 t)
2> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2> at System.Threading.Tasks.Task.Execute()
2> --- End of inner exception stack trace ---
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>c__async0.MoveNext()
2> --- End of inner exception stack trace ---
2> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
2> at System.Threading.Tasks.Task.Wait()
2> at Xamarin.Android.Tasks.InstallPackageAssemblies.Execute()
2> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2> at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2>---> (Inner Exception #0) Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
2> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2> at Mono.AndroidTools.AndroidDevice.<InstallPackage>c__AnonStoreyE.<>m__0(Task`1 t)
2> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2> at System.Threading.Tasks.Task.Execute()
2> --- End of inner exception stack trace ---
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>c__async0.MoveNext()<---
2>
2>Build FAILED.
2>
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Related

How to set an exception using masm64?

How can i access the exception chain (SEH) using masm64?
Using masm32, I get the first exception looking into fs:[0]
But when I checked in Windbg if fs:[0] still pointed at the first exception in x64, I figured that it wasn't.
I'd like to set an exception in x64 the same way I did in x86. Is it feasible (maybe looking at gs register)?
If this is coding related then you use
ml64seh PROC FRAME:ExceptionFilter
this adds your exception handler to .PDATA section RUNTIME_FUNCTION
if this is how to find this exception handler in windbg when the exception has been raised
use !exchain command
or if you want to find it before executing a specific function use .fnent command
a sample for x64 seh and finding it in windbg is as follows
;assemble and link with
;ml64 /Zi ml64seh.asm /link /debug /entry:ml64seh /subsystem:console
.data
safeplace DWORD ?
.code
ExceptionFilter PROC
jmp Handler
ExceptionFilter ENDP
PUBLIC ml64seh
ml64seh PROC FRAME:ExceptionFilter
.ENDPROLOG
mov rax, 0
mov [rax], rax ;access violation
jmp exit
Handler::
lea rax, safeplace
mov [r8+078h], rax ; replacing rax in exception handler so access is possible
mov rax, 0
ret
Exit:
ret
ml64seh ENDP
END
run without stopping in windbg
:\>cdb -g ml64seh.exe
(2aa0.3024): Access violation - code c0000005 (first chance)
ml64seh!ml64seh+0x7:
00007ff7`0e3b1029 488900 mov qword ptr [rax],rax ds:00000000`00000000=????????????????
0:000>
it crashed and broke now locating exception handlers
0:000> .fnent .
Debugger function entry 0000020b`e36c47a8 for:
(00007ff7`0e3b1022) ml64seh!ml64seh+0x7 | (00007ff7`0e3b32b0) ml64seh!$xdatasym
BeginAddress = 00000000`00001022
EndAddress = 00000000`00001042
UnwindInfoAddress = 00000000`000032b0
Unwind info at 00007ff7`0e3b32b0, c bytes
version 1, flags 3, prolog 0, codes 0
handler routine: ml64seh!ILT+0(ExceptionFilter) (00007ff7`0e3b1005), data 0 <<<<<<<<<
0:000> !exchain
3 stack frames, scanning for handlers...
Frame 0x00: ml64seh!ml64seh+0x7 (00007ff7`0e3b1029)
ehandler ml64seh!ILT+0(ExceptionFilter) (00007ff7`0e3b1005) <<<<<<<<<<<<
Frame 0x02: ntdll!RtlUserThreadStart+0x21 (00007ffe`213c26a1)
ehandler ntdll!_C_specific_handler (00007ffe`213fc720)
0:000>
lets see if we go to the handler and return back to re access the faulting place
0:000> bp .
0:000> bp 00007ff7`0e3b1005
0:000> bl
0 e 00007ff7`0e3b1029 0001 (0001) 0:**** ml64seh!ml64seh+0x7
1 e 00007ff7`0e3b1005 0001 (0001) 0:**** ml64seh!ILT+0(ExceptionFilter)
0:000> g
Breakpoint 1 hit
ml64seh!ILT+0(ExceptionFilter):
00007ff7`0e3b1005 e916000000 jmp ml64seh!ExceptionFilter (00007ff7`0e3b1020)
0:000> g
Breakpoint 0 hit
ml64seh!ml64seh+0x7: is accessible now
00007ff7`0e3b1029 488900 mov qword ptr [rax],rax ds:00007ff7`0e3b4000=0000000000000000
0:000>
btw you can use dumpbin or linker to spit out all the unwindinfos in a specific binary using -unwindinfo switch
:\>dumpbin /unwindinfo ml64seh.exe
Microsoft (R) COFF/PE Dumper Version 14.29.30146.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file ml64seh.exe
File Type: EXECUTABLE IMAGE
Function Table (1)
Begin End Info Function Name
00000000 00001022 00001042 000032B0 ml64seh
Unwind version: 1
Unwind flags: EHANDLER UHANDLER
Size of prologue: 0x00
Count of codes: 0
Handler: 00001005 #ILT+0(ExceptionFilter)

Bitbake do image failure

I have been successfully building an image for many days now. I add all of my custom files to GitLab. I have not knowingly made changes to my build environment. I am now getting errors can can not build my image. Can anyone understand what this error is telling me? I have tried looking it up but nothing seems to work.
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:06
Sstate summary: Wanted 5 Local 3 Network 0 Missed 2 Current 1114 (60% match, 99% complete)
NOTE: Executing Tasks
ERROR: evccapplication-1.0-r0 do_image: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_image(d)
0003:
File: '/home/michael/Documents/evcc_custom/sources/poky/meta/classes/image.bbclass', lineno: 262, function: do_image
0258:
0259: d.setVarFlag('REPRODUCIBLE_TIMESTAMP_ROOTFS', 'export', '1')
0260: pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND")
0261:
*** 0262: execute_pre_post_process(d, pre_process_cmds)
0263:}
0264:do_image[dirs] = "${TOPDIR}"
0265:addtask do_image after do_rootfs
0266:
File: '/home/michael/Documents/evcc_custom/sources/poky/meta/lib/oe/utils.py', lineno: 263, function: execute_pre_post_process
0259: for cmd in cmds.strip().split(';'):
0260: cmd = cmd.strip()
0261: if cmd != '':
0262: bb.note("Executing %s ..." % cmd)
*** 0263: bb.build.exec_func(cmd, d)
0264:
0265:# For each item in items, call the function 'target' with item as the first
0266:# argument, extraargs as the other arguments and handle any exceptions in the
0267:# parent thread
File: '/home/michael/Documents/evcc_custom/sources/poky/bitbake/lib/bb/build.py', lineno: 256, function: exec_func
0252: with bb.utils.fileslocked(lockfiles):
0253: if ispython:
0254: exec_func_python(func, d, runfile, cwd=adir)
0255: else:
*** 0256: exec_func_shell(func, d, runfile, cwd=adir)
0257:
0258: try:
0259: curcwd = os.getcwd()
0260: except:
File: '/home/michael/Documents/evcc_custom/sources/poky/bitbake/lib/bb/build.py', lineno: 503, function: exec_func_shell
0499: with open(fifopath, 'r+b', buffering=0) as fifo:
0500: try:
0501: bb.debug(2, "Executing shell function %s" % func)
0502: with open(os.devnull, 'r+') as stdin, logfile:
*** 0503: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
0504: except bb.process.ExecutionError as exe:
0505: # Find the backtrace that the shell trap generated
0506: backtrace_marker_regex = re.compile(r"WARNING: Backtrace \(BB generated script\)")
0507: stdout_lines = (exe.stdout or "").split("\n")
File: '/home/michael/Documents/evcc_custom/sources/poky/bitbake/lib/bb/process.py', lineno: 186, function: run
0182:
0183: if pipe.returncode != 0:
0184: if log:
0185: # Don't duplicate the output in the exception if logging it
*** 0186: raise ExecutionError(cmd, pipe.returncode, None, None)
0187: raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
0188: return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/home/michael/Documents/evcc_custom/build-fb/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/evccapplication/1.0-r0/temp/run.prelink_image.131394' failed with exit code 2
ERROR: Logfile of failure stored in: /home/michael/Documents/evcc_custom/build-fb/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/evccapplication/1.0-r0/temp/log.do_image.131394
ERROR: Task (/home/michael/Documents/evcc_custom/evcc_layers/meta-evccapplication/recipes-core/images/evccapplication.bb:do_image) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3064 tasks of which 3063 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/michael/Documents/evcc_custom/evcc_layers/meta-evccapplication/recipes-core/images/evccapplication.bb:do_image
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
If you get an error similar to this delete your build folder. Then recreate it. For NXP devices they give you the command
DISTRO=fsl-imx-fb MACHINE=imx6ull14x14evk source imx-setup-release.sh -b build-fb
Save your local.conf and bblayers.bb file to git or to a new location.
Delete the build-fb folder and re-run the command above. Pull in any changes from git or files saved elsewhere.
Re-run bitbake. This got my workspace back. Because you are not deleting any of the downloads folders the build takes little time. All the time is spent compiling sources.

ERROR: YoctoProject - core-image-sato: do_populate_sdk

I am a beginner in Yocto project. I am trying to build the image for Beaglebone Black Board with command-line: bitbake core-image-sato -c populate_sdk and I had an error (the detail in the below) in last task.
Enviroment build: Ubuntu 16.04 LTS, using Bash Shell instead of Dash Shell.
I tried to build again many times but still facing same error. Anybody can help me to fix this error?
Log file:
NOTE: Executing create_sdk_files ...
DEBUG: Executing shell function create_sdk_files
DEBUG: Shell function create_sdk_files finished
NOTE: Executing check_sdk_sysroots ...
DEBUG: Executing python function check_sdk_sysroots
DEBUG: Python function check_sdk_sysroots finished
NOTE: Executing archive_sdk ...
DEBUG: Executing shell function archive_sdk
/home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392: line 106: 11617 Broken pipe tar --owner=root --group=root -cf - .
11618 Killed | xz -T 0 -9 > /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/x86_64-deploy-core-image-sato-populate-sdk/poky-glibc-x86_64-core-image-sato-armv7at2hf-neon-beaglebone-toolchain-3.0.tar.xz
WARNING: /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392:1 exit 137 from 'xz -T 0 -9 > /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/x86_64-deploy-core-image-sato-populate-sdk/poky-glibc-x86_64-core-image-sato-armv7at2hf-neon-beaglebone-toolchain-3.0.tar.xz'
ERROR: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_populate_sdk(d)
0003:
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/classes/populate_sdk_base.bbclass', lineno: 169, function: do_populate_sdk
0165:
0166: populate_sdk(d)
0167:
0168:fakeroot python do_populate_sdk() {
*** 0169: populate_sdk_common(d)
0170:}
0171:SSTATETASKS += "do_populate_sdk"
0172:SSTATE_SKIP_CREATION_task-populate-sdk = '1'
0173:do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/classes/populate_sdk_base.bbclass', lineno: 166, function: populate_sdk_common
0162: manifest_type=Manifest.MANIFEST_TYPE_SDK_HOST)
0163: create_manifest(d, manifest_dir=d.getVar('SDK_DIR'),
0164: manifest_type=Manifest.MANIFEST_TYPE_SDK_TARGET)
0165:
*** 0166: populate_sdk(d)
0167:
0168:fakeroot python do_populate_sdk() {
0169: populate_sdk_common(d)
0170:}
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/lib/oe/sdk.py', lineno: 413, function: populate_sdk
0409: env_bkp = os.environ.copy()
0410:
0411: img_type = d.getVar('IMAGE_PKGTYPE')
0412: if img_type == "rpm":
*** 0413: RpmSdk(d, manifest_dir).populate()
0414: elif img_type == "ipk":
0415: OpkgSdk(d, manifest_dir).populate()
0416: elif img_type == "deb":
0417: DpkgSdk(d, manifest_dir).populate()
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/lib/oe/sdk.py', lineno: 60, function: populate
0056: self.sysconfdir, "ld.so.cache")
0057: self.mkdirhier(os.path.dirname(link_name))
0058: os.symlink("/etc/ld.so.cache", link_name)
0059:
*** 0060: execute_pre_post_process(self.d, self.d.getVar('SDK_POSTPROCESS_COMMAND'))
0061:
0062: def movefile(self, sourcefile, destdir):
0063: try:
0064: # FIXME: this check of movefile's return code to None should be
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/lib/oe/utils.py', lineno: 260, function: execute_pre_post_process
0256: for cmd in cmds.strip().split(';'):
0257: cmd = cmd.strip()
0258: if cmd != '':
0259: bb.note("Executing %s ..." % cmd)
*** 0260: bb.build.exec_func(cmd, d)
0261:
0262:# For each item in items, call the function 'target' with item as the first
0263:# argument, extraargs as the other arguments and handle any exceptions in the
0264:# parent thread
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/build.py', lineno: 249, function: exec_func
0245: with bb.utils.fileslocked(lockfiles):
0246: if ispython:
0247: exec_func_python(func, d, runfile, cwd=adir)
0248: else:
*** 0249: exec_func_shell(func, d, runfile, cwd=adir)
0250:
0251: try:
0252: curcwd = os.getcwd()
0253: except:
File: '/usr/lib/python3.5/contextlib.py', lineno: 77, function: __exit__
0073: # Need to force instantiation so we can reliably
0074: # tell if we get the same exception back
0075: value = type()
0076: try:
*** 0077: self.gen.throw(type, value, traceback)
0078: raise RuntimeError("generator didn't stop after throw()")
0079: except StopIteration as exc:
0080: # Suppress StopIteration *unless* it's the same exception that
0081: # was passed to throw(). This prevents a StopIteration
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/utils.py', lineno: 431, function: fileslocked
0427: if files:
0428: for lockfile in files:
0429: locks.append(bb.utils.lockfile(lockfile))
0430:
*** 0431: yield
0432:
0433: for lock in locks:
0434: bb.utils.unlockfile(lock)
0435:
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/build.py', lineno: 249, function: exec_func
0245: with bb.utils.fileslocked(lockfiles):
0246: if ispython:
0247: exec_func_python(func, d, runfile, cwd=adir)
0248: else:
*** 0249: exec_func_shell(func, d, runfile, cwd=adir)
0250:
0251: try:
0252: curcwd = os.getcwd()
0253: except:
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/build.py', lineno: 450, function: exec_func_shell
0446: with open(fifopath, 'r+b', buffering=0) as fifo:
0447: try:
0448: bb.debug(2, "Executing shell function %s" % func)
0449: with open(os.devnull, 'r+') as stdin, logfile:
*** 0450: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
0451: finally:
0452: os.unlink(fifopath)
0453:
0454: bb.debug(2, "Shell function %s finished" % func)
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/process.py', lineno: 182, function: run
0178: if not stderr is None:
0179: stderr = stderr.decode("utf-8")
0180:
0181: if pipe.returncode != 0:
*** 0182: raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
0183: return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392' failed with exit code 137:
/home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392: line 106: 11617 Broken pipe tar --owner=root --group=root -cf - .
11618 Killed | xz -T 0 -9 > /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/x86_64-deploy-core-image-sato-populate-sdk/poky-glibc-x86_64-core-image-sato-armv7at2hf-neon-beaglebone-toolchain-3.0.tar.xz
WARNING: /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392:1 exit 137 from 'xz -T 0 -9 > /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/x86_64-deploy-core-image-sato-populate-sdk/poky-glibc-x86_64-core-image-sato-armv7at2hf-neon-beaglebone-toolchain-3.0.tar.xz'
ERROR: Logfile of failure stored in: /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/log.do_populate_sdk.4392
ERROR: Task (/home/huongnguyen/Desktop/poky/openembedded-core/meta/recipes-sato/images/core-image-sato.bb:do_populate_sdk) failed with exit code '1'
Exit code 137 means something killed xz during the build. You may be running out of memory: check dmesg after this happens, there might be a log line about out-of-memory killer.
Had the same problem and could make it go away with XZ_MEMLIMIT="75%" bitbake image-name -c do_populate_sdk. The bitbake.conf in my version of Yocto defaults XZ_MEMLIMIT to 50%.
Had the same problem and none of the usual methods, like, deleting hidden repo file worked.
I then clean the build using bitbake -c clean mybuildname and then again made the build and it worked flawlessly, I hope it helps someone.

Stacktrace of an inner exception

w3wp process hosting my .NET application is crashing at random times. I have collected a dump file by setting up a second chance exception rule using DebugDiag. Here are the steps I have performed.
The lastevent command shows a .NET exception.
0:027> .lastevent
Last event: 1ae4.2e98: CLR exception - code e0434352 (first/second chance not available)
The stack trace of this thread looks as follows,
0:027> !CLRStack
OS Thread Id: 0x2e98 (68)
Child SP IP Call Site
000000266c1bab18 00007fff6e5d95fc [HelperMethodFrame: 000000266c1bab18]
000000266c1bac00 00007fff5cb38afb System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)
000000266c1bcb48 00007fff6657120d [HelperMethodFrame: 000000266c1bcb48]
000000266c1bcc30 00007fff5cb359b5 System.Runtime.AsyncResult.Complete(Boolean)
000000266c1bea00 00007fff6657120d [FaultingExceptionFrame: 000000266c1bea00]
000000266c1bef00 00007fff5bca63a5 System.Web.HttpApplication+AsyncEventExecutionStep.OnAsyncEventCompletion(System.IAsyncResult)
000000266c1bef60 00007fff5cb3586c System.Runtime.AsyncResult.Complete(Boolean)
000000266c1befd0 00007fff570da192 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(System.Object)
000000266c1bf020 00007fff5cb38b63 System.Runtime.IOThreadScheduler+ScheduledOverlapped.IOCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
000000266c1bf090 00007fff5cb38ac7 System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)
000000266c1bf0f0 00007fff650a045c System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*) [f:\dd\ndp\clr\src\BCL\system\threading\overlapped.cs # 135]
000000266c1bf2a0 00007fff66416793 [GCFrame: 000000266c1bf2a0]
000000266c1bf498 00007fff66416793 [DebuggerU2MCatchHandlerFrame: 000000266c1bf498]
000000266c1bf628 00007fff66416793 [ContextTransitionFrame: 000000266c1bf628]
000000266c1bf858 00007fff66416793 [DebuggerU2MCatchHandlerFrame: 000000266c1bf858]
pe command shows a callback exception
0:027> !pe
Exception object: 0000002552364d38
Exception type: System.Runtime.CallbackException
Message: Async Callback threw an exception.
InnerException: System.NullReferenceException, Use !PrintException 0000002552364ae8 to see more.
StackTrace (generated):
SP IP Function
000000266C1BCC30 00007FFF5CB359B5 System_ServiceModel_Internals_ni!System.Runtime.AsyncResult.Complete(Boolean)+0x235
000000266C1BEFD0 00007FFF570DA192 System_ServiceModel_Activation_ni!System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(System.Object)+0x92
000000266C1BF020 00007FFF5CB38B63 System_ServiceModel_Internals_ni!System.Runtime.IOThreadScheduler+ScheduledOverlapped.IOCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x53
000000266C1BF090 00007FFF5CB38AFB System_ServiceModel_Internals_ni!System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x6b
000000266C1BF0F0 00007FFF650A045C mscorlib_ni!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x7c
StackTraceString: <none>
HResult: 80131501
There are nested exceptions on this thread. Run with -nested for details
Per output of previous command, I look for nested exceptions
0:027> !PrintException -nested /d 0000002552364ae8
Exception object: 0000002552364ae8
Exception type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
InnerException: <none>
StackTrace (generated):
SP IP Function
000000266C1BEF00 00007FFF5BCA63A5 System_Web_ni!System.Web.HttpApplication+AsyncEventExecutionStep.OnAsyncEventCompletion(System.IAsyncResult)+0x55
000000266C1BEF60 00007FFF5CB3586C System_ServiceModel_Internals_ni!System.Runtime.AsyncResult.Complete(Boolean)+0xec
StackTraceString: <none>
HResult: 80004003
Nested exception -------------------------------------------------------------
Exception object: 0000002552364d38
Exception type: System.Runtime.CallbackException
Message: Async Callback threw an exception.
InnerException: System.NullReferenceException, Use !PrintException 0000002552364ae8 to see more.
StackTrace (generated):
SP IP Function
000000266C1BCC30 00007FFF5CB359B5 System_ServiceModel_Internals_ni!System.Runtime.AsyncResult.Complete(Boolean)+0x235
000000266C1BEFD0 00007FFF570DA192 System_ServiceModel_Activation_ni!System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(System.Object)+0x92
000000266C1BF020 00007FFF5CB38B63 System_ServiceModel_Internals_ni!System.Runtime.IOThreadScheduler+ScheduledOverlapped.IOCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x53
000000266C1BF090 00007FFF5CB38AFB System_ServiceModel_Internals_ni!System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x6b
000000266C1BF0F0 00007FFF650A045C mscorlib_ni!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x7c
StackTraceString: <none>
HResult: 80131501
My next step is to find the stack trace for that NullReferenceException
0:027> !do 0000002552364ae8
Name: System.NullReferenceException
MethodTable: 00007fff652865a0
EEClass: 00007fff64c3f180
Size: 160(0xa0) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
Fields:
MT Field Offset Type VT Attr Value Name
00007fff65276948 400028e 8 System.String 0 instance 000000244f54d350 _className
00007fff6528f6b8 400028f 10 ...ection.MethodBase 0 instance 0000002552366f58 _exceptionMethod
00007fff65276948 4000290 18 System.String 0 instance 0000000000000000 _exceptionMethodString
00007fff65276948 4000291 20 System.String 0 instance 000000244bf27668 _message
00007fff65286788 4000292 28 ...tions.IDictionary 0 instance 00000025523751a8 _data
00007fff65276b78 4000293 30 System.Exception 0 instance 0000000000000000 _innerException
00007fff65276948 4000294 38 System.String 0 instance 0000000000000000 _helpURL
00007fff65276f28 4000295 40 System.Object 0 instance 0000002552364cc0 _stackTrace
00007fff65276f28 4000296 48 System.Object 0 instance 0000000000000000 _watsonBuckets
00007fff65276948 4000297 50 System.String 0 instance 0000000000000000 _stackTraceString
00007fff65276948 4000298 58 System.String 0 instance 0000000000000000 _remoteStackTraceString
00007fff65279288 4000299 88 System.Int32 1 instance 0 _remoteStackIndex
00007fff65276f28 400029a 60 System.Object 0 instance 0000000000000000 _dynamicMethods
00007fff65279288 400029b 8c System.Int32 1 instance -2147467261 _HResult
00007fff65276948 400029c 68 System.String 0 instance 000000255242ce60 _source
00007fff6528fbc0 400029d 78 System.IntPtr 1 instance 0 _xptrs
00007fff65279288 400029e 90 System.Int32 1 instance -532462766 _xcode
00007fff65250340 400029f 80 System.UIntPtr 1 instance 7fff5bca63a4 _ipForWatsonBuckets
00007fff65265538 40002a0 70 ...ializationManager 0 instance 0000002552364c40 _safeSerializationManager
00007fff65276f28 400028d b8 System.Object 0 shared static s_EDILock
>> Domain:Value 000000244acba390:NotInit 000000267072bd80:NotInit <<
Here I attempt to get the stack trace of NullReferenceException. This looks like a SByte array.
0:027> !do 0000002552364cc0
Name: System.SByte[]
MethodTable: 00007fff65202b20
EEClass: 00007fff64c34f60
Size: 120(0x78) bytes
Array: Rank 1, Number of elements 96, Type SByte (Print Array)
Content: ........0Qkv&....c.[.......l&...x..[............kX.\....`..l&...`..\............................
Fields:
None
My expectation is to get a stacktrace/details of what method/line of code/object is responsible for causing this null reference. I also attempt to dump the contents of SByte array but that doesn't provide me any useful information. Any suggestions on how can I get more information about this NullReferenceException?
First of all, I think that !pe -nested already shows the call stack that you're looking for:
0:027> !PrintException -nested /d 0000002552364ae8
[...]
StackTrace (generated):
SP IP Function
000000266C1BEF00 00007FFF5BCA63A5 System_Web_ni!System.Web.HttpApplication+AsyncEventExecutionStep.OnAsyncEventCompletion(System.IAsyncResult)+0x55
000000266C1BEF60 00007FFF5CB3586C System_ServiceModel_Internals_ni!System.Runtime.AsyncResult.Complete(Boolean)+0xec
[...]
Next, a stack trace is exactly what you see in that SByte[]: it's just a bunch of numbers.
Those number do get their meaning only together with PDB files. The PDB file contains the information to turn numbers into names.
Have a look at the values in the SP column and IP column. They are:
000000266C1BEF00
000000266C1BEF60
00007FFF5BCA63A5
00007FFF5CB3586C
And now, use a converter that converts those values into text:
You'll find that the printable characters resssemble those of the output shown in SByte[] by WinDbg:
0:027> !do 0000002552364cc0
[...]
Content: ........0Qkv&....c.[.......l&...x..[............kX.\....`..l&...`..\............................
The order may be different due to little/big-endianness.

NetBeans 7.4 BUILD FAILED (exit value 2, total time: 38s)

everyone. I am learning C++ and running basic "Hello, world!" codes.
I am using NetBeans with the minGW compiler.
The problem is every time I build or attempt to run the project, I get an error:
BUILD FAILED (exit value 2, total time: 38s)
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Namen/Documents/NetBeansProjects/CppApplication_1'
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_1.exe
make.exe[2]: Entering directory `/c/Users/Namen/Documents/NetBeansProjects/CppApplication_1'
mkdir -p build/Debug/MinGW-Windows
0 [main] mkdir 5908 open_stackdumpfile: Dumping stack trace to mkdir.exe.stackdump
make.exe[2]: *** [build/Debug/MinGW-Windows/main.o] Error 5
make.exe[2]: Leaving directory `/c/Users/Namen/Documents/NetBeansProjects/CppApplication_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Namen/Documents/NetBeansProjects/CppApplication_1'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 38s)
What's odd is that I could keep clicking run, and sometimes the project will build and run successfully. Other times it will not...as if it's broken. It's actually not running at all now due to the error, however.
Apparently this is a common problem, yet I haven't been able to successfully use the solutions I've found.
I have the latest version of NetBeans as I've heard that this was a bug. v7.4
I believe I have the proper path in my environment variable: C:\MinGW\msys\1.0\bin\; C:\MinGW\bin
If it helps, this is my code:
#include <iostream>
#include <string>
using namespace std;
int main(){
string Question = "What is your name?\n";
cout << Question;
string Answer;
getline(cin, Answer + " : " + Answer);
cout << Answer + "\n";
}
The code is given us, not even compile.
to time variable Answer in the function is wrong.
getline(cin, Answer + " : " + Answer);
c++
1
istream& getline (istream& is, string& str, char delim);
2
istream& getline (istream& is, string& str);
to have the input in one line, let the new line characters away.
...
string Question = "What is your name? : ";
cout << Question;
string Answer;
getline(cin, Answer);
cout << Answer + "\n";
return 0;
...