Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releases from version 1.10.1 no longer work on mid-2007 iMac #8194

Closed
erenes opened this issue Jun 6, 2020 · 10 comments
Closed

Releases from version 1.10.1 no longer work on mid-2007 iMac #8194

erenes opened this issue Jun 6, 2020 · 10 comments
Milestone

Comments

@erenes
Copy link

@erenes erenes commented Jun 6, 2020

Version of OpenTTD

1.10.1

Expected result

The game can be played.

Actual result

The game crashes on start.

Steps to reproduce

Try to run the game.

This issue is likely different from other crashes (#8066) that have been reported from 1.10.0 onwards, as this version (and all nightlies that I have tried between end of march and now) run fine on my machine.

After an extended debugging and reverse engineering session, I found that when crashing, the exception raised is: "EXC_BAD_INSTRUCTION".

The instruction being executed at that point is "PINSRQ", which is an SSE4 instruction and my processor only supports instructions up to SSE3.

Since it's such an old system (and I literally only took it off the shelf to investigate the other crash issue), I don't think this is a high priority issue. If other people also have this specific issue it could be worth looking into compiler flags to avoid SSE4.

@James103
Copy link
Contributor

@James103 James103 commented Jun 13, 2020

@erenes Have you ever tried other versions of OpenTTD (1.9.x, 1.10.0, and 1.10.2) to see if they run fine on your system (the same one you're trying to run OpenTTD 1.10.1 on)?

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Jun 13, 2020

Have you tested 1.10.0-RC1? A potential cause might be #8028 which changed the compiler used to build Mac releases with.

Also try the nightly builds around the date that PR was merged:
March 6th
March 13th
March 14th

@erenes
Copy link
Author

@erenes erenes commented Jun 13, 2020

I have tested a lot of nightlies: 31 March, 7, 8, 10, 12, 26 April. They all worked.
The release versions however: 1.10.0 worked fine. 1.10.1 and 1.10.2 did not.

Also, if I build the source code on my mac for 1.10.1 or 1.10.2, it works fine. So it's probably something in the optimization done by the compiler on the build machine.

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Jan 1, 2021

We switched build-farms. I somehow have the hope this magically fixed the issue ... @erenes , would you mind trying one of our latest nightlies?

https://www.openttd.org/downloads/openttd-nightlies/latest.html

If not, the SSE4 hint is a nice hint. We have some drivers that want to use SSE4 when available, and possibly that is what is going wrong here. But let's first see if a new build fixes the problem, before we delve into that part of the game :D

Tnx!

@michicc
Copy link
Member

@michicc michicc commented Jan 1, 2021

I would actually think that it might not be our SSE4 driver, but that new enough Apple compilers default to SSE4 on.

@erenes
Copy link
Author

@erenes erenes commented Jan 4, 2021

My initial thought is to agree with michicc, I'll drop by the office and fetch my old mac from the shelf again, will let you know somewhere in the next week or so :)

If I remember, nightlies were never a problem, only release builds (with all optimizations). I'll double check though, it's been quite a while.

@michicc
Copy link
Member

@michicc michicc commented Jan 4, 2021

#8476 was recently merged, possibly affecting this.

@TrueBrain TrueBrain added this to the 1.11.0 milestone Jan 5, 2021
@erenes
Copy link
Author

@erenes erenes commented Jan 6, 2021

I have verified that the latest nightly works, but the nightly from 1-1 also works and that does not have #8476 in it yet.

If memory serves me well, it was only the release builds that failed, is it possible to trigger a build with the release settings for testing?

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Jan 6, 2021

Where we used to have a lot of difference between release and nightlies, it is now very minimal .. only asserts are disabled for final releases, otherwise they are build identical.

But it is always good to check if not having asserts could trigger optimizations going wrong, so attached a MacOS version with asserts disabled :) If you can test this out too, that would be great! Tnx!

openttd-macos-x64.zip

@erenes
Copy link
Author

@erenes erenes commented Jan 6, 2021

Works like a charm 👍

I'll close the issue since I can't imagine it not working after this test.

@erenes erenes closed this Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants