100% reproducible crash on OS X 10.14.2 (mojave)

Do you want to help out with Freeciv development? Then check out this forum.
Posts: 6
Joined: Mon Jan 14, 2019 12:33 pm

100% reproducible crash on OS X 10.14.2 (mojave)

Postby tvleavitt » Fri Jan 25, 2019 4:06 am

I've posted all the details here, lldb dump (gdb is useless and broken on OS X apparently) and dtrace http://forum.freeciv.org/f/viewtopic.php?f=8&t=91065&p=100641#p100641.

Basically, it crashes as soon as I start the Tutorial scenario, and according to an Apple employee / developer familiar with this type of problem (the crashing snippet was the lldb output):

"So this CRASH location is actually a lot more prevalent than you may think. It occurs whenever a client uses a CGDataProvider to feed a CGImage and that CGDataProvider has been configured such that it’s “size” parameter is too big for the memory that is actually backing it. And I’m talking off-by-one here: even if the memory is one byte shorter than the size indicates, you can get this crash.

Now, the “client” in question may be another Apple library, or it may be the running application itself. I can’t really tell from the crashing snippet you’ve sent. But a common pattern leading to this bug is the client making certain assumptions about the memory layout of an image and those assumptions being incorrect. E.g. “this bitmap is 32-bits per pixel times 640 pixels, with 2-byte padding per row, times 640 rows” when the padding is wrong, or the image has no alpha channel, so each pixel is only 24-bits, or the width or height is wrong."

I pulled this installation from Homebrew. Has anyone else been able to run it successfully?