Log In  

Lately PICO8 will sometimes randomly crash, sometimes in a running game, sometimes in the editors. Full error in terminal shows up as:

-[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2400: failed assertion `No valid pixelFormats set.'

I am running High Sierra (10.13.6) on a 2013 iMac.

P#85098 2020-12-06 21:46

Thanks for the report @Hoatzin

How often are the crashes, roughly? If they only started recently, my best guess so far is that something in a OSX security patch has broken SDL's video driver.

A temporary work-around in this case would be to use a software blitter instead by launching from Terminal with:

PICO-8.app/Contents/MacOS/pico8 -software_blit 1

(from the same folder that the application is in)

I'd be interested to know if this does indeed stop the crashes from happening. The software blitter uses a bit more cpu that the default but otherwise should work the same.

P#85627 2020-12-21 01:26 ( Edited 2020-12-21 01:29)

Nope still failing. I opened a free-running demo and let it sit and it eventually failed, then I restarted and it crashed immediately.

-[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2400: failed assertion `No valid pixelFormats set.'
Abort trap: 6

Around a year ago (~Nov 2019) I had demos of my students' games running in a Mac-powered arcade cabinet in a gallery setting around the clock for weeks with no crashes (afaik). I'm a little hazy about the deets as I usually run these kinds of public installations in an infinite bash relaunch loop so it gets its biz together on crash automatically... but all the same, I don't recall crashes being an issue, and ditto while we (couple dozen kids) were actually working on the project in the lab most of that autumn (tho it could be we didn't have the most bleeding edge PICO-8 installed on the lab computers)... Seems likely that whatever introduced the bug has happened since.

P#86075 2021-01-02 14:11
-[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2400: failed assertion `No valid pixelFormats set.'
Abort trap: 6

FYI: 0.2.2 crashed ten minutes after starting it (w/ software_blit) first time. Most of the time it reports Abort trap: 6, but sometimes it says Segmentation fault: 11 and doesn't print any other error info. Might be a different thing.

P#87604 2021-02-13 23:59

Hi @zep,

I'm also seeing the same crashes as @Hoatzin, happening every few hours: -[MTLRenderPipelineDescriptorInternal validateWithDevice:]:1877: failed assertionNo valid pixelFormats set.

Running: Pico-8 0.2.3 on macOS 10.12.6 (Mac mini, late 2014).

Here's the stacktrace of the crashed thread from the various crash reports (callstack is always the same):

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fffae1fbd42 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fffae2e9457 pthread_kill + 90
2   libsystem_c.dylib               0x00007fffae161420 abort + 129
3   libsystem_c.dylib               0x00007fffae128893 __assert_rtn + 320
4   com.apple.Metal                 0x00007fff9c1aee0b MTLReportFailure + 822
5   com.apple.Metal                 0x00007fff9c1adfc9 -[MTLRenderPipelineDescriptorInternal validateWithDevice:] + 1919
6   com.apple.Metal                 0x00007fff9c1a020b -[MTLCompiler newRenderPipelineStateWithDescriptor:options:reflection:error:completionHandler:] + 70
7   com.apple.Metal                 0x00007fff9c1880f0 -[_MTLDevice newRenderPipelineStateWithDescriptor:error:] + 65
8   org.libsdl.SDL2                 0x00000001095c2576 0x1095b3000 + 62838
9   org.libsdl.SDL2                 0x00000001095c12e7 0x1095b3000 + 58087
10  org.libsdl.SDL2                 0x00000001095c2704 0x1095b3000 + 63236
11  org.libsdl.SDL2                 0x00000001095c5941 0x1095b3000 + 76097
12  org.libsdl.SDL2                 0x00000001095c46fa 0x1095b3000 + 71418
13  org.libsdl.SDL2                 0x0000000109649aa9 0x1095b3000 + 617129
14  com.lexaloffle.pico8            0x00000001092136fd codo_blit_to_video_plat + 1645
15  com.lexaloffle.pico8            0x00000001091e4326 codo_blit + 646
16  com.lexaloffle.pico8            0x0000000109211272 codo_blit_back_page + 50
17  com.lexaloffle.pico8            0x00000001091ce9f0 codo_main + 752
18  com.lexaloffle.pico8            0x000000010912fea4 start + 52

I also built the current version (2.0.17) of the SDL framework w/ debug symbols, and copied it over the version in the Pico-8 app; Still crashes every few hours, but now it shows the SDL function names in the stacktraces (assuming it's the same issue):

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.libsdl.SDL2                 0x00000001063947c6 METAL_ActivateRenderCommandEncoder + 406
1   org.libsdl.SDL2                 0x0000000106393222 METAL_RunCommandQueue + 1138
2   org.libsdl.SDL2                 0x000000010651e4ae FlushRenderCommands + 366
3   org.libsdl.SDL2                 0x000000010652b692 SDL_RenderPresent_REAL + 210
4   org.libsdl.SDL2                 0x00000001064e0584 SDL_RenderPresent + 36
5   com.lexaloffle.pico8            0x0000000105fb90ed codo_blit_to_video_plat + 1645
6   com.lexaloffle.pico8            0x0000000105f89d16 codo_blit + 646
7   com.lexaloffle.pico8            0x0000000105fb6c62 codo_blit_back_page + 50
8   com.lexaloffle.pico8            0x0000000105f74310 codo_main + 720
9   com.lexaloffle.pico8            0x0000000105ed4ec4 start + 52
P#98061 2021-09-30 20:40

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 12:28:01 | 0.012s | Q:18