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

[OSX] SDL port is unuseable #3447

Closed
DorpsGek opened this issue Dec 29, 2009 · 11 comments
Closed

[OSX] SDL port is unuseable #3447

DorpsGek opened this issue Dec 29, 2009 · 11 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

planetmaker opened the ticket and wrote:

Using MacOSX 10.6.2, I compiled OpenTTD rr18656 with ./configure --with-sdl --without-cocoa-quartz --without-cocoa-quickdraw in order to test SDL under MacOSX. This setup has various issues.

a) The colour of the display has a nice blue-ish note (see attached screenshot)
b) The default OSx window resize button in the lower right smears under certain conditions into the window. For this the window has to be large enough in both x and y extend. The smear is achieved by moving the map.
c) The console issues zillions of debug warnings:
2009-12-29 20:15:25.105 openttd[31007:8f0b] *** __NSAutoreleaseNoPool(): Object 0x11a15dee0 of class NSWindowGraphicsContext autoreleased with no pool in place - just leaking
d) OpenTTD produces sometimes an assertion upon quitting the application. See attached crash information. A newly created game was running, just command+q and confirming the "do you want to exit" dialogue leads to this behaviour. "Assertion failed at line 90 of trunk/src/fileio.cpp: f != NULL" This information is not contained in the attached crash information.
e) The speed compared to the native port feels slower

Using SDL installed via macports:
libsdl @1.2.14 devel/libsdl

Attachments

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/3447
@DorpsGek
Copy link
Member Author

planetmaker wrote:

This patch fixes one warning about an usused variable I got (and forgot) during compilation with --without-cocoa-quartz --without-cocoa-quickdraw
The 2nd version fixes only that line while the first patch makes the # ifdefs in that function better readable from my POV by combining them into one # if

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment7162

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 3, 2010

Rubidium wrote:

Unconfirmed only because there's no developer that can confirm it. Given the amount of information given it seems to be a valid bug report though.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment7225

@DorpsGek
Copy link
Member Author

hoserama99 wrote:

Does anyone care about the status of the SDL build on the Mac side, given the native Mac back-end?


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment7435

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Yes, the people that claimed that we should just use SDL and drop the Mac back-end. This definitely shows that it does not work. Furthermore, if it does not work configure should not be able to be detect with SDL for OS X, however AFAIK the (unofficial) iPhone port uses SDL so doing that would kill that port.

So, there are two "fixes":
- fix the SDL issue
- make SDL unavailable at all for OS X (and thus 'kill' the iPhone port)


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment7436

@DorpsGek
Copy link
Member Author

planetmaker wrote:

I tested this stuff again in r18917:
* Upon startup (in windowed mode), SDL port seems to fail to set a video mode properly according to the console output:
~/ottd/trunk> dbg: [driver] Setting video mode failed, falling back to 640x480 windowed mode.
* I cannot reproduce the crash / assertion upon exit with this version.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment7457

@DorpsGek
Copy link
Member Author

urdh wrote:

I can reproduce a, b and c on OSX 10.6.4 with SDL 1.2.14 in r20110.
I did get a segmentation fault on exit (no assert failure though, crash.log attached), as well as the "dbg: [driver] Setting video mode failed, falling back to 640x480 windowed mode." message on start. Going to take a closer look at the video mode failure.

Edit: the debug message is on line 250 in src/video/cocoa/cocoa_v.mm - should openttd ever reach this code, considering the function (QZ_CreateSubdriver) only tries to set up Quartz and Quickdraw subroutines? ./configure should have disabled these, no? If so, no wonder the SDL port isn't able to set a video mode. (I'm no Obj-C coder, and I don't have much experience with these APIs, but it doesn't seem right)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment8294

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 8, 2010

planetmaker wrote:

Compiling OpenTTD r20904, x64, with on-board graphics, on 10.6.4 with gcc version 4.2.1 (Apple Inc. build 5664), using
./configure --with-ccache --with-sdl --disable-cocoa-quartz --disable-cocoa-quickdraw
/Users/ingo/ottd/trunk/src/video/cocoa/cocoa_v.mm: In function ‘CocoaSubdriver* QZ_CreateWindowSubdriver(int, int, int)’:
/Users/ingo/ottd/trunk/src/video/cocoa/cocoa_v.mm:207: warning: unused variable ‘ret’
and on start still issues a) - d)
dbg: [driver] Setting video mode failed, falling back to 640x480 windowed mode.
2010-10-08 11:11:21.049 openttd[92049:460b] *** __NSAutoreleaseNoPool(): Object 0x116a4da30 of class NSWindowGraphicsContext autoreleased with no pool in place - just leaking
(... repeated zillion times ...)
dbg: [driver] cocoa_s: Core_CloseAudio: AudioOutputUnitStop failed

The smear of the re-size button on the lower right seems to be related to the failure to set a proper video mode. It only smears outside the upper left 640x480 pixels of the window.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment8882

@DorpsGek
Copy link
Member Author

planetmaker wrote:

Issues a), and b) seem gone after having updated libsdl to version "libsdl @1.2.14, Revision 8 (devel, multimedia)" - thus seem to be an issue with the SDL implementation on OSX which got fixed in at least revision 8 of macport's SDL 1.2.14


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment9249

@DorpsGek
Copy link
Member Author

Rubidium wrote:

http://old.nabble.com/osx-10.6-woes-td30436793.html seems to imply c is an SDL issue as well. e probably is also something that's basically SDL. Only real issue remaining is d, though you seem to not be able to reproduce it anymore right?

Maybe it's time to move this to the external type?


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment9250

@DorpsGek
Copy link
Member Author

planetmaker wrote:

Thanks for that hint wrt. c) As I could re-recreate the crash described as in d) yesterday, there seems to be some twist to that it only triggers under some conditions.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447#comment9251

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 6, 2011

Rubidium closed the ticket.

Reason for closing: Bug in external library

But documented in r22003


This comment was imported from FlySpray: https://bugs.openttd.org/task/3447

@DorpsGek DorpsGek closed this as completed Feb 6, 2011
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant