Frealloc32 is ok ,but disconnect db link occur error

TUXEDO 9.1
windows xp pro+sp3+
Oracle client 10.2.0.1
OCCI+XA
my code :
stmt_temp = conn->createStatement(ls_sql);
while (rs->status() == ResultSet::DATA_AVAILABLE)
ll_right_id = rs->getNumber(1);
Fadd32(l_output,RIGHT_ID,(char *)&ll_right_id,0);
long ll_free = Funused32(a_buf);
if (ll_free <=min_buf_size)
l_new_buf = Frealloc32(l_output ,0,(FLDLEN32)(ll_total+outbuf_size*2));
l_output = l_new_buf;
stmt_temp->closeResultSet(rs);
conn->terminateStatement(stmt_temp );
realloc is ok,but terminateStatement occur crash,I try three case.
case 1:alloc outout buf enough large,then no need realloc.result is ok
case 2:only comment terminateStatement,result is ok
case 3:only comment Frealloc32,result is ok
I think frealloc distory stmt_temp ,so occur terminateStatement crash.
who can help me???

There is coding issue in the function Realloc that you can not change l_output buffer by this way. At least a double pointer needed, such as &l_output and Realloc(char **) should be declared.
So the correct code looks,
//alloc output buffer
l_output = (FBFR32 *)tpalloc("FML32",NULL,outbuf_size);
while (...)
//get var from resultset
ll_right_id = rs->getNumber(i);
//add var to output buffer
Fadd32(l_output,RIGHT_ID,(char *)&ll_right_id,0);
//call function Realloc
Realloc(&l_output);
//function Realloc
int Realloc(FBFR32 **a_buf)
FBFR32 *l_new_buf;
long ll_free = Funused32(a_buf);
if (ll_free <=min_buf_size)
//realloc temp buffer.size += oldsize
l_new_buf = tprealloc(a_buf ,0,(FLDLEN32)(ll_total+outbuf_size));
if (l_new_buf == NULL)
return -1;
//change pointer
*a_buf = l_new_buf;
return 1;
Now the l_output points the new allocated buffer.
Wayne

Similar Messages

  • Error 7 occurred at ABAPI Dist Report Read Link Info Error.vi - [.....] - RTBUIP_Build_Invoke.vi.ProxyCaller

    Hi all,
    I am on a field campaign with my Labview-controlled instrument. I wanted to make a small change to the code and build it again for uploading to a cFP-2020 Fieldpoint but the application builder stopped with the following error message:
    Error 7 occurred at ABAPI Dist Report Read Link Info Error.vi -> ABAPI Dist Cmp Settings to Disk Hier.vi -> ABAPI Get Settings From File2.vi -> ABAPI Get Settings From File.vi -> RTBEP_Invoke_Build_Engine.vi -> RTBUIP_Build_Invoke.vi -> RTBUIP_Build_Invoke.vi.ProxyCaller
    This is another computer than the one I used in the lab previously so might have forgotten to install something. I just copied the whole application folder with project file and subfolders
    to the Laptop I am using now. Labview version should be the same though (8.20).
    Any suggestions?
    Olaf

    Hello Olaf,
    This error is usually found when a subVI or a support file (DLL, custom control, etc)
    isn't able to be found by the application builder.  Possible reasons
    for this could include subVIs no longer located in their original
    paths and in need to be relinked, a DLL that isn't included in the build,
    and many other possibilities.
    You wrote that you copied the project from another PC, so it is very possible that some file went missing. Are all VIs in your project executable?
    You could try to mass compile all the VIs in your project and see if that helps.
    Regards,
    Johannes
    AE, NI Germany

  • How do I delete duplicate songs, but keep a link in their original albums to the single copy of the song left, so it will play in each album in sequence as if it were still there?

    Greetings!
    After importing my 300 or so CDs into iTunes, I found I have tons of duplicate songs.
    Example: I have a song that came in a original album, then in again in a "Greatest Hits" album, then again in a "Hits of the 80's" album, and again in a soundtrack album. I have now have 4 copies of the exact same song.
    How do I delete duplicate songs, but keep a link in their original albums back to the single copy of the song left, so it will play in each album in sequence as if it were still there?
    I don't think this currently exists, but as my library keeps growing the duplicates keep growing.  It would be nice if Apple sees this and adds a way to link songs to multiple albums.
    I don't want to create a custom playlist for every album that has a duplicate song or two (I'd have dozens of playlists) - thought about fixing it that way but not really practical.

    To my knowledge, there is no way of doing what you want. The only workaround is to create playlists for the other albums containing the track, but that isn't practical for most people.
    You could provide Apple with feedback here: http://www.apple.com/feedback/itunesapp.html

  • I seem to have fixed my problem of randomly occuring errors in my filterwheel control. But I don't know why this should actually work.

    Hi there,
    I am using a thorlabs fw102B filterwheel. It's connected via USB (simulating COM port, that's what it says in MAX). The second device is a camera, also connected via USB. The application is running 24/7, at least that's what it's supposed to do. LabView version is 8.6.
    The LabView code I wrote for this, was never really finished, meaning I totally ignored error handling in the first program version.  That never bothered me, because the program ran for weeks and months without any problem. Whenever I had to reboot my system it was not LabViews fault, but I was changing something else.
    Recently I was running into problems with the filterwheel (after a system reboot). However, I don't understand the error in the first place: The filterwheel is supposed to change position every 15 minutes, in between the camera is taking exposures, then the data is written to an ASCII-file (only ~156 kB). At first the error occured just once: the filterwheel was set to the wrong position for about 15 minutes, which might happen, as it is not really could in counting. A few days later it was in that wrong positon for one hour, so it didn't respond to the "move" order four times in a row. Finally I didn't move at all anymore. The error message I was getting is "0xFFFFFFF unkown status code". In my opinion the communcation to the filterwheel got lost somehow. I don't know a better explantion. 
    But why should it recover after some time?
    The problem usually occured at night, when nobody is there to watch.
    I investigated the behaviour in a second setup (see attachment). There is only the filterwheel connected. Through randomly unplugging the USB or power cable I was able to reproduce 'session handle is not valid', 'unkown status code' and 'session handle lost'. The program enters the 'true case', the session is to be closed and resetted, then it shall be reinitialized. This actually works as soon as the cables are reconnected. But why?
    The close.vi still returns 'session handle is not valid', The reset.vi returns the same, but initialize.vi returns 'No Error' and the system works again.
    What am I not getting here?
    I read some threads here and somebody mentioned for another instrument/problem to use the 'reset' command twice. So I tried 'close-initialize', 'reset-reset-initialize', 'reset-initialize' but only 'close-reset-initialize' works (not surprising). Yet I still get the same errors (probe 1 and 2). Am I introducing more bugs without knowing than I fixed?
    I AM CONFUSED.
    Carsten
    Attachments:
    error_catch.png ‏273 KB

    Hello Ulrich,
    thank you for your answer. Concerning the dataflow I agree and it is what I usually do. Actually I follow the dataflow paradigm whenever there is no problem (the 'false case' in the screenshot):
    “FW102x Initialize.vi” -> “FW102x Get Position.vi” -> “FW102x Set Position.vi”.
    Whenever there is a mistake, this just doesn't work with these drivers. The sequence
    “FW102x Initialize.vi” -> “FW102x Get Position.vi”  -> ///error/// -> “FW102x Close.vi”, “FW102x Reset.vi”  ;; “FW102x Initialize.vi”
    will give me errors for “FW102x Close.vi”, “FW102x Reset.vi”  and “FW102x Initialize.vi” reporting "session handle not valid". However, if I "bypass" the instrument handles directly from the first "Initialize" to "Close" and "Reset", they will report the same error, but the second "Initialize" will work again. I can even merge the first two frames and execute "Close" and "Reset" at the same time to do so. But whenever I try something else, e.g. do the 'correct' wiring, I am unable to close, reset or reinitialize. I have to restart LabView completely, to make the vi work again. So I guess the session is still hanging around somewhere in memory, but I can't access it anymore.
    Surprisingly, wherever I put Probes on the data handle wires they show the correct "ASRL5::INSTR" (with or without correct wiring). But only the "Bypass" wire makes the vi work. Since you couldn't find the drivers in the driver network, I guess they might just run into problems, if an error occurs.
    But thanks for your comment anyway. The problem is fixed for the moment. It's just that I prefer to actually know what I am doing here instead of producing some code I'd rather not show anyone.
    Carsten

  • Hello, I want to perform a simple task. I have two Adobe ID accounts linked to two different email addresses. One account i do not want to use anymore but it is linked to my main email account. the account i do not want anymore is still in its free stage

    Hello, I want to perform a simple task.I have two Adobe ID accounts linked to two different email addresses. One account i do not want to use anymore but it is linked to my main email account. the account i do not want anymore is still in its free stage and i have not purchased anything with it. My other Adobe ID account is linked to an email i rarely use and don't particularly want to use. i have tried changing the linked email account to my regular one i use. But it obviously does not allow me because of it already being linked to my other non used obsolete Adobe ID account. Is there any solution to this?? Please help.

    Adobe contact information - http://helpx.adobe.com/contact.html may help

  • I am trying to update my software through the app store but for some reason an error occurs and will not allow me to do so

    I am trying to update my software through the app store but for some reason an error occurs and will not allow me to do so. And when i go online to log into my apple id account it states that there is an error. Can someone help me solve this issue, its annoying me?

    Apple’s having trouble with the iTunes Store servers right now. Wait for them to resolve the issue.
    (123935)

  • My wife just purchased an iPhone. She has an Apple ID but it is linked to her gmail address. She wants to create her own iCloud email address but the setup tools don't let us do that.

    I have aniCloud account  apple id, linked to a MobileMe address (which I converted to an iCloud account)
    My wife just purchased an iPhone. She has her own Apple Id -- but it is linked to a gmail address.
    I wanted to create a new iCloud email address and account for her, but the Mail Setup won't let us use .icloud and keeps referring her back to log into the gmail server.
    How can we convert her gmail address to an icloud address if Mail Setup refuses to let her use icloud.com?
    One other issue: Her iTunes are linked to my account, and my wife would like her own separate account.

    Actually, I want her to have a separate iTunes account. Our marriage is fine, but our musical tastes are vastly different  That's another issue; right now want to focus on getting my wife in .icloud email address.

  • Our family has one Apple id.  We would like our children to have their own I'd but keep it linked to us.  How do we do this?

    Our family has one Apple id.  We would like the kids to have their own id's but want it linked to our main account.  How do we do this?

    Family Sharing and Apple IDs for kids

  • How to add a privacy page and exclude it from the main menu, but include in links at the base

    adding a privacy statement page and excluding it from the main menu, but including in links at the base of site

    Right click on the page in Plan view and choose to exclude from menus. This will take it off your main nav.
    For your bottom nav, change the menu to manual and add the privacy page manually.

  • I got a text message which had a link attached to it, i did click on the link, basically some job scam but on the link. Now i just want to find out if my phone has been compromised in anyway and what are the tell tell signs.

    I got a text message which had a link attached to it, i did click on the link, basically some job scam but on the link. Now i just want to find out if my phone has been compromised in anyway and what are the tell tell signs.

    your phone has not been compromised.  There have been no viruses, worms or trojan horses ever reported.

  • TS2446 my app store is not working, i tired signing in but showing me "An unknown error has occurred" my password is not wrong, please and someone help, because i need to update my macbook air. thank you

    my app store is not working, i tired signing in but showing me "An unknown error has occurred" my password is not wrong, please and someone help, because i need to update my macbook air. thank you... how can i make it work?

    I cannot sign out. When I go to the iTunes & App Stores in settings, The Apple ID field shows my id but it is faded and I cannot select the field.

  • Allt he links in the header of any websites are not working, I reinstalled fiorefix and it s the same. No problem in others browser. the tool bar is working but not the link sinside the web page located between the top 300px height

    all the links in the header of any websites are not working, the cursor is not changing into pointer and no way to click on any link located at the top of any website page. I reinstalled firefox and it s the same. No problem in others browser. the tool bar is working but not the links inside any web page located between the top 300px height.
    So I can t tlog into any website, i cant write an email as the compose button is located in the top of the page.. Please help, i have all my bookmarks into my firefox...

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • I have been using a free trial of photoshop cc and my computer crashed. Now it says up to date, but the program is not installed anymore. How can I re install it? I already uninstalled creative cloud and re installed it, but the same issue occurs.

    I have been using a free trial of Photoshop cc and my computer crashed. Now it says up to date, but the program is not installed anymore. How can I re install it? I already uninstalled creative cloud and re installed it, but the same issue occurs.

    Hi dmomoney24  ,
    Kindly refer : CC desktop lists applications as "Up to Date" when not installed.
    Please revert if the problem persists.
    Thanks,
    Atul Saini

  • Links in email won't open. When I click on a link, it goes to open tabs in FF, but the new link doesn't open.

    When I get a link sent in an email, the link no longer opens when I click on it. When I click on the link, Firefox and the open internet tabs appear on my screen, but the new link does not open. I must manually copy the link, then paste it in the address bar to get it to open.

    I have the same problem with FF 3.6.13, and Mac OS 10.6.5.
    Clicking links in Mail opens FF, but does not open the URL. Safari has no problems when I reset it as my default browser. The problem seems to develop over time. At first, links open fine, but then all of a sudden they won't.
    My remedy has been to reinstall FF, but I've had to do it twice in the last couple of weeks, which is getting a bit annoying.
    I have not experienced the problem on either of my two older Macs (running 10.4, and 10.5).

  • HT4623 i down loaded ios 6 now my phone wont turn on it has been 2 days and it is really bugging me it keeps saying link to itunes but it wont link itunes asks me to restore the phone and i dont want to loose my info ps i have itunes 10.7

    i down loaded ios 6 now my phone wont turn on it has been 2 days and it is really bugging me it keeps saying link to itunes but it wont link itunes asks me to restore the phone and i dont want to loose my info ps i have itunes 10.7

    you must restore i would put in dfu mode if it isnt asking to restore when you plug it in

Maybe you are looking for

  • Can I connect my iPad and MacBook Pro both via an iPhone hotspot?

    First, a little background. I have an aging MacBook Pro (~5 years old), and my netbook was smashed on the way to work last night. My cell phone (not an iPhone) crapped out a few weeks ago. So my first priority is to replace my netbook with an iPad. W

  • Midpan is not mid pan after output and other minor problems...

    Ok, so I have this procjet I am working on. I have one sync with a man and one background audiotrack with a choir. In my headphones I hear a perfect midpan. The audiobar/VUmeters in FXPX shows exactly the same levels as eachother, since I have been u

  • 10.3.1 updation interrupted.

    I am using BB Q10. I tried to update to the new OS 10.3.1. I could download the software but this got interrupted at 98% while instalation. Can someone help me to solve it?

  • How do I save photo attachments to iphoto

    I cannot get a photo sent to me to iphoto.  I've tried dragging, but nothing drags.  I've tried going to file\save attachments which seems to work but then the photo is no where to be found (and yes, I knew where I saved it.  I even tried saving to d

  • N82 Only default alarm tone

    I'm having the strangest problem: i can't change my alarm tone. I have a microSD card inserted, it has mp3s on it, the phone recognizes each and every one of them, i use some of them as ringtones etc. So everything seems to be working. However, when