Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Crashes with precompiled libtcod-migw on Windows #54

@tomassedovic

Description

@tomassedovic

This is on a 32bit version of Windows 7 with MinGW and MSYS (dependencies for building libtcod) installed.

When using tcod-rs with the libtcod compiled as part of tcod-sys, none of the examples crash. But when I download the precompiled libtcod-1.5.2-mingw32.tar.gz library from:

http://roguecentral.org/doryen/libtcod/download/

and run e.g. the minimal example, I get a panic unwrapping the Option here:

Key::Special(FromPrimitive::from_u32(tcod_key.vk).unwrap())

The tcod_key.vk values appear to be 256 or greater (hence the failure although this shouldn't ever happen) and when I try to inspect it, I end up with weird crashes (segfaults?) which seem to depend on things such as having a println!(tcod_key.vk) line in there or not.

I'll try to investigate this further but it seems like some sort of memory layout issue or something like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions