# New M4 mini crashes Xojo 2024.X and 2025.1

**URL:** <https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206>\
**Category:** General\
**Created:** [May 1, 2025, 2:10pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206 "2025-05-01T14:10:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl\_Gibson](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@Carl\_Gibson](https://forum.xojo.com/u/Carl_Gibson)\
**Post date:** [May 1, 2025, 2:10pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/1 "2025-05-01T14:10:13Z")

</div>

Greetings, Have a new MacMini M4 running the latest MacOS. My project won’t run. It gives a nil object exception error. The code that seems to crash is related to code that puts desktopOvals within a Set using New onto the desktop. All works well on my older 2017 MacMini. The application and project are on the desktop not on an external drive. The program compiles, but of course it crashes with the exception.

Any thoughts?  
Thanks

---

<div class="post-metadata">

**Author:** ![PhilippeP](https://forum.xojo.com/user_avatar/forum.xojo.com/philippep/32/5348_2.png) [@PhilippeP](https://forum.xojo.com/u/PhilippeP)\
**Post date:** [May 1, 2025, 2:25pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/2 "2025-05-01T14:25:13Z")

</div>

> [@Carl\_Gibson](#):
>
> Any thoughts?

it’s not from the mac mini m4 , maybe intel only code ?i have the same everything works great 🙂

---

<div class="post-metadata">

**Author:** ![Anthony\_Dellos](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_dellos/32/208_2.png) [@Anthony\_Dellos](https://forum.xojo.com/u/Anthony_Dellos)\
**Post date:** [May 1, 2025, 3:07pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/3 "2025-05-01T15:07:54Z")

</div>

Same as Phillipe. I have a new M4 Mini and have no issues with:

- Xojo 2019r3.2
- Xojo 2024r4.1
- Xojo 2025r1.1

It may be something with your project; it may be something with MacOS “protecting” you. (in my opinion it’s more likely the latter)

If you search the forum, you should find some posts about MacOS quarantine “hijinks” causing issues with using Xojo.

Example:

> [@Plug-ins not loading after upgrading to Xojo2025R1](https://forum.xojo.com/t/plug-ins-not-loading-after-upgrading-to-xojo2025r1/84739/6):
>
> @John_Allen make sure the 2015r1 ide isn’t quarantined. If it is, you can run xattr -cr \<path/to/ide\> To fix that.

Anthony

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [May 1, 2025, 4:21pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/4 "2025-05-01T16:21:20Z")

</div>

if you run your project under debug, it should pinpoint the nil exception exactly where it occurs ?

---

<div class="post-metadata">

**Author:** ![Scott\_C](https://forum.xojo.com/user_avatar/forum.xojo.com/scott_c/32/19612_2.png) [@Scott\_C](https://forum.xojo.com/u/Scott_C)\
**Post date:** [May 1, 2025, 5:04pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/5 "2025-05-01T17:04:35Z")

</div>

> [@Carl\_Gibson](#):
>
> All works well on my older 2017 MacMini.

Is your Build Architecture set to “x86 64-bit”? If so, try “Universal”.

---

<div class="post-metadata">

**Author:** ![PhilippeP](https://forum.xojo.com/user_avatar/forum.xojo.com/philippep/32/5348_2.png) [@PhilippeP](https://forum.xojo.com/u/PhilippeP)\
**Post date:** [May 1, 2025, 6:44pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/6 "2025-05-01T18:44:39Z")

</div>

PS : and i think the Mac mini M4 is the best computer made by human kind  
40 W  
🤩  
some use it as cluster for AI

you can even replace internal ssd with 2GB

---

<div class="post-metadata">

**Author:** ![Gilles\_Plante](https://forum.xojo.com/user_avatar/forum.xojo.com/gilles_plante/32/667_2.png) [@Gilles\_Plante](https://forum.xojo.com/u/Gilles_Plante)\
**Post date:** [May 1, 2025, 11:57pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/7 "2025-05-01T23:57:20Z")

</div>

> [@PhilippeP](#):
>
> you can even replace internal ssd with 2GB

2GB, whew that’s a large SSD 🫤.

---

<div class="post-metadata">

**Author:** ![Carl\_Gibson](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@Carl\_Gibson](https://forum.xojo.com/u/Carl_Gibson)\
**Post date:** [May 2, 2025, 12:57pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/8 "2025-05-02T12:57:50Z")

</div>

Greetings, Thanks for the advice, however, what is baffling is that the code works on the old machine but not on the new MacMini. How can this be?

I have copied the program on a sim and pasted to the new machine. I copied with Migration Assistant. Same results. I thought I was using a do loop improperly and went old school with a goto: Same results. The beachball of death always invades. I am not able to derive the exact variable exception.

Thanks for your ideas.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [May 2, 2025, 1:01pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/9 "2025-05-02T13:01:50Z")

</div>

> [@Jean-Yves\_Pochez](#):
>
> if you run your project under debug, it should pinpoint the nil exception exactly where it occurs ?

have-you tried that advice ?

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [May 2, 2025, 1:04pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/10 "2025-05-02T13:04:17Z")

</div>

> [@Carl\_Gibson](#):
>
> The beachball of death always invades.

The beachball of death is not an exception. Well, it might lead to a StackoverflowException. Do the computers have different CPUs like Intel vs. ARM? Oh, wait, your MacMini from 2017 can only be Intel. So yes, this is rare but possible. And you still haven’t posted any code.

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [May 2, 2025, 1:05pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/11 "2025-05-02T13:05:09Z")

</div>

> [@Carl\_Gibson](#):
>
> what is baffling is that the code works on the old machine but not on the new MacMini. How can this be?

Your old computer has an Intel chip, your new computer has an Apple Silicon chip.  
Sometimes also affects if there are different macOS versions.  
Do you have the source code? Can you try to run Xojo on your new computer and run the code? Or you just have the built application?

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [May 2, 2025, 1:06pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/12 "2025-05-02T13:06:21Z")

</div>

> [@Beatrix\_Willius](#):
>
> And you still haven’t posted any code.

You could also try to run your app as Intel instead of using the native ARM.

---

<div class="post-metadata">

**Author:** ![Carl\_Gibson](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@Carl\_Gibson](https://forum.xojo.com/u/Carl_Gibson)\
**Post date:** [May 2, 2025, 3:22pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/13 "2025-05-02T15:22:50Z")

</div>

Thank you for taking the time to provide your input. Reagrds, Carl

I am trying to replicate an old program I wrote with Real Basic before everything changed with graphics. Here is the relevant code:

 ![Screenshot 2025-05-02 at 11.19.08 AM](https://forum.xojo.com/uploads/default/original/3X/8/2/82d0b52b39e2c48d6bdd16d0d921b12f39819210.png)

'This project allows multiple lasers interating with multiple optics (mirros, lenses)

var slope As single  
var i, n As integer  
dim x As single  
var prismData As string  
var test As single  
var d As DesktopOval  
dim xx, yy As integer  
dim xStart, yStart As integer  
dim AofPerpendicular As single  
var tempA As single  
dim dY, dX As single

TextArea1.text=“”  
dataCounter=0

getWindowPic 'screenshot the canvas into property rgbs

n=numberOfDots

for i=numberOfLasersLast to numberOfLasers '1 based numberOfLaser=1 is laser(1)

numberOfLasersLast=numberOfLasersLast+1

xStart=laser(i).left+laser(i).Width/2  
yStart=laser(i).top + laser(i).Height/2

x=xStart

d=New laserDot '1st dot for the next laser

laserDot(n).angle=laser(i).angle

slope=Tan(laser(i).angle)  
dX=cos(laserDot(n).angle)

do

```
laserDot(n).fillcolor=Laser(i).colour
laserDot(n).Width=2
laserDot(n).Height=1
laserDot(n).Visible=true

laserDot(n).left=x 

'straight line formula
dY=slope*(x-xStart) 'y=mx
laserDot(n).top=yStart+ dY 'y=Y0 + dY

xx=laserDot(n).left
yy=laserDot(n).top

if rgbsPict.Pixel(xx,yy)=color.Teal then continue for i 'has the laser line exceeded a boundary or hit an obstruction

'other code is here, but not relavent

d=New laserDot
n=n+1
laserDot(n).angle=laserDot(n-1).angle

dX=cos(laserDot(n).angle)

x=x+2*dX
if x>10000 then 'temp
  quit
end if

```

loop

next i

numberOfDots=n

bLasersOff.Caption=“Turn Lasers Off”  
bLasersOff.visible=true

exception

textArea1.text="exception–makeLaserLines "+chr(13)+TextArea1.text

---

<div class="post-metadata">

**Author:** ![Thomas\_Kaltschmidt](https://forum.xojo.com/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@Thomas\_Kaltschmidt](https://forum.xojo.com/u/Thomas_Kaltschmidt)\
**Post date:** [May 2, 2025, 6:11pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/14 "2025-05-02T18:11:55Z")

</div>

Can you post a reduced, working sample? Trying to run your snippet i get more than 60 errors.

---

<div class="post-metadata">

**Author:** ![Armando\_SORBI](https://forum.xojo.com/user_avatar/forum.xojo.com/armando_sorbi/32/934_2.png) [@Armando\_SORBI](https://forum.xojo.com/u/Armando_SORBI)\
**Post date:** [May 3, 2025, 3:17pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/16 "2025-05-03T15:17:55Z")

</div>

I concur with PilippeP, I have a Mac Mini M4 and everything works just fine

---

<div class="post-metadata">

**Author:** ![Armando\_SORBI](https://forum.xojo.com/user_avatar/forum.xojo.com/armando_sorbi/32/934_2.png) [@Armando\_SORBI](https://forum.xojo.com/u/Armando_SORBI)\
**Post date:** [May 3, 2025, 3:21pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/17 "2025-05-03T15:21:51Z")

</div>

I don’t know, the apps I built for my old Intel machine work flawlessly in the M4 Mac Mini as well (they were all 56bit)

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [May 3, 2025, 3:58pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/18 "2025-05-03T15:58:20Z")

</div>

> [@Armando\_SORBI](#):
>
> I built for my old Intel machine work flawlessly in the M4 Mac Mini

Yes, my app does that, too. I seem to remember some edge cases like division by zero where Intel and ARM act differently. In older Xojo versions I have had rare crashes for Intel only. This one here: [https://tracker.xojo.com/xojoinc/xojo/-/issues/71271](https://tracker.xojo.com/xojoinc/xojo/-/issues/71271) .

---

<div class="post-metadata">

**Author:** ![Armando\_SORBI](https://forum.xojo.com/user_avatar/forum.xojo.com/armando_sorbi/32/934_2.png) [@Armando\_SORBI](https://forum.xojo.com/u/Armando_SORBI)\
**Post date:** [May 3, 2025, 4:11pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/19 "2025-05-03T16:11:25Z")

</div>

Well, dividing by 0 is a no-no in almost every mathematical field

---

<div class="post-metadata">

**Author:** ![Carl\_Gibson](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@Carl\_Gibson](https://forum.xojo.com/u/Carl_Gibson)\
**Post date:** [May 5, 2025, 7:04pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/20 "2025-05-05T19:04:32Z")

</div>

Greetings,

I got the method to work by removing the do loop and substituting with a for-next loop. The while construct, and not surprisingly the old-school goTo also fail. I suspect that a continue condition that removes the process external to the do loop makes things go buggy.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Carl\_Gibson](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@Carl\_Gibson](https://forum.xojo.com/u/Carl_Gibson)\
**Post date:** [May 6, 2025, 1:14pm UTC](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206/21 "2025-05-06T13:14:19Z")

</div>

Last Reply…

I was wrong again. The do loop construction works for me now. The test condition to leave the loop was “seeing” the wrong color on the canvas. Not sure why. Switched color to .blue from .teal, and all is well. Sorry for the hassle, and thanks for your consideration.  
You all are a great resource. Best regards

[Next page](https://forum.xojo.com/t/new-m4-mini-crashes-xojo-2024-x-and-2025-1/85206.md?page=2)
