Windows error 0x00000036, 54

Detailed Error Information

NETWORK_BUSY[1]

MessageThe network is busy.
Declared inwinerror.h

This appears to be a raw Win32 error. More information may be available in error 0x80070036.

DEVICE_REFERENCE_COUNT_NOT_ZERO[2]

This is a Blue Screen of Death stop code. More information is available in the Knowledge Base article Bug Check 0x36: DEVICE_REFERENCE_COUNT_NOT_ZERO.

HRESULT analysis[3]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.
FlagsSeveritySuccess

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode0 (0x000)
NameFACILITY_NULL[3][1]
DescriptionThe default facility code.[3][1]
Error Code54 (0x0036)

Possible solutions

9

Unhandled Exception in Rad Studio Debugger Thread

c++
exception
dll
c++builder
c++builder-2010

I solved the above mentioned problem by using a modified version of the PatchINT3 workaround, which was published in 2007 for BDS 2006:

procedure PatchINT3;
const
  INT3: Byte = $CC;
  NOP: Byte = $90;
var
  NTDLL: THandle;
  BytesWritten: DWORD;
  Address: PByte;
begin
  if Win32Platform <> VER_PLATFORM_WIN32_NT then
    Exit;
  NTDLL := GetModuleHandle('NTDLL.DLL');
  if NTDLL = 0 then
    Exit;
  Address := GetProcAddress(NTDLL, 'RtlQueryCriticalSectionOwner');
  if Address = nil then
    Exit;
  Inc(Address, $E8);
  try
    if Address^ <> INT3 then
      Exit;

    if WriteProcessMemory(GetCurrentProcess, Address, @NOP, 1, BytesWritten)
      and (BytesWritten = 1) then
      FlushInstructionCache(GetCurrentProcess, Address, 1);
  except
    //Do not panic if you see an EAccessViolation here, it is perfectly harmless!
    on EAccessViolation do
      ;
  else
    raise;
  end;
end;

Call this routine once after you have loaded the DLL in your thread. The patch fixes a user breakpoint in ntdll.dll version 6.1.7601.17725 and changes it to a NOP.

If there is no user breakpoint (INT3 (=$CC) opcode) at the expected address, the patch routine does nothing and exits.

Hope that helps,
Andreas

Footnote
The original source of PatchINT3 can be found here:
http://coding.derkeiler.com/Archive/Delphi/borland.public.delphi.non-technical/2007-01/msg04431.html

Footnote2
The same function in C++:

void PatchINT3()
{
   unsigned char INT3   = 0xCC;
   unsigned char NOP    = 0x90;

   if (Win32Platform != VER_PLATFORM_WIN32_NT)
   {
      return;
   }

   HMODULE ntdll = GetModuleHandle(L"NTDLL.DLL");
   if (ntdll == NULL)
   {
      return;
   }

   unsigned char *address = (unsigned char*)GetProcAddress(ntdll,
      "RtlQueryCriticalSectionOwner");
   if (address == NULL)
   {
      return;
   }

   address += 0xE8;

   try
   {
      if (*address != INT3)
      {
         return;
      }

      unsigned long bytes_written = 0;
      if (WriteProcessMemory(GetCurrentProcess(), address, &NOP, 1,
         &bytes_written) && (bytes_written == 1))
      {
         FlushInstructionCache(GetCurrentProcess, address, 1);
      }
   }
   catch (EAccessViolation &e)
   {
      //Do not panic if you see an EAccessViolation
      //here, it is perfectly harmless!
   }
   catch(...)
   {
      throw;
   }
}
answered on Stack Overflow Sep 17, 2012 by Andreas Bormann • edited Jun 22, 2013 by truthseeker
3

How to catch system.xml.xmlexception

c#
.net
visual-studio
windows-phone-8

There must be some problem with the XML provided by e.Result. Details about this might be in the XmlException message but you only included part of the stack trace.

You will have to figure out what the problem is in the first place and you will probably have to add some logging of what happens BEFORE you call XDocument.Load if you are unable to reproduce the problem on your own system.

You can also add an exception handler but that does not fix the problem but makes your app more robust and allows it to provide a slightly better user interface if something unexpected happens. What you have done is adding an exception handler around the calls to the WebClient methods but you are not catching exceptions thrown by the handler for client.OpenReadCompleted. This is an asynchronous callback that will execute on a threadpool thread, and any uncaught exceptions thrown by this thread will terminate your app.

You need to handle the exception with code like this:

client.OpenReadCompleted += (sender, e) =>
{
    try
    {
        if (e.Error != null)
        {
            return;
        }
        else
            ....
    }
    catch (Exception ex)
    {
        .... log and report the exception to allow the app to continue
    }
 }

And if you decide to add logging to your app it will be very useful to you if you log the entire text returned by ex.ToString(). This will give you a good textual description of the problem including inner exceptions and full stack traces.

answered on Stack Overflow Jul 3, 2014 by Martin Liversage • edited Jul 3, 2014 by Martin Liversage
2

App crashes in iOS 5 and works fine in iOS 6 and 7

ios
iphone
objective-c
ipad
ios5

It is very hard (if not impossible) to tell from your log what exactly is causing the issue but we can tell what sort of error it is. It is throwing a EXC_BAD_ACCESS exception which is basically an error in your memory management.

The best way to debug this is to turn zombie tools (NSZombieEnabled) on. This is located in xcode >> Product >> Scheme >> Edit Scheme >> Diagnostics and check the check box Enable Zombie Objects.

What EXC_BAD_ACCESS is saying is that you did something that caused a pointer to be de-referenced and that memory location isn’t inside one of the chunks of memory assigned to your program.

This could be because

  1. The pointer used to point to memory that was ok, but its chunk was deallocated.
  2. The pointer is corrupt.

In simple terms you are trying to access something that has been deallocated from memory. Unfortunately we don't know where this is from what you have posted. So for you, you need to be doing so debugging to replicate this issue. That is all you we can't help with that.

answered on Stack Overflow Feb 4, 2014 by Popeye
2

tcpdump -dd output doesn't match pcap_compile_nopcap

linux
pcap
libpcap
packet-capture

Probably because the tcpdump on your system is built with an older version of libpcap than your program. The tcpdump on your system is probably using a libpcap without this change:

commit 58275c05a5cf9c3512bcbb1192ff351d32ccccbd
Author: Guy Harris <guy@alum.mit.edu>
Date:   Thu Sep 1 22:21:45 2011 -0700

    Handle some amount of IPv6 fragmentation.

    If we're checking for a particular protocol running on top of IPv6, and
    we're not doing full protocol-chain chasing for all "running on top of
    IPv6" tests, at least check for a fragmentation header before the header
    for the protocol.

and your program is probably using a libpcap with that change. That change went into libpcap somewhere in the libpcap 1.3.x timeframe.

answered on Stack Overflow Nov 22, 2012 by (unknown user)
2

How to catch system.xml.xmlexception

c#
.net
visual-studio
windows-phone-8

Normally is good practice to do catch(Exception), in your case catch(system.xml.XmlException). However put a try-catch inside your else block because this is an asynchronous event and if occurs some exception inside that exception will be not catched:

try 
{
    WebClient client = new WebClient();
    client.OpenReadAsync(new Uri(Url, UriKind.Absolute));
    client.OpenReadCompleted += (sender, e) =>
    {
        if (e.Error != null)
        {
            return;
        }
        else
        {
           try
           {
              System.Xml.Linq.XDocument xmlDoc = XDocument.Load(e.Result);
              IEnumerable<string> strTestURL = from node in xmlDoc.Descendants("url") select node.Value;
              IEnumerable<string> strTestDescription = from node in xmlDoc.Descendants("copyright") select node.Value;
              IEnumerable<string> strTestDate = from node in xmlDoc.Descendants("enddate") select node.Value;
              string strURL = "http://www.bing.com" + strTestURL.First();
              strURL = strURL.Replace("1366x768", "800x480");
              Global.URL1 = strURL;
              Global.URLs[i] = strURL;
              Global.Descriptions[i] = strTestDescription.First();
              Uri Uri = new Uri(Global.URLs[i], UriKind.Absolute);
              Imageallgemein.Source = new BitmapImage(Uri);
              Imageallgemein.Tap += new EventHandler<System.Windows.Input.GestureEventArgs>(onImageTap);
              Imageallgemein.Hold += new EventHandler<System.Windows.Input.GestureEventArgs>(onImageTap);
              Description.Text = Global.Descriptions[i];
              string Year = strTestDate.First().Substring(0, 4);
              string Month = strTestDate.First().Substring(4, 2);
              string Day = strTestDate.First().Substring(6, 2);
              Date.Text = Day + "." + Month + "." + Year;
           }
           catch (XmlException)
           {
                MessageBox.Show(AppResources.Abort, AppResources.msgBoxUrlLoadError, MessageBoxButton.OK);
           }
        }
    };
}
catch (Exception)
{
    MessageBox.Show(AppResources.Abort, AppResources.msgBoxUrlLoadError, MessageBoxButton.OK);
}
answered on Stack Overflow Jul 3, 2014 by Ninita
1

Debugging C++ Native Windows Phone 8 app

c++
debugging
exception
c++11
exception-handling

I'm not sure that there are any tools that will help you here, but I could be wrong.

I think your best choice is to create a sample application that loads your DLL. Once it's loaded, acquire the address it was loaded at, offset the address by 0x0001556C, and use the functions provided by dbghelp (particularly SymFromAddr) to get the symbol matching the address.

You can retrieve the base address of the DLL either by breaking into the debugger and checking your Modules window, or by calling GetModuleHandle with your DLL's name and treating the return value as the base address.

answered on Stack Overflow Oct 29, 2013 by Collin Dauphinee
1

Inneractive Ads cause a lot of App crashes (Windows Phone)

windows-phone-7
windows-phone-8
windows-phone
ads

First, contact InnerActive telling them to fix their software. It's their responsibility.

Meanwhile, if you know how to reproduce the problem, you can try following. Subscribe for all unhandled exceptions (start with Application.UnhandledException, also there're AppDomain.UnhandledException and TaskScheduler.UnobservedTaskException), in the handler search for “Inneractive.Ad.InneractiveAdControl” in the Exception.StackTrace, if found — ignore the exception, and optionally hide or reload the inneractive banner.

answered on Stack Overflow Jan 22, 2014 by Soonts
1

InvalidOperationException with MediaLibrary pictures

c#
asynchronous
windows-phone-8
invalidoperationexception

Not really one answer but if the error is one the first foreach and the try is on the second it's not catching the exception put the try outside the

try
{
    var root = new MediaLibrary().RootPictureAlbum;
answered on Stack Overflow May 8, 2013 by Pedro.The.Kid • edited May 8, 2013 by Pedro.The.Kid
0

Chartboost interstitial sometimes crashes when dismissed

android
chartboost

Check your AndroidManifest.xml, Have you added this. android:configChanges="keyboardHidden|orientation|screenSize"

It's look like this :

<activity android:name="com.chartboost.sdk.CBImpressionActivity"
          android:excludeFromRecents="true"
          android:hardwareAccelerated="true"            
          android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"   
          android:configChanges="keyboardHidden|orientation|screenSize" />
answered on Stack Overflow Mar 6, 2017 by Aryan
0

Decoding Stack Trace error

windows-phone-8

It looks to be related to your creation of a new SpeechRecognizer in the Loaded event of the MainPage.

answered on Stack Overflow Sep 26, 2013 by Matt Lacey
0

Huge amount of mystic crashes of WP8 app

windows-phone-8

Are you sure you're handling the Disconnect callback accordingly ? As in do you clear and reload all your resources after a Surface::Diconnect ? If you do not handle Disconnect at all, your app will crash on resume. If you do handle it and you're not doing it the proper way your app will start using more and more memory and will crash if it goes past 170MB or so.

answered on Stack Overflow Jan 28, 2015 by RelativeGames
0

Unhandled Exception in Rad Studio Debugger Thread

c++
exception
dll
c++builder
c++builder-2010

Just an idea...

Perhaps you need to close in on the crashing thread. The state that you are observing seems to be a bit after the actual error.

First, your stack traces seems incomplete to me. What is the base root of the stack of that thread? What was the origin of that thread?

And, in the VS debugger there is the possibility to break on exceptions, (Debug->Exceptions...->[Add]). Then all threads will freeze at the moment the exception occurs. I dunno about RAD, but the trick to do it programatically seems to be WaitForDebugEvent().

I could be wrong but I think there is a fair chance that the bug is in the debugger not your code. In that case an uggly workaround is IMHO fully forgivable. Good luck!

answered on Stack Overflow Aug 4, 2011 by Adam
0

Unhandled Exception in Rad Studio Debugger Thread

c++
exception
dll
c++builder
c++builder-2010

I cannot answer this because I cannot see the code...

But...

1) In Borland C++ at least with C++ from BDS there can be a provable problem with the realloc function in multithreaded library. Is your C++ code using realloc?

2) The stack you are showing is more than likely being called as a result of your code actually hitting a "CALL BAD_ADRESS" and that can happen as a result of a bug in your own code. In other words, in the DLL you load, there is likely a function that is doing something that is overwriting the executable code in your program with junk, and then when the now junk section runs, it crashes.

Another way is if something in the C++ dll is modifying the stack below where it runs, and then your code is hitting that later.

3) Check out the CPU flags settings for your DLL. Borland libraries sometimes use conflicting CPU flags upon entry and you might need to save and restore before calling into the DLL. For example if you call a VST plugin made with C++ from Delphi and do not set the flags properly, you can get subsequent divide by zero errors from the VST plugin which was compiled with that exception turned off.

answered on Stack Overflow Sep 12, 2012 by (unknown user)
0

Unhandled Exception in Rad Studio Debugger Thread

c++
exception
dll
c++builder
c++builder-2010

We had the same issue today. In our case the crash happens if having a breakpoint after call to TOpenDialog->Execute() (which is using dialog from shell32.dll I think) (Windows 7 x64, C++ Builder XE2)

After uninstalling iCloud (v2.1.0.39), the issue was resoved.

Unfortunately we are still looking into similar issue our customers are having some times with our release product under Windows Vista. After selecting the file using TOpenDialog, the application crashes in gdiplus.dll with Access violation, removing the iCloud seems to also resolve the issue.

answered on Stack Overflow Jan 25, 2013 by Niki
0

InvalidOperationException with MediaLibrary pictures

c#
asynchronous
windows-phone-8
invalidoperationexception

I had the same issue. Same crash for a small number of users. It's a very interesting problem and I believe it is with WP8 and not with your code. Finally I managed to repro it on a device but only occures if the debugger is detached. Two things you need to make sure.

  1. album.pictures is not null
  2. Instead if enumerating the album.Pictures try something like album.Pictures.OrderBy(x=>x.Date);

I know it looks strange but this workaround works.

answered on Stack Overflow Nov 14, 2013 by Andras Csehi
0

InvalidOperationException with MediaLibrary pictures

c#
asynchronous
windows-phone-8
invalidoperationexception

I came across this exception today in my WP 8.0 app. The user gets several thumbnail images of his "Camera Roll" media library in a custom control. When he selects one of these thumbnail i try to get the real image via "GetImage()". The thumbnails worked fine, but GetImage() threw the exception. Apparently (that's my guess) some of the picture were corrupt or damaged. It never worked with them but other pictures had no problems.

So keep in mind that it might also be a damaged or corrupt file.

answered on Stack Overflow Oct 9, 2015 by Khrimm
0

Windows phone crash device.Sensors.ni.dll

c#
crash
windows-phone-8.1

Those crashes are probably from devices that do not have a compass (yes, there are devices like this out there).

You should check for the compass with Compass.IsSupported and only use it when it returns true.

answered on Stack Overflow Apr 17, 2015 by Igor Kulman
0

Strange stack trace on Windows phone 8

c#
windows-phone-8
stack-trace

Barring a bug in the async-await machinery (which is a vanishingly-small-but-nonzero possibility), there are four places in your method that could conceivably result in a NullReferenceException:

  • locationTextBox.Text
  • searchString.Length
  • noLocationsFoundText.Visibility
  • routeLocationsList.ItemsSource

Are you certain that none of these are null? Depending on how the async framework is handling error reporting, I also wouldn't rule out something blowing up in await GetGeocodeAsync, though the stack trace suggests otherwise.

Incidentally, why are you initializing a List<GeocodeResponse> and immediately overwriting it? It's not the problem here, but looks redundant.

To help you debug, as @devha suggests you can set your debugger to break as soon as a particular exception is thrown. In the 'Debug' menu, select 'Exceptions', and under CLR Exceptions check NullReferenceException. Now, whenever one of those is thrown while you are debugging, Visual Studio will immediately pause and show you the offending line.

answered on Stack Overflow Nov 19, 2013 by Ben

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference2
  3. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0