`.asset_generate_preview()` internally calls `UI_icon_render_id` as a
job -- as opposed to `.preview_ensure()` [which internally also calls
`UI_icon_render_id`, but not as a job] leading to crashes in background
mode.
This might be due to the fact that OpenGL context is not set up
correctly (so there might be other ways to fix this), but there seems to
be other places/comments indicating that icon handling is only for main
thread (see e.g. 13beeb5892).
And while this does not fully explain why doing this with jobs works fine
from the UI, the patch certainly fixes the crashes in background mode for
now (by not using jobs).