Several newb questions (state, bind, win on macOS)

it seems that the crash which occurs when I remove a component is back.
But it’s not the same because it’s harder to reproduce…
still a segfault 11, but only on some cases.
I suspect it related to garbage collector because I do something like

currentComponent = new myBox1();
currentComponent.registerEvent(xxxx, onevent);

    currentComponent = null;
    currentComponent = new myBox2();

=> segFault11 on refresh screen

How could I debug my code > haxeui-core > native backend so I could point on the issue ?

The best bet is to just try and reduce it to a super minimal example, then you can try and find what is the cause (or i can)… Its a lot of trial and error :slight_smile:

You can use VSCode i think to debug hxcpp, but ive never had much luck with it (though i havent tried in a while).

Let me know if you manage to create a super minimal example.


I found the culprit : ListView.
It crashes if the component you want to remove include a listview

You can see it on, bug 2 and 8

(for HXCPP debug, I tried hard for 2hours without success…currently looking for more details on vscode .json file, I don’t understand how task and launch works together)

Still trying to find the root cause.
I was finally able to get more than a poor ‘segment fault : 11’ on terminal.

Again related to event, but I need to find more to be able to share a minimal example to produce the crash

I found it to crash if I have 42 components or more on a vbox
At 41, it no longer crashes…

I still need to understand if it’s because of the height of stage or the number of components…
Simple exemple to reproduce crash coming soon.

EDIT : no problem on a basic sample…I need to find what happen first on my app which make the 42th component crashed the app. It’s not related to number of components but a memory error probably. Definitely related to event+rev, but I don’t know how exactly for now.

App no longer crashes if I comment a line in Component.hx

        if (dispose == true) {
            child._isDisposed = true;

so I assume one child is the culprit, but whatever I did, it’s when I add any more component that it crashes.
It drives me insane!

EDIT : replaced with


same crash

So I rebuilded my project with -debug and the crash is different

Unhandled unknown exception; terminating the application.
Abort trap: 6

I still don’t see why…
I tried to load the Component that crash on startup

      app.ready(function() {
            app.addComponent( new CrashingView() );

no problem!!!

So it comes from what happen BEFORE I load it

Can you attache a test app?

EDIT: ah, bugs 2 & 8 correct?


unfortunately no.
I’m unable to create a test app, while, trust me, I tried!
It only crashes on my case, so I’ll try to anonymize (NDA product so :hot_face:) part of my app which crashes

EDIT : so I did it…it crashes on my app, it doesn’t on my bugssample app :hot_face:

I made it!!!
I made it crashes::
It’s the first time in ages I’m happy to (re)produce a crash!

What is VERY strange is the crash occurs only if my component is the first added to the HaxeUIApp.
Please look for comment added on Main.hx (bug10)

1 Like

Great! Thanks, ill be looking at these issues “soon” (other things keep coming up)… but thanks for the repro!


I really hope you’ll be able to fix (the error or my stupidity)
This one locks my current project :frowning:

I really cant seem to follow what #10 is trying to do… I there any chance you could try and put the issue into a totally separate project - it seems to have components over components (wxWidgets doesnt like overlapping components) and seems to do some other things that im just not understanding - or even understanding what you are trying to do :slight_smile:


PS: you might want to join the #haxe discourse too ( - will be easier to chat there - up to you though of course. :slight_smile:

are you trying to do something like this:


yes, it seems you got it.

I want change current view by a new one, not using tabs
intro -> create -> edit -> end -> intro

But you added a theContainer, why is it needed ? it’s a view in a box into a vbox…?

EDIT : to be sure, I did the same and…crashes :frowning: . so adding another layer didn’t fix it

Does the sample i attached crash also? Can you try and make that sample crash in the same manner? (with minimal code).

The reason i used theContainer is because that is a child of the main view, so i can add buttons and other controls in the main view.

Thanks again!

The sample doesn’t crash : not enough component on screen…
The sample updated , which crash, is available here

remove some components on second.xml (42 in my case) and it will no longer crash :exploding_head:

can you pull latest and try again, i fix a few issues that i think might have fixed it (i cant reproduce the crash anymore)

I confirm it seems to be fixed.
I updated my sample app with “Fixed” state

Bad news : it still crashes but only when a listView is on screen