fschutt/azul

Unexpected panic for Getting Started's Hello World on Win7-64

mark-summerfield opened this issue · 3 comments

Description

I created a new rust app and replaced the default contents of main.rs with:

use azul::prelude::*;

struct MyDataModel { }

impl Layout for MyDataModel {
    fn layout(&self, _: LayoutInfo<Self>) -> Dom<Self> {
        Dom::div()
    }
}

fn main() {
    let mut app = App::new(MyDataModel { }, AppConfig::default()).unwrap();
    let window = app.create_window(WindowCreateOptions::default(),
                                   css::native()).unwrap();
    app.run(window).unwrap();
}

Note that this works fine on Linux.

Version / OS

Steps to Reproduce

I just did cargo run --release

Additional Information

error.log:

[ERROR][azul::logging] An unexpected panic ocurred, the program has to exit.
Please report this error and attach the log file found in the directory of the executable.

The error ocurred in: src\libcore\result.rs at line 1084 in thread main

Error information:
called `Result::unwrap()` on an `Err` value: CreateError(NoAvailablePixelFormat)

Backtrace:

std::panicking @ panicking.rs:484
std::panicking @ panicking.rs:384
std::panicking @ panicking.rs:311
core::panicking @ panicking.rs:85
core::result @ result.rs:1084
 @ exe_common.inl:253

I tried again (with a different example, but exactly the same code), this time with VirtualBox Display settings Acceleration with both Enable 3D Acceleration and Enable 2D Video Acceleration checked. It still didn't work, but the error log was different:

[ERROR][azul::logging] An unexpected panic ocurred, the program has to exit.
Please report this error and attach the log file found in the directory of the executable.

The error ocurred in: C:\tmp\targets\gravitate\release\build\gleam-23c5212669ddccbd\out/gl_bindings.rs at line 1513 in thread main

Error information:
gl function was not loaded

Backtrace:

std::panicking @ panicking.rs:484
 @ exe_common.inl:253

[ERROR][azul::logging] An unexpected panic ocurred, the program has to exit.
Please report this error and attach the log file found in the directory of the executable.

The error ocurred in: C:\tmp\targets\gravitate\release\build\gleam-23c5212669ddccbd\out/gl_bindings.rs at line 1513 in thread main

Error information:
gl function was not loaded

Backtrace:

std::panicking @ panicking.rs:484
 @ exe_common.inl:253

I tried again (with a different example, but exactly the same code), this time with VirtualBox Display settings Acceleration with both Enable 3D Acceleration and Enable 2D Video Acceleration checked. It still didn't work, but the error log was different:

[ERROR][azul::logging] An unexpected panic ocurred, the program has to exit.
Please report this error and attach the log file found in the directory of the executable.

The error ocurred in: C:\tmp\targets\gravitate\release\build\gleam-23c5212669ddccbd\out/gl_bindings.rs at line 1513 in thread main

Error information:
gl function was not loaded

Backtrace:

std::panicking @ panicking.rs:484
 @ exe_common.inl:253

[ERROR][azul::logging] An unexpected panic ocurred, the program has to exit.
Please report this error and attach the log file found in the directory of the executable.

The error ocurred in: C:\tmp\targets\gravitate\release\build\gleam-23c5212669ddccbd\out/gl_bindings.rs at line 1513 in thread main

Error information:
gl function was not loaded

Backtrace:

std::panicking @ panicking.rs:484
 @ exe_common.inl:253

Having looked into it, the problem seems to be a Windows-VirtualBox issue, not an azul issue.