MacOS update to M1 Pro Tahoe causing problems

I have been using various versions of Inform for about seven years. No problems. Now I have updated my MacOS to Tahoe 26.5. Apple is telling me to update to non-Intel chip apps. I haven’t updated to a non-Intel Inform version. (Does one exist?) Now I am getting intermittent hangs for some of the Inform stories. Sometimes it hangs the first time, sometimes not for six or ten or more, but then it hangs.
Anyone have any info about this?

The main question is, what Inform are you building your game or games in?

If it is 6M62 or later, you can get the current Inform 10 app (which will not produce these warnings, and which I’ve found to be free of any major bugs in the long term) and set the version of any particular project to what you’re using. This is what I’m doing. I am on Tahoe, on an M1, running the Inform 10 app, but with the project (my WIP) set to 6M62.

If you are writing a game or games in versions of Inform older than 6M62 (e.g. 6G60) I don’t believe you’ll find any Mac version of the Inform app that supports it for ARM chip computers like the M1 or later.

-Wade

If I click on About Inform, I see that I am running INFORM Version 1.82 @2014-2022 Toby Nelson, Graham Nelson. I don’t know how to set it to anything else. I’m told that is the latest version.

Sounds like you are running the latest version of Inform 10. My mac version gives the exact same info.

I assumed you have an M1 or later Mac? Or is this not the case?

I got the impression from your OP that it was your Inform app that prompted the Mac to give you the ‘non-Intel’ warning. Was I wrong? (I should be if you’re using the app I think you’re using.)

Do this check: Highlight the application in the finder and press Apple-I. It should say ‘Kind: Application (Universal)’. If it does, there is no non-Intel problem with the app.

This means any problems are unrelated to Intel/non-Intel issues, as you would have none.

What do you mean ‘some of the Inform stories’. Particular examples from the documentation? Your own projects? Does hang mean the whole app stops? Or does a story fail to compile?

-Wade

I am running the latest version of Inform, and the Apple OS: Tahoe. I have an M1 Mac, which is why I’m getting the non-Intel warnings.
I don’t have an Apple-I key, so I don’t know what you mean. How do I test if my app is non-Intel or not? When you say “highlight the application ih the finder” do you mean in the Applications directory, or as in searching the App in the finder?
I would love to know this check so I can apply it to most of my apps.

The hang is during an inform game. It stops and no input/output occurs. The keyboard doesn’t work. I can close and reopen Inform, and I can continue. Eventually, I will get the intermittent hang again.

Sorry, I meant Command-I.

Highlight the application icon in the finder (click on it once) then hold Command and press and release the letter I to get the information window.

See, that’s still not enough information. Do you mean your own project that you’re writing? Do you mean an example from the documentation? I want to know exactly what code is hanging the app.

This is important because I strongly suspect you have the up-to-date application, and you’re on the same computer as me (an M1). I don’t think there is going to be any non-Intel problem. I think the problem is going to be something else – the particular code you’re compiling, or maybe you’ve never cleared the skein (you should do it regularly), or there is some old preference file hanging around causing a problem (could be solved by uninstalling Inform and reinstalling it fresh).

-Wade

2 Likes

Yes, when I Get Info on Inform app I get Application: kind (Universal). So not an intel-problem.
Here is the entire extension. It seems to hang in that extension, but not at a particular place.

Topper by Clyde Falsoon begins here.

DealerGold is a number that varies. DealerGold is initially 20.
TopperDealer is a person that varies. 
PlayerGold is a number that varies. 
MaxBet is a number that varies.

Bettingmode is a truth state that varies. BettingMode is false.
TopperDeck is a list of numbers that varies.
Description of BettingPrompt is 
"How many coins do you want to bet (1 - [MaxBet])?  ".

To decide which number is minimum of (N1 - number) and (N2 - number):
	if N1 < N2:
		decide on N1;
	decide on N2;	

Description of TopperRules is "[TopperDealer] grins at his brother. 'It's like this: I flip a card and you bet whether the next card is Higher or Lower. If the first card is a 2, 3, King, or Ace, it doesn't count--cause that's a gimme bet. I'll just flip again. If you called it right, you win as much as you bet.' [line break] 'One thing though, you can't bet more than I have, else I can't pay you. I've only got [DealerGold] gold pieces to start.'[line break] "; 


[---- TOPPER CODE OUTLINE -----------------------]
To start topper:
	setup topper;
	now BettingMode is true;
	play one round;


To setup topper:
[	say "TEST: Setting up topper.[line break]";]
	say " 'Would you like to play a little? Maybe make a few coins? I'll explain the rules--they're simple.' [line break]";
	say "[description of TopperRules][line break]";
	say " 'After hearing the rules, do you still want to play?' ";
	if player consents:
		now BettingMode is true;
	otherwise:	
		say "[TopperDealer] looks disappointed, then says, 'Maybe some other time, then.' ";
		say "He changed his mind[line break]";
		now BettingMode is false;


To play one round:
[	say "TEST: One round of Topper[line break]";]
	shuffle deck;
	now Cardpos is 1;
	say "[TopperDealer] says, 'Alrighty now. Here we go!'[line break]";
	now C1 is opening topper card;
	say "[TopperDealer] turns over the top card. It is a [card-name of C1].[line break]";
	let M be moneyAmt of cash;
	now PlayerGold is M to the nearest whole number;
	now MaxBet is minimum of PlayerGold and DealerGold; 
	now the command prompt is "[description of BettingPrompt]";
	[Betting action is called here]


Betting is an action applying to one number.
Understand "[number]" as betting.

[Ensure that only a number if input at this point]
CHECK BETTING:
[	say "TEST: Check Betting Action entered.[line break]"; ]
	if command prompt is description of BettingPrompt:
		do nothing;
	otherwise:
		say "You must enter a number of gold coins.[line break]" instead;
	if bettingMode is false:
		say "There is no game going on right now." instead;
	otherwise:
		let wager be the number understood;
		if wager < 1:
			say "[TopperDealer] says, 'C'mon. You gotta bet SOMETHING!' " instead;
		if wager > DealerGold:
			say "[TopperDealer] says, Hey! I don't have that much. Do you not want to get paid?' " instead;
		if wager > playerGold:
			say "You find to your surprise that you don't have that many gold coins." instead;


C1 is a number that varies. C2 is a number that varies.
Cardpos is a number that varies. 
Wager is a number that varies. Wager is initially 0.

Wager-dir is a kind of value. The Wager-dirs are higher and lower. 
The current wager-dir is a wager-dir that varies.

CARRY OUT BETTING:
[	say "TEST: Carry out betting.[line break]";  ]
	let wager be the number understood;
	let pot be 0;
	decrease playerGold by wager;
	decrease DealerGold by wager;
	increase pot by 2 * wager;
	say "You slide [wager] gold pieces across the table.[line break]";
	say " [TopperDealer] drops his [wager] coins onto your pile.[line break]";
	say "[TopperDealer] asks, 'Higher?' (Y/N)  [run paragraph on]";
	if player consents:
		now current wager-dir is higher;
	otherwise:
		now current wager-dir is lower;
	now C2 is the next topper card;
	say "[TopperDealer] dramatically turns over the next card. It is a [card-name of C2]. [paragraph break]";
[	say "TEST: C1 = [C1];     C2 = [C2]     wager-dir = [current wager-dir][line break]"; ]
	if C2 > C1:
		if current wager-dir is higher:
			say "YOU WIN!";
			increase playerGold by pot;			
		otherwise:
			say "YOU LOSE!";
			increase DealerGold by pot;
	if C2 < C1:
		if current wager-dir is lower:
			say "YOU WIN!";
			increase playerGold by pot;
		otherwise:
			say "YOU LOSE!";
			increase DealerGold by pot;
	say "You now have [PlayerGold] gold pieces.";
	finish topper round;
	

To finish Topper round:
	now the command prompt is Stdprompt;
	[Game must stop because someone is out of money]
	now moneyAmt of cash is PlayerGold;
	if DealerGold is 0:
		say "[TopperDealer] frowns. 'Well, you busted me. I'm out.' ";
		now BettingMode is false;
	if PlayerGold is 0:
		say "You look down at your empty money pouch. 'Well, you busted me. I'm out.' ";
		now BettingMode is false;
	[Game must stop if player says so]
	if BettingMode is true:	
		say "[paragraph break]";
		say "Play again? ";
		if player consents:
			play one round;
		otherwise:	
			now BettingMode is false;
			say "[TopperDealer] nods, 'Maybe some other time.' ";

To decide what number is the opening Topper card:
	let X be {2, 3, 13, 14};	
	let topCard be entry Cardpos in TopperDeck; [init topCard]
	while topCard is listed in X:
		increment Cardpos;
	now topCard is entry Cardpos in TopperDeck;
	increment Cardpos;
	decide on topcard;		

[CardPos has already been incremented]
To decide what number is the next Topper card:
	let topCard be entry Cardpos in TopperDeck;
	decide on topcard;		

	

TO SHUFFLE DECK:
	now TopperDeck is {};		[clear previous deck]
	say "[TopperDealer] shuffles the cards. [first time]As he shuffles, you notice that it is a thin deck--a very thin deck. He notices you noticing. 'We only use a single suit for this game: 2 through Ace', he says.[only][line break]";
	say "[first time]You think, a single suit should make my winning easier.[only][paragraph break] ";
	repeat with N running from 2 to 14:
		add N to TopperDeck;
	sort TopperDeck in random order;
	say "TEST CHECK: Sorted deck: ";
	repeat with K running through TopperDeck:
		say "[card-name of K] ";
	say "[paragraph break]"; 


To decide what text is card-name of (N - a number):
	if N is 11, decide on "Jack";
	if N is 12, decide on "Queen";
	if N is 13, decide on "King";
	if N is 14, decide on "Ace";
	decide on "[N]";	

Topper ends here.

The freezing seems to be caused by an infinite while loop which happens when the TopperDeck starts with 2, 3, 13, or 14.

The while loop in this part is the culprit:

To decide what number is the opening Topper card:
	let X be {2, 3, 13, 14};	
	let topCard be entry Cardpos in TopperDeck; [init topCard]
	while topCard is listed in X:
		increment Cardpos;
	now topCard is entry Cardpos in TopperDeck;
	increment Cardpos;
	decide on topcard;

You increment the Cardpos in the loop, but then you don’t pick the next topCard, or more precisely, you do so in the next statement, but that’s after the while loop. But we’re never leaving the loop when topCard is listed in X; we just keep incrementing Cardpos ad infinitum.

You need to make the “now topCard ...” line part of the while loop by indenting it one level, like this:

	while topCard is listed in X:
		increment Cardpos;
		now topCard is entry Cardpos in TopperDeck;
3 Likes

StJohnLimbo,
Thanks so much! I have beat my head on the glass wall because of this problem for so long that I had given up!
P.S. How do I mark this post as Solution? The normal Solution box is missing.

1 Like

Technical development isn’t set up for solutions as it’s more discussion instead of Q&A.

Thanks.

One thing you can do is replicate the behavior:

Most people can edit their own initial post. I believe you can “retro-quote”, or put the link to the solution in the original post.

Below the post that is the solution, click the link icon and the “copy” button.


Edit your original post and paste that link marking it as the solution.

This is the solution!

## This is the solution!
https://intfiction.org/t/macos-update-to-m1-pro-tahoe-causing-problems/81117/8?u=hanono

If you want to get fancy, you can use the Obsidian-style quote boxes.

[!done]This is the solution!

MacOS update to M1 Pro Tahoe causing problems - #8 by StJohnLimbo

> [!done]This is the solution!
>
>https://intfiction.org/t/macos-update-to-m1-pro-tahoe-causing-problems/81117/8?u=hanono

“Done” is an alias for the “Success” quote block style: see New component: Quote Callouts (Stylized Quote Boxes)

You can even add the quote block:

[!done]This is the solution!

MacOS update to M1 Pro Tahoe causing problems - #8 by StJohnLimbo

> [!done]This is the solution!
>
>https://intfiction.org/t/macos-update-to-m1-pro-tahoe-causing-problems/81117/8
> 
> [quote="StJohnLimbo, post:8, topic:81117"]
> The freezing seems to be caused by an infinite while loop which happens when the `TopperDeck` starts with 2, 3, 13, or 14.
> [/quote]

1 Like

The problem boiled down to forgetting to put a tab in the statement, so that the required statement was within the loop. Without the tab, the statement was not in the loop. :roll_eyes:

If the code were “frozen” so to speak then one thing is still not adding up. The detail that is still missing for me is that this problem should have happened before the OS update. I thought possibly could it be the encoding of the text file that somehow is reinterpreted to now be incorrect? That seems extremely unlikely, the tab, 0x09, s/b universal so that seems unlikely. Unicode text files can have a few different byte order markers up front or just be utf-8. It seems like an encoding false positive interpretation would have shown up before this, maybe not, not likely but not impossible. So that makes me think that somehow the text got edited or somehow “dirty” and resaved and thus introducing this issue. I guess the good news is that it is fixed, people learned new code and people got to practice some coding muscle memory. Humans 1, AI 0, on the whole for that one.

Candy,
I think the code was inadvertently changed so that the tab, which changed the loop logic, got omitted. That could have happened at any time. It is fixed now. The OS issue was not the cause.