Factorio is not working on the new OS X Yosemite
kovarex

We are getting a lot of reports like this, do anyone know how to fix it?

http://www.factorioforums.com/forum/viewtopic.php?f=7&t=6159

Trent Gamblin

I don't know but I'm concerned about my own games now. I'm going to install Yosemite and take a look.

EDIT: My games don't work either. Going to have to be fixed at some point SOON.

lordnoriyuki

It looks like 10.10 triggers a resize on the view when the OpenGLContext is set.

In macosx/osxgl.m (around line 908 or something):

Move this code:

#SelectExpand
1 /* Hook up the view to its display */ 2 [view setAllegroDisplay: &dpy->parent];

Above this line:

#SelectExpand
1 [view setOpenGLContext: dpy->ctx];

So the new code looks like:

#SelectExpand
1 /* Hook up the view to its display */ 2 [view setAllegroDisplay: &dpy->parent]; 3 [view setOpenGLContext: dpy->ctx]; 4 [view setPixelFormat: fmt]; 5 // moved hook up from here

This fixed the problem for me.

Trent Gamblin

Thanks a lot, I'll check it out and if it works I'll commit the fix to git.

EDIT: Fix committed.

kovarex

Hello, thank you for the help, it is appreciated a lot!
I included the change into our new version.

Ingo Maurischat

Hello

Today I did the Update to Yosemite.

The Program crashed and Xcode shows this line. ( 311 ) in osxgl.m

if (dpy->tracking) { -- Thread1: EXC_BAD_ACCESS

in the following function

/* reshape

  • Called when the view changes size */

- (void) reshape
{
if ([NSOpenGLContext currentContext] != nil) {
ALLEGRO_DISPLAY_OSX_WIN* dpy = (ALLEGRO_DISPLAY_OSX_WIN*) dpy_ptr;
NSRect rc = [self bounds];
glViewport(0, 0, NSWidth(rc), NSHeight(rc));

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, NSWidth(rc), NSHeight(rc), 0, -1, 1);

if (dpy->tracking) {
[self removeTrackingArea: dpy->tracking];
dpy->tracking = create_tracking_area(self);
[self addTrackingArea: dpy->tracking];
}
}
}

I downloaded the latest Version from git with "lordnoriyuki's" fix

Any idea ??, help would be appreciated
Greatings,
Ingo

Trent Gamblin

Make sure you're really using the updated code. That's about all I can think of, because it looks like the same error.

Ingo Maurischat

Thanks Trent for your answer.

I tried a complete rebuild with

git clone git://git.code.sf.net/p/alleg/allegro
cd allegro
git checkout 5.0
mkdir build
cd build
cmake -DSHARED=0 ..
make
sudo make install

But this doesn't help, same error. Are you using shared or static libs?

Elias

Use 5.1 not 5.0.

Ingo Maurischat

Elias, thanks a lot, now it works.

Chris Katko

Before this thread, I never realized Factorio ran on Allegro. I might buy it just for that reason. 8-)

Thread #614730. Printed from Allegro.cc