SetCtrlVal on a "string control" is requesting run-time "int" data

Hi,
We at KPIT Cummins are using LabWindows for one of our automotive projects. We have a GUI with multiple tabs and one of our string text boxes is popping up the below error (also attached jpeg).
FATAL RUN-TIME ERROR:   "Temp.c", line 2642, col 38, thread id 0x00000F4C:   Invalid argument type: found 'pointer to char', expected 'int'.
We have tried to debug this project and we believe that the line giving us an issue is:
ret_val=SetCtrlVal( h_Tab_Intgd[INTGD_CFG_DATA_TAB], INTGDTAB_ACCXSCAL​E, aa_uc_Temp_Array );
where,
h_Tab_Intgd[INTGD_CFG_DATA_TAB] is an array of handles for the form (stores all handles for the tabs)
INTGDTAB_ACCXSCALE is the name of the string object (exact constant name as it appears in the LabWindows created .h file for GUI constants)
and aa_uc_Temp_Array is an array of characters. (currently holding "0.000000\n")
There is another form in our code that has a similar feature but with a different constant ID...and the SetCtrlVal seems to work for that form. We do not understand why it gives a runtime error for this particular form.
This project code is a big chunk of code and we cannot currently share the project due to a confidentiality clause. Can you help us find the exact problem with what little information we have shared ?
Solved!
Go to Solution.
Attachments:
temp.jpg ‏19 KB

This is an error that I happen to face sometimes, especially with tab controls; in my experience every time I have eventually found that the panel handle was wrong: may it be that your handle arrays ir rewritten somewere so that it holds incorrect values?
If I were you I'd place a breakpoint where you retrieve the panel handle for the tab page and another on faulting SetCtrlVal line, comparing the panel handles in both places.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    Why not use an event
    Add a While Loop, inside the loop add the Event Sructure.
    Now in the event structure selecd the String Controls.value change event to
    react
    and the new value inside the event that you get,( connect to the String
    indicator box.
    On Sun, 10 Aug 2003 15:58:47 -0500 (CDT), WiltonFilho wrote:
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

  • What If want Running Time or Date with Time.

    Hi All.
    And thanks to those who replied.If u see my discussion "No Hard Coded Date", If I want running time or Date with the Current Time then how would I do that. Thanks to u all guys,actually I m new to JSP.

    hey
    in java.util.Date class u can find lot of methods like getTime()

  • Solve 'String Equation' at the run time

    Can any one help me how to solve String Equation. I get equation and its respective values from database table and i want to solve the equation at run time.
    Ex: (round (x * y) / 1000) /1000
    Please help me as i am new to Java envionment.
    Thanks
    Raveesh

    For a small footprint Java interpreter have a look at BeanShell.
    kind regards,
    Jos

  • Unable to create CrystalReportViewer control programatically at run time

    Hi
    I'm not sure the best place to post this, so I'm placing it in Crystal Reports and BusinessObjects Enterprise.
    I'm using Visual Studio 2010 to create a web application which will serve as a reporting portal for BOE XI 3.1.
    I first installed Crystal Reports for Visual Studio 2010 and dropped a CrystalReportViewer onto a web form at design time.
    However, when setting the ReportSource property, I was encountering memory corruption errors.
    I've since read the release note and have realised that Crystal Reports for Visual Studio 2010 isn't compatible with BOE XI 3.1.
    So, I've unistalled Crystal Reports for Visual Studio 2010.
    Now I am trying to create the CrystalReportViewer at run time. I am able to successfully set the ReportSource property without getting memory corruption errors - which is good news, but I simply do not see the CrystalReportViewer control.
    Here's my code:
    WebForm1.aspx
    <%@ Register assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
    WebForm1.aspx.cs
    protected void Page_Load(object sender, EventArgs e)
        CrystalReportViewer myCrystalReportViewer;
        myCrystalReportViewer = new CrystalReportViewer();
        myCrystalReportViewer.ID = "CrystalReportViewer1";
        myCrystalReportViewer.AutoDataBind = true;
        myCrystalReportViewer.HasRefreshButton = true;
        myCrystalReportViewer.ReportSource = @"C:\temp\myreport.rpt";
        myCrystalReportViewer.DataBind();
        Panel1.Controls.Add(myCrystalReportViewer);
    Web.config
    <compilation debug="true" targetFramework="4.0">
        <assemblies>
            <add assembly="BusinessObjects.Enterprise.Providers, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />
            <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
            <add assembly="CrystalDecisions.Shared, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
            <add assembly="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=B32731D11CE58905" />
            <add assembly="CrystalDecisions.ReportSource, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
            <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
            <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
            <add assembly="CrystalDecisions.CrystalReports.Engine, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
            <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
        </assemblies>
    </compilation>
    <httpHandlers>
        <add verb="GET" path="CrystalImageHandler.aspx"
        type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    </httpHandlers>
    Everything compiles and runs fine - I just don't see anything on my page.
    I've tried adding a TextBox in exactly the same way and it displays just fine.
    What am I doing wrong or not doing?
    Surely it must be possible to add a CrystalReportViewer at run time.

    You left out the snippet of code that places the viewer in the HTML in the aspx file.
    Is it there?  That should describe its placement and sizing. The tag should be named CR:CrystalReportViewer (since you've set the TagPrefix to "CR").
    Sincerely,
    Ted Ueda

  • Increasing Max run time in DATA load

    Hi,
    I know to increase the maximun run time we have to set in the infopackage level or RSCUSTV2 or from Monitor
    My question is how to increae the time for the dataload when the load is happenning.
    Assume the r/3 job is running and the BW job is going to be red due to timeout setting. I want to extend this time out time during this dataload...
    How to do that ?
    Thanks

    HI
    Pvc
    This is a basis job you will have to chnage the setting of the profile.
    Tcode is RZ10
    select your profile
    look for max_wprun_time
    you will have to increase it here
    You will have to restart the server after doing this.
    Contact your basis team to do this
    Hope this helps
    K.Mohan

  • String Tokenizer hanging at run-time

    //Creating the object array and reading values into it
    try{
    String fileName = "BOBSDB.txt";
    //connect the stream tokeniser to the file
    FileInputStream stream = new FileInputStream(fileName);
    InputStreamReader iStreamReader = new InputStreamReader(stream);
    BufferedReader bufReader = new BufferedReader(iStreamReader);
    StreamTokenizer reader = new StreamTokenizer(bufReader);
    try{
    BookList1729731[] BookList = new BookList1729731[10];
    int arrayCounter = 0, readerCounter = 0, isbn = 0, numInStock = 0;
    String title = "";
    float price = 0;
    reader.nextToken();
    while(reader.ttype != StreamTokenizer.TT_EOF){
    while(reader.ttype != StreamTokenizer.TT_EOL){
    switch(readerCounter){
    case 0:
    isbn = (int)reader.nval;
    break;
    case 1:
    title = reader.sval;
    break;
    case 2:
    numInStock = (int)reader.nval;
    break;
    case 3:
    price = (float)reader.nval;
    break;
    readerCounter ++;
    BookList[arrayCounter] = new BookList1729731(isbn, title, numInStock, price);
    readerCounter = 0;
    arrayCounter ++;
    catch(IOException e){
    JOptionPane.showMessageDialog(null, "error in file input:" + e);
    catch(IOException e){
    JOptionPane.showMessageDialog(null, "error in opening file for input:" + e);
    The code compiles fine but when I run the program it hangs. If this section of the code is commented out it opens fine so it must be here somewhere.
    Stu

    Here is a working version, I just tried it on my computer:
    String fileName = "data.txt";
    FileInputStream stream = new FileInputStream(fileName);
    InputStreamReader iStreamReader = new InputStreamReader(stream);
    BufferedReader bufReader = new BufferedReader(iStreamReader);
    BookList1729731[] BookList = new BookList1729731[10]; //make sure your file does not have more than 10 lines
    int arrayCounter = 0;
    String line = "";
    while ( (line=bufReader.readLine()) != null) {
         StringTokenizer st = new StringTokenizer(line, ",");  //assuming comma delimited data
         int isbn = Integer.parseInt(st.nextToken());
         String title = st.nextToken();
         int numInStock = Integer.parseInt(st.nextToken());
         float price = Float.parseFloat(st.nextToken());
         BookList[arrayCounter] = new BookList1729731(isbn, title, numInStock, price);
         arrayCounter++;
    }

  • Using the instance manager to control subforms at run time

    Hi,everybody.
    I encountered a question when I put the code "subFormName.instanceManager.addInstance(1);"
    into the subForm's initialize event to dynamic create a new subForm(it's a XDP document).It create 3 new subForms below the original subForm,but when I put the same code into a button's click event or save the document as "Acrobat 7 (static) PDF Form" format,it's all right.what's wrong with it?
    I need your help.
    Best regards.

    There are some restrictions concerning what one can do in each event. I imagine that you can't add instances into a subforms initialize event. If you need three more instances to show, set the minimum on the Object Binding tab to four.

  • Run time error data retrieval

    hi all
    am creating a normal alv reprt using
    <b>perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.</b>
    but am getting a error in the form data retrieval the form is as below
    <b>form data_retrieval.
    select FBUDA VBELN WERKS LGORT NETWR
      UP TO 10 ROWS
      from vbrp
      into table IT_VBRP.
    endform.                    " DATA_RETRIEVAL</b>
    please help me out from this.
    with regards
    vijay

    here the order of fields u r selecting is different from the strucure of the table...
    try this ...
    form data_retrieval.
    select FBUDA VBELN WERKS LGORT NETWR
    UP TO 10 ROWS
    from vbrp
    into <b>corresponding fields of </b>table IT_VBRP.
    endform. " DATA_RETRIEVAL
    reward if it helps u..
    sai ramesh

  • Modifying a Application Substitution String in Run-time

    Hello all,
    I have a substitution string defined in an application (under application definition) that needs to be different based on whether the application is on a development server or a test server. Is there a way that I can alter the value of that subsitution string on my test run-time instance after I've brought the application in from development? Perhaps an API call? APEX_INSTANCE_ADMIN doesn't appear to have anything for this.
    Or do I have to either do a test in code and set an application item when the application starts up, or pull it from a database table or constant?
    Thanks!
    John

    Shane,
    SubVersion works with files, so everything you do has to be a file, including all of your PL/SQL procs / functions / packages. If you have "cowboy coders" editing packages in the database with SQL Developer or TOAD, that's the first thing that needs to change. I regularly export my APEX apps and check them in. I also make a DDL-only backup of any schemas I'm working on at major mile-stones or before upgrades.
    There's a server and client component. The sever houses the repository and everyone checks projects out from and commits projects to the server. On the client-side, the TortoiseSVN client is by far the most popular Windows client. It perfectly integrates with Windows so you can right-click a file and lock, update, commit it.
    To work on a project, you:
    - check it out from the repository. you typically only do this once as you keep a working copy on your client pc.
    - get a lock on a file you want to edit. This is optional, but it's my preferred method. Now you are the only one that can commit the file back to the repository.
    - make your changes to the file, once you are happy, simply right-click and select commit. you can then enter comments on the file.
    - now, anyone else who wants to edit that file will see your changes when they request a lock or issue the "update" command.
    You can review every version of the file, diff versions, "Tag" a version of your code, and the list goes on.
    After a few hours you'll be comfortable with the client process. I think the server component of it deters most people as you have a number of choices to make and it can be slightly complicated to install. For this reason, I STRONGLY recommend trying one of the hosting providers as then all you have to worry about is the client-side. Additionally, your code is now backed-up off-site.
    I don't have any personal experience with these services, but here are a few reasonably priced ones. The first one has a free option which is where I would start with a test project just to get a feel for it.:
    - https://www.projectlocker.com
    - http://svnrepository.com/
    For what it's worth, the APEX team uses SubVersion, as do many dev teams inside Oracle (not the DB dev team though). Also, the new https://samplecode.oracle.com uses Subversion as part of an offering from CollabNet. My 1st project hosted there is called logger . You can brows the logger subversion repository here: https://logger.samplecode.oracle.com/source/browse/logger/
    Links:
    - [TortoiseSVN Client|http://tortoisesvn.tigris.org/]
    - [SubVersion Server|http://subversion.tigris.org/]
    Tyler Muth
    http://tylermuth.wordpress.com
    [Applied Oracle Security: Developing Secure Database and Middleware Environments|http://sn.im/aos.book]
    Edited by: Tyler on Nov 17, 2009 2:57 PM

  • Can we populate UI Element Dropdownbykey at run time

    Hi All,
    Can we populate UI Element dropdownbykey at run time, I am able to populate R/3 data in inputfield type UI element, but how to populate it in dropdownbykey UI element, is it possible??
    Thanks in advance

    Hi Amit,
    Yes we can populate dropdownbykey UI element at run time using data from the R/3. For doing this, try to understand the below given code:
    empCode - Which you bind to the DropDownByKey.
    IContextElement contextElement = wdContext.currentContextElement();
    IWDNodeInfo nodeInfo = wdContext.getNodeInfo();
    IWDAttributeInfo dateAttributeInfo = nodeInfo.getAttribute(contextElement.empCode);
    IModifiableSimpleValueSet dropValueSet = dateAttributeInfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
    String empCodeTxt=null;
    //Gives the Size of the List, which is coming from Model
    int nodeLength = wdContext.node<BAPIList>().size();
    for (int i = 0; i < nodeLength; i++) {
    // Gives the Value, which you want to show in Drop Down List Box..
    empCodeTxt=String.valueOf(((IPrivate<viewname>.I<BAPIList>Element)(wdContext.node<BAPIList>().getElementAt(i))).get<Parameter>());
    dropValueSet.put(empCodeTxt, empCodeTxt);
    This piece of code has been taken from the following thread:
    https://forums.sdn.sap.com/thread.jspa?threadID=215743&tstart=0
    Bye
    Ankur

  • Is there a way to force the cursor into a string control when a vi is called

    In a .vi I'm wrighting I need to input a new serail number at the beginning of each run. Is there a way to force the cursor into the string control box every time the start screen returns? eliminating the need for the operator to move the mouse around and click.
    I would like to THANK all that have replied to my questions in the past. It has been a big help!
    Thanks
    TeBlues

    ah, problem solved.  what a community.
    Message Edited by Space_Flight on 11-20-2006 10:08 AM
    Attachments:
    keyfocus.jpg ‏83 KB

  • How to save data in a string control?

    I want to save data in a string control or indicator. I know that I can rt-click and make the data default. But can it be done through a proberty node or something else when the program is running?

    There isn't a "Make Current Value Default" method that you can invoke programmatically, this would require your VI to be saved when it was closed, which obviously couldn't be done if it had been built into an executable.
    You could read the values from the controls/indicators and save them in a .ini file using the Configuration File VIs on the File I/O palette, and have some code at the start of your program that reads the values from the file and puts them into the objects using local variables.

  • How to change the numbers of items in a ring control in run time ?

    Hi !
    I would like change the numbers of items in a ring control in run time, but I can´t.
    Thanks.

    Hello blaze,
    did you try the "Strings And Values []" property of the ring?
    LabView7.1 help says:
    Array of clusters containing the strings from which you can select in the ring control
    and the numeric values for each item. Use the Strings [] property if you do not need to
    assign specific numeric values to each item.
    Best regards,
    GerdW
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to use database control to execute sql queries which change at run time

    Hi all,
    I need to execute sql queries using database controls , where the sql changes
    at run time
    based on some condition. For eg. based on the condition , I can add some where
    condition.
    Eg. sql = select id,name from emp where id = ?.
    based on some condition , I can add the following condition .
    and location = ?.
    Have anybody had this kind of situation.
    thanks,
    sathish

    From the perspective of the database control, you've got two options:
    1) use the sql: keyword to do parameter substitution. Your observation
    about {foo} style sbustitution is correct -- this is like using a
    PreparedStatement. To do substitution into the rest of the SQL
    statement, you can use the {sql: foo} substitution syntax which was
    undocumented in GA but is documented in SP2. Then, you can build up
    the filter clause String yourself in a JPF / JWS / etc and pass it into
    the DB control.
    For example:
    * @jc:sql statement="select * from product {sql: filter}"
    public Product[] getProducts(String filter) throws SQLException;
    This will substitute the String filter directly into the statement that
    is executed. The filter string could be null, "", "WHERE ID=12345", etc.
    2) you can use the DatabaseFilter object to build up a set of custom
    sorts and filters and pass that object into the DB control method.
    There have been other posts here about doing this, look for the subject
    "DatabaseFilter example".
    Hope that helps...
    Eddie
    Dan Hayes wrote:
    "Sathish Venkatesan" <[email protected]> wrote:
    Hi Maruthi,
    The parameter substituion , I guess is used like setting the values for
    prepared
    statements.
    What I'm trying to do , is change the sql at run time based on some condition.
    For example ,
    consider the following query :
    select col1,col2 from table t where t.col3 > 1
    At run time , based on some condition , I need to add one more and condition.
    i.e. select col1,col2 from table t where t.col3 > 1 and t.col4 < 10.
    This MAY not address your issue but if you are trying to add "optional" parameters
    you may try including ALL the possible parameters in the SQL but send in null
    for those params that you don't want to filter on in any particular case. Then,
    if you word your query
    as follows:
    select col1, col2 from table t where t.col3 > 1 and (t.col4 = {col4param} or
    {col4param} is null) and (t.col5 = {col5param} or {col5param} is null) ...
    you will get "dynamic" filters. In other words, col4 and col5 will only be
    filtered if you send in non-null parameters for those arguments.
    I have not tried this in a WL Workshop database control but I've used
    this strategy dozens of times in stored procedures or jdbc prepared statements.
    Good luck,
    Dan

Maybe you are looking for