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

update egui and egui-miniquad versions #24

Closed
wants to merge 1 commit into from

Conversation

buxx
Copy link
Contributor

@buxx buxx commented Aug 27, 2022

Hello,

Unable to run demo with current master :

➜  egui-macroquad git:(master) ✗ cargo run --example demo         
   Compiling egui-macroquad v0.11.0 (/home/bastiensevajol/Projets/egui-macroquad)
error[E0277]: expected a `FnOnce<(&egui::Context,)>` closure, found `F`
   --> src/lib.rs:81:37
    |
81  |         self.0.run(gl.quad_context, f);
    |                ---                  ^ expected an `FnOnce<(&egui::Context,)>` closure, found `F`
    |                |
    |                required by a bound introduced by this call
    |
    = note: expected a closure taking 2 arguments, but one taking 1 argument was given
note: required by a bound in `EguiMq::run`
   --> /home/bastiensevajol/.cargo/registry/src/github.com-1ecc6299db9ec823/egui-miniquad-0.11.0/src/lib.rs:145:66
    |
145 |     pub fn run(&mut self, mq_ctx: &mut mq::Context, run_ui: impl FnOnce(&egui::Context)) {
    |                                                                  ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `EguiMq::run`

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> src/lib.rs:113:16
    |
113 |         self.0.mouse_motion_event(x, y);
    |                ^^^^^^^^^^^^^^^^^^ -  - supplied 2 arguments
    |                |
    |                expected 3 arguments
    |
note: associated function defined here
   --> /home/bastiensevajol/.cargo/registry/src/github.com-1ecc6299db9ec823/egui-miniquad-0.11.0/src/lib.rs:204:12
    |
204 |     pub fn mouse_motion_event(&mut self, ctx: &mut mq::Context, x: f32, y: f32) {
    |            ^^^^^^^^^^^^^^^^^^

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> src/lib.rs:117:16
    |
117 |         self.0.mouse_wheel_event(dx, dy);
    |                ^^^^^^^^^^^^^^^^^ --  -- supplied 2 arguments
    |                |
    |                expected 3 arguments
    |
note: associated function defined here
   --> /home/bastiensevajol/.cargo/registry/src/github.com-1ecc6299db9ec823/egui-miniquad-0.11.0/src/lib.rs:210:12
    |
210 |     pub fn mouse_wheel_event(&mut self, _ctx: &mut mq::Context, dx: f32, dy: f32) {
    |            ^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0061, E0277.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `egui-macroquad` due to 3 previous errors

Update egui and egui-miniquad dependencies solved most of the problems (see MR). But now I got :

➜  egui-macroquad git:(follow-dependencies) ✗ cargo run --example demo        
   Compiling egui-macroquad v0.11.0 (/home/bastiensevajol/Projets/egui-macroquad)
error[E0308]: mismatched types
  --> examples/demo.rs:30:38
   |
30 |                 egui_demo_windows.ui(egui_ctx);
   |                                      ^^^^^^^^ expected struct `egui::context::Context`, found struct `egui::Context`
   |
   = note: expected reference `&egui::context::Context`
              found reference `&egui::Context`
   = note: perhaps two different versions of crate `egui` are being used?

For more information about this error, try `rustc --explain E0308`.
error: could not compile `egui-macroquad` due to previous error

Not sure to understand what to do 🤔

@buxx
Copy link
Contributor Author

buxx commented Aug 27, 2022

expected struct egui::context::Context, found struct egui::Context

Oh it was :

 [dev-dependencies]
-egui_demo_lib = { version = "0.18.0", default-features = false }
+egui_demo_lib = { version = "0.19.0", default-features = false }

But, with these version upgrades, we have a low level error :

➜  egui-macroquad git:(follow-dependencies) ✗ cargo run --example demo            
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/examples/demo`
free(): double free detected in tcache 2
[1]    34199 abort (core dumped)  cargo run --example demo

@EvoTeamDevelop
Copy link

@optozorax Can you please help with this fix?
I have stuck with this issue:
egui-miniquad-0.11.0/src/lib.rs:145:66

pub fn run(&mut self, mq_ctx: &mut mq::Context, run_ui: impl FnOnce(&egui::Context)) {
                                                                  ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `EguiMq::run`

@EvoTeamDevelop
Copy link

I suppose this should do the trick: #25

@optozorax
Copy link
Owner

Hi, thanks for the PR, sorry for the delay, but version is already updated.

@optozorax optozorax closed this Oct 1, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants