Giter Club home page Giter Club logo

Comments (5)

Gnimuc avatar Gnimuc commented on July 4, 2024

Exception handling is tricky between languages. Dear ImGui is written in C++ and cimgui doesn't expose any exception handling utilities and hence we cannot handle this on Julia side. There are at least two feasible ways to solve this problem. One way is to rewrite cimgui following some patterns like hourglass-interfaces. Another way is to directly wrap Dear ImGui based on Cxx which natively supports C++ exceptions. Unfortunately, neither of these is practically feasible because there's too much work that needs to be done.

I guess a great many crashes are caused by missing the EndXXX calls? If so, you could write some macros to automatically insert corresponding EndXXX calls. Other crashes may potentially due to certain bugs, feel free to open specific issues for better tracking.

from cimgui.jl.

louisponet avatar louisponet commented on July 4, 2024

Yea that's what I thought, no problem I understand. One thing I don't really get is why I get crashes if I make some dumb mistake on the Julia side of things in between Begin() and End() calls. I guess It's because due to the error exception in Julia the End() call never actually happens. That's a little unfortunate.

from cimgui.jl.

Gnimuc avatar Gnimuc commented on July 4, 2024

Could you share a minimal working example?

Exceptions on the Julia side should work as long as you setup try-catch block correctly. Here is a simple renderer that I'm currently using for developing and testing imgui tools.

from cimgui.jl.

Gnimuc avatar Gnimuc commented on July 4, 2024

I've added try-catch-finally-block in those demos(312c0c3).

from cimgui.jl.

Gnimuc avatar Gnimuc commented on July 4, 2024

I haven't experienced any unexpected crashes since the try-catch-finally-block approach was added last year. Feel free to reopen if any other unexpected crash happens.

from cimgui.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.