# \[solved\] Castle Particle Emitter rise Emitter Exception: 'No mesh found in this model'

**URL:** <https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882>\
**Category:** Bugs\
**Created:** [April 28, 2025, 12:49pm UTC](https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882 "2025-04-28T12:49:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Recongalina](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/recongalina/32/1530_2.png) [@Recongalina](https://forum.castle-engine.io/u/Recongalina)\
**Post date:** [April 28, 2025, 12:49pm UTC](https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882/1 "2025-04-28T12:49:09Z")

</div>

Hello!  
After a recent or little earlier update, I found that [Castle Particle Emitter](https://github.com/Kagamma/cge-3d-particle-emitter) started rise an exception ‘No mesh found in this model’:

> <https://github.com/Kagamma/cge-3d-particle-emitter/blob/f0a0c6ef8fc3fde953a89c1a1d599450b0da42af/src/CastleParticleEmitter.pas#L2205>

For my project I made a temporary fix:

> <https://github.com/SerufuYua/project_nya/blob/60292b8cb89a000b7b64d2ef50ffd2333398ad5c/code/particle/CastleParticleEmitter.pas#L2205>

Еhis exception also rises in [the demo project gallery](https://github.com/Kagamma/cge-3d-particle-emitter/tree/master/demos/gallery)

I compile projects using Lazarus and Castle Editor under Windows. In both cases the Exception appears.

---

<div class="post-metadata">

**Author:** ![kagamma](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/kagamma/32/226_2.png) [@kagamma](https://forum.castle-engine.io/u/kagamma)\
**Post date:** [April 28, 2025, 2:26pm UTC](https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882/2 "2025-04-28T14:26:12Z")

</div>

I just update CGE to latest commit and I don’t have this issue after compiling the `gallery` demo. I suspect your version of CGE has a buggy implementation of `URIFileExists()` so maybe try to update your CGE to latest commit and see if the issue still exists.

---

<div class="post-metadata">

**Author:** ![Recongalina](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/recongalina/32/1530_2.png) [@Recongalina](https://forum.castle-engine.io/u/Recongalina)\
**Post date:** [April 29, 2025, 7:40am UTC](https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882/3 "2025-04-29T07:40:14Z")

</div>

I updated CGE from [Latest release](https://github.com/castle-engine/castle-engine/releases/tag/snapshot) and Castle Particle Emitter but nothing changed for me.  
Maybe it’s because I’m compiling to 32-bit… I’ll check 64-bit too.

CGE:

 ![image](https://forum.castle-engine.io/uploads/default/original/2X/f/fb95fb0cd43db0f24b0954c4c3940aa835929562.png)

Lazarus:

 ![image](https://forum.castle-engine.io/uploads/default/original/2X/a/a5f20a3c8dd0670b1ec85d52c53cc5203b8de385.png)

---

<div class="post-metadata">

**Author:** ![Recongalina](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/recongalina/32/1530_2.png) [@Recongalina](https://forum.castle-engine.io/u/Recongalina)\
**Post date:** [April 29, 2025, 8:14am UTC](https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882/4 "2025-04-29T08:14:19Z")

</div>

No, in 64-bit I have same issue… Ah I think I understand! You told “update CGE to **latest commit** ”. I’m using release ver of CGE. So looks like it mean, that I need just to wait next release. Ok.

---

<div class="post-metadata">

**Author:** ![kagamma](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/kagamma/32/226_2.png) [@kagamma](https://forum.castle-engine.io/u/kagamma)\
**Post date:** [April 29, 2025, 11:59am UTC](https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882/5 "2025-04-29T11:59:03Z")

</div>

Thanks I can reproduce the issue now.  
I made a small change to the source code to avoid the issue, please redownload `CastleParticleEmitter.pas` and try it again.

---

<div class="post-metadata">

**Author:** ![Recongalina](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/recongalina/32/1530_2.png) [@Recongalina](https://forum.castle-engine.io/u/Recongalina)\
**Post date:** [April 29, 2025, 12:45pm UTC](https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882/6 "2025-04-29T12:45:03Z")

</div>

Thank You! It working

---

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [April 29, 2025, 11:24pm UTC](https://forum.castle-engine.io/t/solved-castle-particle-emitter-rise-emitter-exception-no-mesh-found-in-this-model/1882/7 "2025-04-29T23:24:05Z")

</div>

From what I can see, this is something I should ultimately fix in CGE too.

History: Some time ago, around the beginning of March, when making [zip class](https://castle-engine.io/wp/2025/03/09/new-class-for-zip-handling-tcastlezip-progress-on-new-pretty-wireframe-approach-woff-fonts-support-lod-usage-demo/), I changed how [UriExists](https://castle-engine.io/apidoc/html/CastleUriUtils.html#UriExists-String-) and [UriFileExists](https://castle-engine.io/apidoc/html/CastleUriUtils.html#UriFileExists-String-) are implemented. I did changes to enable custom URL protocols to register custom callback to tell “does given URL exist”.

Looks like, along the way, I also changed the `UriExists('')` and `UriFileExists('')` answers. By mistake, `UriExists('')` became `ueUnknown` (because it has no recognized protocol…) and `UriFileExists('')` became `true` (because it _may_ exist as a file since it’s `ueUnknown`).

Fixed now, in [Fix UriExists and UriFileExists for '' · castle-engine/castle-engine@00a253a · GitHub](https://github.com/castle-engine/castle-engine/commit/00a253a208917ed852d7ab0f0c9179d7ee0c2c26) . `UriExists('')` is now `ueNotExists` and `UriFileExists('')` is `false`.
