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

HaxeUI crashes on second window #69

Open
BombasticTom opened this issue Mar 7, 2024 · 8 comments
Open

HaxeUI crashes on second window #69

BombasticTom opened this issue Mar 7, 2024 · 8 comments

Comments

@BombasticTom
Copy link

HaxeUI-OpenFL seems to randomly crash on a 2 window Lime application.

Current Behavior

The software works, it creates two windows, but the program has a habit of randomly crashing after a while of clicking on one of the buttons.

Media

(the video plays twice for an unknown reason)

2024-03-07.17-24-33.-.Trim.mp4

If you have any language translation questions, let me know

Test app / minimal test case

Window Creation Code:

window = stage.application.createWindow({
    title: "KONTROLNA TABLA",
    width: 800,
    height: 720,
    resizable: false,
});
window.stage.color = 0x00000000;

var app:HaxeUIApp = new HaxeUIApp({container: window.stage});

app.ready(function()
{
    app.addComponent(new MainView());
    app.start();
});

Context

Basically, my friend has asked me to program him a game show software where he uses one window for controlling the whole game, and the other window to display all game events. I decided to use HaxeFlixel for the first window as the game screen, and HaxeUI-OpenFL for the second window, as a game controller.

Your Environment

  • Version used: 1.6.0
  • Operating System and version (desktop or mobile): Windows 10 Pro 22H2 19045.4046
@ianharrigan
Copy link
Member

its an interesting concept... i presume openfl by itself is fine with 2 windows? No crashes?

Also, i dont think it will fix your issue, but can you update to git version of haxeui-core and haxeui-openfl?

@BombasticTom
Copy link
Author

its an interesting concept... i presume openfl by itself is fine with 2 windows? No crashes?

Yup, I even tried using FlxGame and HaxeUIApp on the same window, and it worked without any crashes

Also, i dont think it will fix your issue, but can you update to git version of haxeui-core and haxeui-openfl?

Sure, I'll update to the git version.

@ianharrigan
Copy link
Member

Do you have an example app i can mess with?

@BombasticTom
Copy link
Author

I can upload the source code later if it helps

@ianharrigan
Copy link
Member

Will defo help - its a very non standard use case, but it would be interesting to see what could be done since it already kinda works anyway

@BombasticTom
Copy link
Author

BombasticTom commented Mar 7, 2024

Alright, I have published the source code. Sorry for not doing it earlier, I was busy.

Here's the link: https://github.com/BombasticTom/the-chase-source

If you have any translation questions, let me know and I'll explain what it means.

@ianharrigan
Copy link
Member

So i commented out all the timer / sound stuff in PrvaRunda.hx and the app stops crashing - its hard to grep exactly what all those timers are for, but my guess is there is something wrong going on there, ie, i dont think this is really anything to do with haxeui / haxeui-flixel. Ive left the app running for 20 mins with no crashes, and with timers / sound it crashed after about 20-30 seconds.

I would review the logic in there and see if you can piece together what is happening :)

@BombasticTom
Copy link
Author

Thank you so much for the help, I'll see what I can do today and let you know if the issue is solved.

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

2 participants