# \[BUG\] IsValidLowLevel() entails access violation

**URL:** <https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403>\
**Category:** Getting Started & Setup\
**Tags:** access-violation, unreal-engine, crash, bug-report, feedback, question\
**Created:** [February 9, 2017, 12:38pm UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403 "2017-02-09T12:38:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![broly](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@broly](https://forums.unrealengine.com/u/broly)\
**Post date:** [February 9, 2017, 12:38pm UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403/1 "2017-02-09T12:38:17Z")

</div>

Error:

> Unhandled exception thrown: read access violation.
> 
> this was 0xFFFFFFFFFFFFFFEF.
> 
> If there is a handler for this exception, the program may be safely continued.

In `UObjectBase::IsValidLowLevel()` at 255 line ( `if( !ClassPrivate )` )

Callstack: [http://pastebin.com/Ge1nAx8v](http://pastebin.com/Ge1nAx8v)

This will occurred after response of request in editor but after stopping play mode.

---

<div class="post-metadata">

**Author:** ![project.gheist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@project.gheist](https://forums.unrealengine.com/u/project.gheist)\
**Post date:** [February 9, 2017, 12:51pm UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403/2 "2017-02-09T12:51:31Z")

</div>

Could you please paste the code where it goes wrong in `UDBManager`? Most likely you are accessing the object directly without doing a null check;

```
Object && Object->IsValidLowLevel()
```

---

<div class="post-metadata">

**Author:** ![broly](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@broly](https://forums.unrealengine.com/u/broly)\
**Post date:** [February 9, 2017, 1:23pm UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403/3 "2017-02-09T13:23:02Z")

</div>

But in IsValidLowLevel already there is NULL-check (line 250 - `if( this == nullptr )` )

 ![125574-db_chk.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/5/0d5408e6988299c6691e3f1e24ebde06cdc7ab01.png)

---

<div class="post-metadata">

**Author:** ![project.gheist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@project.gheist](https://forums.unrealengine.com/u/project.gheist)\
**Post date:** [February 9, 2017, 1:34pm UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403/4 "2017-02-09T13:34:53Z")

</div>

If the pointer memory is already null then it wouldn’t be able to find the function. That check might be there to handle singletons.

---

<div class="post-metadata">

**Author:** ![broly](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@broly](https://forums.unrealengine.com/u/broly)\
**Post date:** [February 15, 2017, 9:00am UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403/5 "2017-02-15T09:00:22Z")

</div>

Function can be called even if object is null.

~ Type of pointer is known, code is known too. So function can be called. You can check it with step-in in VS.

---

<div class="post-metadata">

**Author:** ![Muzaheed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/muzaheed/32/778940_2.png) [@Muzaheed](https://forums.unrealengine.com/u/Muzaheed)\
**Post date:** [February 15, 2017, 12:10pm UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403/6 "2017-02-15T12:10:23Z")

</div>

if( this == nullptr )

by this it means that you are trying to check a object itself inside it’s own body.  
just imagine, what will happen if the object already has been deleted.

try this :

```
if(dbdatacontainer != nullptr))// dbdatacontainer.IsValid()
 {
   if(SomeObject->IsValidLowLevel()) //if not included, game sometimes crashed
  {
     //Actually do stuff with SomeObject
  }
 }

```

better explaintation:

> **[What's the difference between using TWeakObjectPtr or using UObject\*](https://forums.unrealengine.com/questions/48818/whats-the-difference-between-using-tweakobjectptr.html)**
>
> What's the difference between using TWeakObjectPtr WeakPointer; WeakPointer.IsValid(); or using UObject \*Obj; Obj-\>IsValidLowLevel();

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a3219dab1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a3219dab1](https://forums.unrealengine.com/u/anonymous_user_a3219dab1)\
**Post date:** [November 3, 2020, 3:14pm UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403/7 "2020-11-03T15:14:20Z")

</div>

> if( this == nullptr )
> 
> by this it means that you are trying  
> to check a object itself inside it’s  
> own body. just imagine, what will  
> happen if the object already has been  
> deleted.

This is engine code. It is not crashing on the line:

```
 if( this == nullptr )

```

It crashes a few lines below on:

```
if( !ClassPrivate )

```

How can I change it to avoid the crashing? I have the [same problem](https://answers.unrealengine.com/questions/993430/view.html) in a blueprint only project…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3f20b0d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3f20b0d5](https://forums.unrealengine.com/u/anonymous_user_3f20b0d5)\
**Post date:** [November 3, 2020, 11:51pm UTC](https://forums.unrealengine.com/t/bug-isvalidlowlevel-entails-access-violation/384403/8 "2020-11-03T23:51:54Z")

</div>

I would suggest creating a new question for your case and providing some more info about your setup and the object that causes the crash.  
The crash described here was most likely caused by a dangling ptr. I don’t know how this could happen in a blueprint project though
