Register Event Crashes LabVIEW if Event Type isn't Selected.

Hi I think I have found a possible bug in LV2011 SP1.
- Wire a Reg Event property node to the Dynamic Event Registration Terminal of an event structure
- Add an event case
- Click the Dynamic Event
- LV Crashes
Source code included, try to add the unspecified event and watch as LV crashes.
Br,
/Roger
Solved!
Go to Solution.
Attachments:
LVCrash.vi ‏5 KB

Intaris wrote:
I had a case very similar to this today, I think it was to do with exactly what you describe but it was in LV 2012.
I seem to have a knack of crashing LV.  I'm really good at it.  Maybe I should be an internal tester for NI?
Shane.
What? they do testing? When did this happen?
I'm just kidding, or, perhaps not? 
We all like to Love/Hate NI, right? 

Similar Messages

  • Problem with register event callback in use of instrument control

    now, i use the register event callback to register a value change of a boolean control on the front panel, and wire the cluster's ref of the instrument control parameters to the user parameter input, then create the callback vi. In the callback vi, i select the pump-control subvi, and pass the user parameter to the subvi. The problem is that,  when i press the boolean control, the instrument (here is pump) can act, but immediately, the code crashes.
    I use labview 8.6
    Attachments:
    callback vi.png ‏8 KB
    register event callback.png ‏8 KB

    You would wire the event registration wire that comes out of the Register for Events node into an event structure.  You will need to right click on the event structure and check off "Show Dynamic Event Terminals" and it into that.  Then you can create a new Event Case that uses the dynamic event.  You can place your subVI in that event in whatever way you want.  (Just drop the subVI in or do a Call by Reference there, or whatever.)  Look in the Example Finder for "Dynamically Register for Events.vi".

  • Need help trying to create a ActiveX registered event

    I am trying to create a register event for an ActiveX component. The problem I am having is creating the callback vi. When I right click on the VI ref and create the callback vi it is created with the user parameter as a variant. I would like this to be a control refnum. If I open the callback vi and replace the user parameter variant with a control refnum the wire from the callback vi to the VI ref is broken. How do I change the user parameter?

    Joe is correct on this one. The callback where designed to take variants as their inputs, so that they are more flexible. In addition Variants are used through out ActiveX programming.
    If you have a control reference that you want to pass into the VI, all you need to use is the "To Variant" function in the main VI to turn the reference into a variant. You can then inside the Callback VI you can use the Variant to Data VI to change the variant back to a reference; you simply where a constant of the reference type to the "Type" terminal.
    Evan
    National Instruments

  • Updating data in User Event doesn't propogate to uses of the User Event type

    So I have a user event which is seeded with a cluster in which there are a few typedefs. Now, as you might expect, I have to pass the user event to different VIs so that they can trigger the events which are interpretted by a main vi. Pretty simple and all is happy. There's one rub though: one of my vis which is passed the user event is called by reference. The call by reference vi requires a certain vi pattern when you create the reference for the vi (namely, a strictly typed vi reference), which includes the user event type. Now, sometimes, I update the typedefs in the data type of the user event. This means that user event type changes. Now, what's maybe not too surprising, is that either the user event type doesn't update with the type def or that the type specifier vi constant doesn't update with the change in user event type. This means that every time I have to go back and create a type specifier based on the updated pattern for the vi which takes the user event as an input.
    Is there a way for labview to automatically do this? One way to fix it, I'm sure, is to change the user event input into the vi I call by reference to a variant. Then inside the vi I call, to type cast the variant with the output of a Create User Event vi that has been seeded with the appropriate cluster of typdefs. But that seems pretty silly (like, why not just make EVERYTHING a variant). Any ideas?
    - Chris

    Take a static VI reference (from the app control palette), drag your subVI into it, right click it and make it strict and wire it into the type input for the Open VI Reference primitive. Now it should always update.
    Two more advantages you get from this is that now the VI is in memory, so it will automatically be included in your build and that you can use the VI Name (or VI Path) property from the static reference to get the name for the Open VI Reference primitive and it will always work correctly.
    Try to take over the world!

  • Cl_gui_alv_tree no child nodes after registering event

    Hey guys,
    I have an uncommon problem with cl_gui_alv_tree.
    My tree has 2 layers, Root and child. Both of them have layout-class  cl_gui_column_tree=>item_class_checkbox.
    Everithing works fine! (without_events.jpg)
    But if I register event "checkbox_change" with method SET_REGISTERED_EVENTS the childnodes disapear! (with_events.jpg)
    Does anyone know a solution?
    here's some code:
    data; gr_alv_0200 type ref to cl_gui_alv_tree.
    METHOD init_dynpro_0200.
         DATA: ls_hierarchy_header TYPE treev_hhdr.
         IF gr_cont_0200 IS INITIAL.
           CREATE OBJECT gr_cont_0200
             EXPORTING
               container_name              = 'CC200'
             EXCEPTIONS
               cntl_error                  = 1
               cntl_system_error           = 2
               create_error                = 3
               lifetime_error              = 4
               lifetime_dynpro_dynpro_link = 5
               OTHERS                      = 6.
           IF sy-subrc <> 0.
             MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
           ENDIF.
         ENDIF.
         IF gr_alv_0200 IS INITIAL.
           CREATE OBJECT gr_alv_0200
             EXPORTING
    *         lifetime                    =
               parent                      = gr_cont_0200
               node_selection_mode         = cl_gui_column_tree=>node_sel_mode_single
               item_selection              = 'X'
               no_toolbar                  = 'X'
               no_html_header              = 'X'
             EXCEPTIONS
               cntl_error                  = 1
               cntl_system_error           = 2
               create_error                = 3
               lifetime_error              = 4
               illegal_node_selection_mode = 5
               failed                      = 6
               illegal_column_name         = 7
               OTHERS                      = 8.
           CHECK sy-subrc EQ 0.
           ls_hierarchy_header-heading = 'Hierarchy Header'.     "#EC NOTEXT
           ls_hierarchy_header-tooltip =
                                  'This is the Hierarchy Header !'. "#EC NOTEXT
           ls_hierarchy_header-width = 100.
           ls_hierarchy_header-width_pix = ''.
            tree_create_fcat( ).
           CALL METHOD gr_alv_0200->set_table_for_first_display
             EXPORTING
               is_hierarchy_header = ls_hierarchy_header
               i_background_id     = 'ALV_BACKGROUND'
             CHANGING
               it_outtab           = gt_treenodes
               it_fieldcatalog     = gt_fcat_0200.
           DATA: lt_events TYPE cntl_simple_events,
                     ls_event LIKE LINE OF lt_events.
           ls_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
           APPEND ls_event TO lt_events.
           CALL METHOD gr_alv_0200->set_registered_events
             EXPORTING
               events                    = lt_events
             EXCEPTIONS
               cntl_error                = 1
               cntl_system_error         = 2
               illegal_event_combination = 3.
           SET HANDLER me->on_tree_checkbox_change FOR gr_alv_0200.
         ENDIF.
       ENDMETHOD.
    METHOD tree_add_node.
         DATA: ls_node_text TYPE lvc_value.
    * set item-layout
         DATA: lt_item_layout TYPE lvc_t_layi,
               ls_item_layout TYPE lvc_s_layi.
         ls_item_layout-fieldname = gr_alv_0200->c_hierarchy_column_name.
         ls_item_layout-style   = cl_gui_column_tree=>style_intensifd_critical.
         ls_item_layout-class   = cl_gui_column_tree=>item_class_checkbox.
         ls_item_layout-editable = 'X'.
         APPEND ls_item_layout TO lt_item_layout.
    * add node
         ls_node_text =  is_data-name.
         DATA: ls_node TYPE lvc_s_layn.
         ls_node-n_image   = space.
         ls_node-exp_image = space.
         CALL METHOD gr_alv_0200->add_node
           EXPORTING
             i_relat_node_key = iv_parent
             i_relationship   = cl_gui_column_tree=>relat_last_child
             i_node_text      = ls_node_text
             is_outtab_line   = is_data
             is_node_layout   = ls_node
            it_item_layout   = lt_item_layout
           IMPORTING
             e_new_node_key   = ev_node_id.
       ENDMETHOD.
    in my current class I've method on_tree_checkbox_change to handle the event. If the event is registered, the method gets called.

    Solved by my own:
    I had to implement method get_registered_events( ), append the new event to the table and call set_registered_events( ).
    The table from get_registered_events( ) is already filled with events.

  • Addon 9000000X failed with exception; Event type X

    Hi SDK experts,
    We had a problem with occurrence intermittent, something that we identified with relation on wait of response of event.
    The problem is:
    My addon need to submit XML files to some webservices. In some cases this files will be send on batches, what causes the response time to events on addon is to much large.
    In this cases, when the response time is much large, the B1 overthrow the addon.
    In compiled mode the message is not shown. This evidence was achieved on debug time.
    The error message is "Addon 90000002 failed with exception; Event type 6"
    The paleative solution was implement a thread to release the event. But threads on addons can be a problem.
    What the opinions?
    We need a solutions. Our addon is a market product for process accounting and fiscal.
    regards.
    Daniel Weissmann

    Hi,
    You may check this thread first:
    Addon Crashes
    Thanks,
    Gordon

  • Registering events for own GUI controls

    Hi,
    I refer to the blog
    <a href="/people/thomas.jung3/blog/2004/09/01/using-net-windows-controls-in-the-abap-control-framework:///people/thomas.jung3/blog/2004/09/01/using-net-windows-controls-in-the-abap-control-framework
    In the mean time I was successful regarding the display of the media player inplace in the SAPGUI. But I didn't succeed with event handling of native events. The redefined method 'dispatch' is never called, altough I registered events as:
      DATA: my_simple_event TYPE cntl_simple_event.
      DATA: my_simple_events TYPE cntl_simple_events.
    ****Register Media Player Events with CFW
      my_simple_event-eventid = go_mp3->evt_endofstream.
    Specify that it's an application event
      my_simple_event-appl_event = 'X'.
      APPEND my_simple_event TO my_simple_events.
    Redefine SET_REGISTERED_EVENTS
      CALL METHOD go_mp3->set_registered_events
        EXPORTING
          events                    = my_simple_events
        EXCEPTIONS
          illegal_event_combination = 1
          OTHERS                    = 2.
    ****Set Event handler for Media Player
      SET HANDLER g_application->handle_end_of_stream FOR go_mp3.
    Does anybody have an running example, e.g. for the event handling of 'STOP button clicked' event in the media player?
    Furthermore: Is there a free download of the OLE object viewer?
    Thanks a lot,
    Thomas

    Hi Juergen,
    Sorry - not an answer. But I would like to hear from you if you manage to solve this problem. I am also working on using a custom COM object (VB.NET) in the SAPGui and am battling to capture events triggered by the control.
    In particular I am trying to find the eventID of an event so that I can register it in SAP - do you know how to capture and view the event ID of lets say the mouse 'click' event of your control?
    How are you identifying your events and registering them in SAP?. I have very little experience in Delphi - but I'm hoping COM is universal enough?
    Hope you find your answer! Sorry I only have questions!
    Regards,
    Neil

  • Register event in producer consumer design pattern

    Hello wire workers,
    I am fairly green when it comes to dynamic event registration, so my understanding of it is probably quite flawed, but what I have implemented seems to work fine.
    Assuming a fairly typical queued producer/consumer state machine architecture.
    Up till now, I have done the dynamic event registration outside (i.e. to the left of) the UI loop, so all events get registered before the UI loop starts to run.
    My question is:
    How can I register events from inside one of the consumer loops? I cannot wire it...
    Maybe an example will make my scenario more clear.
    I have a DAQ loop (queued state machine). In the init state of this loop I want to register a digital input such that changes on a line are handled by my main event structure (in the totally separate UI loop). Is this possible?
    I look forward to hearing positive answers
    nrp
    CLA

    The best way to send data from the Consumer Loop to the Producer Loop is through User Events. What you will want to do is create a User Event whose data type is the registered DAQmx event refnum. Then when you register the DAQmx event in the Consumer Loop, fire the User Event with that new refnum and update the registration in the Producer Loop. That's probably hard to wrap your head around in words, so I'll attach a dummy example and pic below. Hope this helps!
    VI Saved in LV85.
    Message Edited by Jarrod S. on 04-21-2008 12:54 PM
    Jarrod S.
    National Instruments
    Attachments:
    DAQmx Event.vi ‏30 KB
    DAQmx Event Pic.PNG ‏38 KB

  • Extending EventDispatcher with dynamic event types

    I'm currently trying to write my own class to extend the
    EventDispatcher class. My goal is to create a Service class which
    acts as a switchboard for incoming socket data. Incoming socket
    data is parsed to create an Event which is Dispatched to the
    appropriate Service object which dispatches the event to any
    registered listeners.
    The problem I'm having is that I'm confused about how to
    handle the event types -- the string parameter which is always
    supplied as the first argument to the addEventListener() function.
    In all the examples I've seen, the value supplied is a class
    constant like MouseEvent.CLICK or VideoEvent.READY. In the case of
    my application, I want the developer to define their own Event
    types without having to go and edit my class files. In other words,
    I'd like to use dynamic event types with my class--maybe something
    like the code I've attached.
    I'm not new to Actionscript but am very new to the
    EventDispatcher class. I'm wondering a bit what that first
    parameter really does in a strict programming sense -- i haven't
    seen it explained all that well in the piles of documentation I've
    read on the Adobe site so I don't really know if I need to define
    my own Event class or what and whether I have to define all those
    possible event type constants/strings in advance or what.
    Any help/advice would be much appreciated.

    I have looked it up here:
    Actionscript
    3.0 Language Reference
    and it just says that the first arg to 'addEventListener' is
    "The type of event" with no further explanation at all.
    I have read this:
    Flash
    Quick Starts: Programming With Actionscript 3.0: Event handling
    It doesn't help much either. It tells me I need the
    appropriate event object which makes me wonder DO I NEED MY OWN
    CLASS? For that first ard to addEventListener, it merely says
    "Substitute the appropriate constant". Given that I want to use
    dynamic types (i think so anyway) that is not helpful information
    either. Every single example on that page uses a class constant for
    event type.
    It links to
    this
    which says "First, the name of the specific event you want to
    respond to. Once again, each event is affiliated with a specific
    class, and that class will have a special value predefined for each
    event--sort of like the event's own unique name, which you should
    use for the first parameter." Still no useful detail about what
    that arg does and the insistence on constants.
    The quick start page also has a link title "Handling Events"
    in Programming ActionScript 3.0 but it links to some documentation
    titled "Working with XML". The only discussion of events in that 10
    or so pages is because some user posted a comment.
    I have read this
    entire
    article which is more helpful than anything in the flash docs
    but still doesn't answer all my questions which (AGAIN) are:
    1) What is the real function of the first argument to
    addEventListener? I have not seen a clear explanation anywhere.
    2) Do I need to write my own Event class?
    3) What about dynamic event types that are defined at
    runtime? Are there any pitfalls or risks that arise from using a
    string instead of a predefined constant as the first param to
    addEventListener() ?
    Please stop telling me to read the documentation. I've been
    reading it for days.

  • Recursive ActiveX register event callback VI

    Hi!
    I am trying to control a motor in LV2013 using the ActiveX concept. When I use a "register event callback VI" function, can I call the same VI that calls a VI (with the "stop rule" controlled be the user data terminal, of course, inside)? By default, callback Vis that one can create for this are all reentrant (preallocated clone) and synchronious (according to help). However, both when I use the "server VI reference" ("This VI") and when I create a reference and browse for the same file - "register event callback" shows me a broken wire.

    _Basil_ wrote:
    As far as I understood, putting a  movement method in the loop will not give any result, so I tought in the direction of the recursive callback. However, I found this post. Would you in general agree that the callback VI cannot be recursive? I attach my code in LV13 (if you need me to convert, I will)
    Sorry, I'm still on LabVIEW 2012 here, so can't look at your VIs. I don't understand your comments in these sentences though. What do you mean by putting a movement method in a loop will not give any result? And why would you ever want a recursive callback? The callback is called each time the event occurs. There's no sense in making it recursive, nor would you want to re-register for a callback on an event inside a callback VI. Normally a callback should contain very little logic; it should primarily pass some piece of information (through a queue, user event, etc) back to the main thread and let the main logic handle it.

  • Event Type Linkages: Status "1 errors"

    Hi,
    we got an error in Event type linkages. One event type is on error and it can't be manually switched back to "No errors" because it's not modifiable.
    The error occurs all of the sudden, the workflow could be triggered properly before.
    Did anyone got an idea of what I can do?
    The BOR type and event seems to be okay. The workflow too. Only the event background job wasn't running, but I restarted him.
    Anyway I got this error.
    Thank you in advance!

    Hi,
    with event job, you mean the event queue? this job isn't used that much anymore only in specific cases does it serve a purpose.
    What you can do is go to transaction SWEQADM to see which events are in error, also check there who the workflow administrator is. This person/position/whatever should've received a message about the event being stopped.
    To fix it you could activate the event-->wf linkage in a transport and import that in production, or in severe cases ask basis / authorization to open the production client for changesand reactivate the linkage. But only do that when you have found out the cause.
    There is probably a valid reason why you want to stop the workflow whenever an error occurs in the event.
    Kind regards, Rob Dielemans

  • Missing BRF implementation class 0EV001- register Event in BRF

    Hi I am trying to get an understanding of BRF and have started working though the SAP Help and have got to the How to develop an application. I have ran reports BRF_INITIALIZE. Used tcode BRFAPL01 to create an Application, ran BRF_COPY_IMPL_CLASSES, ran BRF to define the cross app features. I have created the ABAP program to raise the BRF event.
    The problem is that when i try and register my event in BRF and follow the help it tells me to use the event implementation class 0EV001 which it says is the SAP standard. This implementation class is not in the list of classes. Infact there are no event type classes.
    Can anyone tell me where i can get the implementation class 0EV001 and how i get it into my client so i can use it?
    Thanks Trev B

    HI,
        Actually after seeing your post, i checked in 3 systems where i have done the BRF. But i couldnt find in any of them.
    So we need to create the implementation class which supports our event.
    Reward points if found helpful.
    Regards,
    Seema

  • Executable and Register event callbacks

    Hi,
    I have been running into an issue regarding the building of an executable that has register event callbacks (specifically Test Stand Callbacks).  The VI that is responsible for setting up the event registration is an asynchronous VI.  During development everything works but during deployment of an executable the Callback is either not running or capturing the event from the Test Stand engine (I am looking for the end of execution event).  The setup is not reporting an error, and the pathing to the callback VIs is correct.  Any Ideas on this?
    Does the Teststand engine not post a endexecution callback when running from a executable labview environment?
    Thanks,
    Andrew
     

    akonecki wrote:
    Hi,
    I have been running into an issue regarding the building of an executable that has register event callbacks (specifically Test Stand Callbacks).  The VI that is responsible for setting up the event registration is an asynchronous VI.  During development everything works but during deployment of an executable the Callback is either not running or capturing the event from the Test Stand engine (I am looking for the end of execution event).  The setup is not reporting an error, and the pathing to the callback VIs is correct.  Any Ideas on this?
    Does the Teststand engine not post a endexecution callback when running from a executable labview environment?
    Thanks,
    Andrew
    The TestStand engine is singular regardless of what is hosting the components so it will post the appropriate callbacks. Try some tracing and see what flags up in your callback VI.

  • Dynamicall​y register event mouse move

    I try to understand dynamically register for events.
    In this NI example of "Dynamically register for events.vi",  the first register events (outside the while loop), if I change the top item "mouse move" to something else, I cannot select "mouse move" event anymore, in the pull down arrow, there is not a "mouse move" as a selectable item. 
    Can anybody explain this?  I have to close VI without saving.
    When I make change to the event, in the event structure, there will be a case "unknown event" displayed.
    My other question is: how does the program knows the difference between mouse outside the picture control?
    I know that when I press the mouse button down on the picture then the iteration starts to count,  I just don't understand how the program knows the difference, it is not obvious to me.
    regards

    You should try working with standard events before using dynamic events.
    As for your questions:
    The dynamic events available in the event structure are determined by the dynamic event terminal (inside the right red square in the image below). When you change the Mouse Move event, it is no longer available and you have to configure the event structure to use another event.
    The Mouse Up and Mouse Down? events are registered for all the controls (left red square), so clicking on any control would generate those events.
    There should be a tutorial on this site about using dynamic events. You can use the search engine to find it. Also, reading the LabVIEW help on this is a good idea.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!
    Attachments:
    Dynamically Register for Events.png ‏6 KB

  • DBM Time recording Event type sequence

    Hi Experts, Is it possible to define the sequence for time recording event types in standard? Currently we are able to perform the end order event before the Start order event. The entry gets stored in table /DBM/TM_TEVENT. Another example is - We can perform the Clock Out event type before Clock IN. These event types should be in sequence. System should not allow to perform Clock Out if Clock IN has not happened for the day. Is there any way out to fulfill the above requirement. Kindly suggest. Regards, T.R.S.Praveen

    Try below suggestion, in my opinion there isn't a standard config to define the sequence since there cannot be a fixed sequence since requirement might differ from customer to customer:
    When time events are entered at DBM time recording terminals, the system logs a time event for a personnel number in a first step, and in a second step CATS data records are created from the sequence of the logged time events.
    You can influence the posting of time events of a DBM time recording terminal in CATS by using the BAdI /DBM/BADITM_TEVENT_PROC.
    You can use the BAdI method ACTION_AFT_CHECK_TIME_EVENTS to process the CATS records generated from the time events before they are saved to the database. The method supplies the current personnel number, the current terminal key and the affected time events for information purposes; you can change the proposed CATS records that are to be saved.
    Regards,
    Sachin Balmiki

Maybe you are looking for

  • Erro CX_ST_MATCH_ELEMENT no PI após implementação do SP06

    Pessoal, Após a implementação do SP06 do GRC (a versão anterior era a SP03), não estamos conseguindo mais ter as aprovações das notas. O processo para no GRC durante a assinatura da nota, mais especificamente após a execução da SENDER INTERFACE SIGNN

  • Check Db fails after kernel patch update

    Hi, I've updated kernel 710 to the latest patch "159" on my PI 7.10 system, however now Check DB fails when scheduled from DB13 with a "Scheduling failed" error. We have SQL 2005 & I'm able to execute the job succesfully via the SQL Managemnt console

  • Cannot drop user -must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables

    Hi, I had this issue before, but forgot the command that should be used to flush some kind of a trash bin. Can someone assist me? Thanks!

  • Iphone and elements

    Having trouble downloading photos from iphone to elements.  Using an older version of elements(4.0).  Elements encounters and error when "getting photos".  help  over capacity on memory on iphone and need to download photos to photoshop.

  • DoS attack

    Hi! Our webservice is based on WebLogic stateless session bean sample. As it was done in the sample, I used to create the connection object like this: theMyConnect = new MyConnectService(theURI).getMyConnectServicePort(); I create new object for each