Menu

If a VI creates and destroys contexts about 15 times and quits, LabVIEW crashes.

crocket
2013-05-24
2013-06-14
  • Martijn Jasperse

    Confirmed. Creating more than 10 contexts triggers "bonzai" tree rebuild with incorrect parameters. Fixed in commit 274b96/package 1.4.5.77.

    I am wondering however why you were calling init in a loop - was it simply to test capabilities? Each program should create a context exactly once at start-up and terminate it on exit, as outlined in the guide (http://zguide.zeromq.org/page:all#Getting-the-Context-Right).

    The current tracking implementation assumes the cumulative number of contexts is small and will probably become quite inefficient if there is a high turnover without stopping (e.g. in a loop). I intend to improve it when I have time.

     
  • crocket

    crocket - 2013-05-26

    My coworker doesn't like it when he has to initialize when an application starts and terminate when it ends.

    He wants to initialize and terminate it whenever a VI sends a message.
    Such a message is converted to an SMS message.

     
  • Martijn Jasperse

    That is not how ZeroMQ is designed, whether he likes it or not. Create and disregard sockets for every message, sure, but you're not supposed to expend contexts.

    Currently every context created by the application is tracked in a data structure until it finishes. This is what provides the cleanup mechanism and interrupt support. It could be improved but I considered reliability more important than efficiency at the time.

     
  • Martijn Jasperse

    I overhauled the context tracking algorithm, which should now be much more efficient. Tested in v1.4.5.79

     
  • crocket

    crocket - 2013-06-14

    Thanks for your effort. I'll test it soon.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.