Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Cannot set the window icon, illegal instruction #2

Open
ghost opened this issue May 21, 2021 · 0 comments
Open

Cannot set the window icon, illegal instruction #2

ghost opened this issue May 21, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented May 21, 2021

Cannot set the window icon.
(see: code)

(this is not the exact code, but it produces the bug)

pub fn main() !void {
    var gpa = std.heap.GeneralPurposeAllocator(.{}){};

    const callbacks = alka.Callbacks{};

    try alka.init(&gpa.allocator, callbacks, 1024, 768, "main", 0, false);

    var w = alka.getWindow();
    try w.setIcon(alka.getAllocator(), "assets/test.png");

    try alka.open();
    try alka.update();
    try alka.close();

    try alka.deinit();

    const leaked = gpa.deinit();
    if (leaked) return error.Leak;
}
Illegal instruction at address 0x26d18b
include/glfw-3.3.2/src/x11_window.c:0:0: 0x26d18b in _glfwPlatformSetWindowIcon (/path/Alka/include/glfw-3.3.2/src/x11_window.c)
/path/Alka/src/core/glfw.zig:637:22: 0x289a86 in core.glfw.setWindowIcon (main)
    glfwSetWindowIcon(window, count, images);
                     ^
/path/Alka/src/core/window.zig:191:31: 0x284ad8 in core.window.Info.setIcon (main)
        try glfw.setWindowIcon(win.handle, images.len, &images);
                              ^
/path/Alka/src/main.zig:33:18: 0x2827e3 in main (main)
    try w.setIcon(alka.getAllocator(), "assets/test.png")
  
...
@ghost ghost added the bug Something isn't working label May 21, 2021
@ghost ghost self-assigned this May 21, 2021
ghost pushed a commit that referenced this issue Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

0 participants