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

segfault at the start of the first stage #372

Closed
omar-polo opened this issue Sep 9, 2023 · 1 comment
Closed

segfault at the start of the first stage #372

omar-polo opened this issue Sep 9, 2023 · 1 comment

Comments

@omar-polo
Copy link

Taisei starts up fine and the menu works. However, it segfaults when trying to start a game.

I'm trying taisei 1.4 from the release tarball on OpenBSD 7.3-CURRENT. I've built it with

-Ddocs=disabled  -Dvfs_zip=disabled  -Dpackage_data=disabled  -Dinstall_macos_bundle=disabled  -Dinstall_relocatable=disabled -Ddefault_library=shared -Db_lto=false

Enabling lto doesn't change the behaviour.

I've also tried with a clean userdir (TAISEI_STORAGE_PATH=/tmp/foo taisei), still the same.

Here's the stacktrace, which unfortunately doesn't seem to be complete.

$ egdb taisei taisei.core
[...]
Core was generated by `taisei'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000b42b8814936 in cotask_entry (varg=0x76983f2fc5d0)
    at ../taisei-1.4/src/coroutine/cotask.c:366
366             CoTaskData data = { 0 };
[Current thread is 1 (process 121953)]
(gdb) bt
#0  0x00000b42b8814936 in cotask_entry (varg=0x76983f2fc5d0)
    at ../taisei-1.4/src/coroutine/cotask.c:366
#1  0x00000b42b892dbe7 in koishi_entry (co=0xb45252fbb00)
    at ../taisei-1.4/subprojects/koishi/src/fcontext/../fiber.h:68
#2  0x00000b42b892dbca in co_entry (tf=...)
    at ../taisei-1.4/subprojects/koishi/src/fcontext/fcontext.c:50
#3  0x00000b42b892de2f in make_fcontext ()
    at ../taisei-1.4/subprojects/koishi/src/fcontext/asm/make_x86_64_sysv_elf_gas.S:71
Backtrace stopped: Cannot access memory at address 0xb454fb37000

This is what taisei logs:

W: config>config_set: Unknown setting 'fullscreen_desktop_mode'
W: config>config_set: Unknown setting 'gamepad_axis_lr_free_sensitivity'
W: config>config_set: Unknown setting 'gamepad_axis_ud_free_sensitivity'
W: renderer/glcommon/opengl>glcommon_ext_texture_format_rg8_srgb: Extension not supported
W: renderer/glcommon/opengl>glcommon_ext_texture_format_etc1: Extension not supported
W: renderer/glcommon/opengl>glcommon_ext_texture_format_etc1_srgb: Extension not supported
W: renderer/glcommon/opengl>glcommon_ext_texture_format_pvrtc: Extension not supported
W: renderer/glcommon/opengl>glcommon_ext_texture_format_pvrtc2: Extension not supported
W: renderer/glcommon/opengl>glcommon_ext_texture_format_pvrtc_srgb: Extension not supported
W: renderer/glcommon/opengl>glcommon_ext_texture_format_atc: Extension not supported
W: renderer/glcommon/opengl>glcommon_ext_texture_format_fxt1: Extension not supported
taskmgr:global/2   W: resource/texture_loader/basisu>texture_loader_basisu_sanitize_levels: menu/mainmenubg: Mip level 2 dimensions are not multiples of 4 (450x300); number of levels reduced 11 -> 2
taskmgr:global/3   W: resource/texture_loader/basisu>texture_loader_basisu_sanitize_levels: abstract_brown: Mip level 1 dimensions are not multiples of 4 (600x762); number of levels reduced 11 -> 1
taskmgr:global/0   W: resource/texture_loader/basisu>texture_loader_basisu_sanitize_levels: marisa_bombbg: Mip level 2 dimensions are not multiples of 4 (480x262); number of levels reduced 11 -> 2
E: util/kvparser>parse_keyvalue_file_cb: VFS error: Node 'res/shader/global.pp' does not exist
E: resource>load_resource_finish: Failed to load postprocessing pipeline 'global' from 'res/shader/global.pp'
E: util/kvparser>parse_keyvalue_file_cb: VFS error: Node 'res/shader/viewport.pp' does not exist
E: resource>load_resource_finish: Failed to load postprocessing pipeline 'viewport' from 'res/shader/viewport.pp'
taskmgr:global/3   W: resource/texture_loader/basisu>texture_loader_basisu_sanitize_levels: stage1/snowlayer: Mip level 7 dimensions are not multiples of 4 (6x8); number of levels reduced 11 -> 7
taskmgr:global/1   W: resource/texture_loader/basisu>texture_loader_basisu_sanitize_levels: stage1/horizon: Mip level 2 dimensions are not multiples of 4 (910x364); number of levels reduced 12 -> 2
taskmgr:global/1   E: pixmap/fileformats/internal>px_internal_load: Read 1441767 bytes, expected 5299840
taskmgr:global/1   E: resource/texture_loader/basisu_cache>texture_loader_basisu_load_cached: cache/textures/basisu-e44e64aa2e5dffe6972bb0cd665b45c54020ef20616676a6368e3642e1921c20-88641/0_0_BC7_RGBA_0: Failed to deserialize cached pixmap

Let me know if I can provide more info. Thanks!

@omar-polo
Copy link
Author

Found the issue: on OpenBSD the mmap(2)' MAP_STACK flag is required. I'll cook a diff for koishi and send the PR there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant