New M4 mini crashes Xojo 2024.X and 2025.1

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

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

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:

Anthony

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

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

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

you can even replace internal ssd with 2GB

2GB, whew that’s a large SSD :face_with_diagonal_mouth:.

4 Likes

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.

have-you tried that advice ?

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.

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?

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

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:

'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

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

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

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)

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 .

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

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.

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