Camera issue still exists in AIR 16 beta

Just tested my simple camera tester with Air 16 Beta and the issue still exists.
Im refering to the issue were the camera stops responding after a number of attaches/detaches to a video object and if attached multiple calls to setMode.
The issue im referring to is Bug#3850401 - Handle leak with video.attachCamera leading to inoperable camera

Just tested my simple camera tester with Air 16 Beta and the issue still exists.
Im refering to the issue were the camera stops responding after a number of attaches/detaches to a video object and if attached multiple calls to setMode.
The issue im referring to is Bug#3850401 - Handle leak with video.attachCamera leading to inoperable camera

Similar Messages

  • Adding Custom Labels Missing for Contact Numbers After Upgrading to iOS 8.0 and issue still exists on iOS 8.1

    I noticed that after upgrading to iOS 8.0 on my iPhone 5s, adding custom labels for contact numbers got removed. It still exists on iOS 8.1 as well. Is there someone who is facing a similar issue or can someone help me how to get that back. Any suggestions would be greatly appreciated.
    Thank you.

    Hi Yugendra,
    Thanks for visiting Apple Support Communities.
    I have good news. You can still choose a custom label in Contacts on iOS 8. The option should be below "Other" in the list of labels when editing a contact. This information is found in the iOS 8 user guide:
    Contacts at a glance - iPhone
    Change a label. If a field has the wrong label, such as Home instead of Work, tap Edit. Then tap the label and choose one from the list, or tap Add Custom Label to create one of your own.
    Best Regards,
    Jeremy

  • Battery issue still exists despite apple giving me a new 4s

    As some of you have read my last post, I had a brand new 4s that was getting 2.5 to max 3.0 hours of battery time.  Battery draw was 40 percent per hour. Yes, I tried ALL the suggestions, all of them. At the end, I had everything turned off from loc services to Siri to cloud to Bluetooth and brightness at 25 percent.  nothing worked.  I took the phone today to the apple store, feeling despite all the other complaints mine was just too weird and it HAD to be a hardware issue.  The apple store employee checked the diagnostics, nothng wrong with battery or hardware.  They gave me a brand new 4s, 32 gb.  I was advised to set up as NEW, not to download the 5.01 and to only synch the apps that I used most.  They agreed that they felt it was a software problem, and all day long they see it, although my problem was the most serious they had seen.  Came home, set up as new.  Synched about 35 of the 80 apps I had in iTunes.  THE RESULT only marginally better. I am now getting 4.0 hours of time, WITH Siri off, location off, Bluetooth off.  2.5 to 4.0 hours is a big increase BUT COME ON APPLE. P L E A S E fix this the problem ASAP.  Apple store employee advised adding ONE APP at a time and seeing if the battery wears down quickly.  But is that rational?  It would take me 3 weeks to do that!!!!!
    BOTTOM LINE, 4S BATTERY DRAW IS A REAL ISSUE, AND A CRISIS FOR ME. I HOPE APPLE IS READING, LISTENING, DOING SOMETHING
    FYI IOS5 on my iPad is no problem at all. 

    Man those apple guys are stupid sometimes. I went to an Apple geninus bar and they told me stuff I already knew... Ya we are all on the same boat here it's a software issue and my iphone 4 battery life is pathetic ever since 5.0 !!!! and 5.0.1 made it worst. For some people the fix worked though so I am guessing 50/50 would make sense.

  • Finder issues still exist in 10.9.2

    Whenever I updated to 10.9.1, I had issues in Photoshop and other programs when I tried to open files from within them Finder would take about 30 secs to populate the list of files on my computer. 10.9.2 fixed that but now I'm having a different Finder problem. When I use Flash builder and import a project, it imports the first one fine but when i go to import a second project, I hit Browse to find the file I need and when it pops up it shows me an empty Documents folder which is not empty on my file system and I switch to Desktop, it populates my finder with the files on my desktop and when I go to select the project, the dialog box for Finder closes but my file doesn't load into Flash Builder so I can't import it. If I close Flash Builder and try again it will let me import one project and then will not let me load in a second one.
    I'm using a late 2011 MacBook Air
    Here's a list of what I've done to try to fix it:
    - Uninstall Flash Builder, reinstall Flash Builder
    - Uninstall Creative Suite, reinstall Creative Suite
    - Delete Harddrive contents and reinstall OSX Mavericks
    - Delete Harddrive contents and install OSX Mountain Lion, this fixed it and I had no problems using Flash Builder which is why it's something specific to Mavericks
    - Updated from Mountain Lion to Mavericks and tried again but the problem still persisted
    - I tried it on a MacBook Pro I have and it works fine

    Sometimes this issue is caused by a misconfiguration or incompatibility of the Exchange server, or perhaps by a bug in Mail. If so, you won't be able to resolve it yourself. The fact that your iOS devices may be working well with the same account isn't relevant, because iOS uses a completely different protocol (ActiveSync) to communicate with Exchange servers. By default, OS X Mail uses the EWS protocol.
    Each of the following steps has been reported to help, at least temporarily, in some cases (not all):
    1. Back up all data. Open the Internet Accounts pane in System Preferences and check to make sure you don't have duplicate Exchange accounts. If you do, delete all but one of the duplicates. If there are no duplicates, delete the account and recreate it with the same settings.
    2. Rebuild the affected mailbox.
    3. Reindex messages.
    4. Follow the instructions in this support article to disable autodiscovery. You may need to get configuration details from the server administrator.
    5. In the Keychain Access application, delete the password item for the account. The next time Mail tries to access the account, you'll be prompted for the password. Check the box to save it in the Keychain.
    6. If you've created subfolders of the Exchange inbox, log in to the server through its web interface, move the messages out, and remove the subfolders. The inbox should have no subfolders.
    7. Synchronize with the server using IMAP rather than EWS. This is only possible if IMAP is enabled on the server.
    8. Consider using Outlook instead of Mail to access your Exchange mail. It uses yet another proprietary protocol (MAPI) that isn't available to other mail clients.
    See also this discussion.

  • My iphone4 camera shutter not opening please help me to resolve this issue , i tried a restore it still exist, my iphone4 camera shutter not opening please help me to resolve this issue , i tried a restore it still exist

    my iphone4 camera shutter not opening please help me to resolve this issue , i tried a restore it still exist, my iphone4 camera shutter not opening please help me to resolve this issue , i tried a restore it still exist ,please help me

    uninstall all iTunes,5 programes,this worked for me after reinstall them

  • MacBook Air 2013 with Mavericks 10.9.1 has Facetime HD Camera issues

    Hi, I've been using a new 2013 MacBook Air with 10.9.1 for the last 3 weeks (I used to have a 2010 Macbook Pro 15 with Mavericks) and the Facetime HD camera is having issues being detected by different applications.
    In my case I mainly use Google Hangouts, Skype, and sometimes Facetime. The problem lies on that the camera sometimes works and sometimes it doesn't.
    I usually reboot the camera with 'sudo killall AppleCameraAssistant' and that makes it work, but it shouldn't be like that.
    Please note that this was not happening with my 2010 MacBook Pro with Mavericks. I changed to this new 2013 MacBook Air only 3 weeks ago. Nevertheless, people that I work with (who use retina macbooks with Mavericks) are not having this issue.
    Last week I had to install a plugin (in chrome) for a new online site similar to Hangouts called BlueJeans. Bluejeans very seldomly recognizes the cam, only when I reboot it with the 'line' above or reboot the machine. The people I work with didn't have any issues, so I suspect this has to do with 2013 MacBook Air's Facetime HD cameras which might be different to the rest, or too new on the market.
    It's as if when I start using it in Hangouts and then hang, later it might not work in Skype, or viceversa.
    If you can help, that'll be great, and I appreciate it. Nevertheless, I feel Apple must take care of this in the next Mavericks update (many people are having camera issues).
    Jimmy

    Hi Jal1980
    I had the same pb...
    On my MacBook Pro Mid 2012 I Had a problem with my video on skype, facetime, photoboot....
    I have tried all the solution offered in every forum and never got to a satisfying result. I downgraded to mountain lion from mavericK without result. I reseted the Pram or SMC (I forgot), and other things, I played with the plugin /Library/CoreMediaIO/Plug-Ins/DAL/, I tried several version of skype.... NONE of this solution worked....
    Until that day a friend came to my place and installed AppleJack for Mac, a free software (http://download.cnet.com/AppleJack/3000-2094_4-40293.html) that totally solved this issue amongst others...
    Here is the full page of the program http://applejack.sourceforge.net/man.html
    And here quick instructions on how to use the program. Have fun!
    Restart your computer. After you hear the startup chime, press and hold down the
      Cmd and s keys together (this will put you in single user mode). You should soon get a Terminal-type screen with a dramatic garble of indecipherable messages and a shell prompt that looks something like [root#]
    2. Now, type applejack at the prompt. (If you’ve installed applejack manually, or have not created an alias to applejack for the root user, you may have to enter the full path to the script at the prompt.) You will be guided through a series of steps that will repair your drive and delete possibly corrupted files. Options are selected by typing the number corresponding to the task you want to perform, and then hitting the return key. For example, when you see a few different options, like this:
    [1] Option One [2] Do something else [3] Another task [4] A useful task
    From time to time, in interactive mode, you will be asked to answer yes or no to a question. To answer yes, type y and hit the return key. To answer no, type n and hit the return key.
    An advantage of using the interactive mode instead of auto mode is that you are given options for also cleaning out user-level caches and preference files. If you would like to clean out your main admin user caches, for example, you will need to use interactive mode.
    3. Auto mode: If you want to leave
      applejack to do it’s own thing, just choose option [a] when the script starts. You can also start right up in auto mode by typing: applejack auto at the prompt. applejack will run through all the basic cleanup tasks in order. Alternatively, you can also type applejack auto restart which will tell applejack to do the cleanup tasks and then automatically restart your computer. Other options are: applejack auto shutdown which tells AppleJack to shut down the computer after running its tasks, or applejack AUTO shutdown which tells AppleJack to run automatically in "deep cleaning" mode (see above) and then shut down.
    I hope this helps. It completely solved my issue.

  • Creative cloud quit, says "download again" and still no joy, same message.  Camera raw gone, Existing Lightroom and PS-12 won't talk.  What's up?  Looks like Creative Cloud trial botched up something. iMac

    Creative cloud quit, says "download again" and still no joy, same message.  Camera raw gone, Existing Lightroom 4.3 and PS-12 won't talk.  What's up?  Looks like Creative Cloud trial botched up something. iMac
    Tried a number of "fixes" from blogs.  No joy.  Deleted all my adobe apps, rebooted, and Creative Cloud says it needs to reload.  Went through that process, and it quit near the end, saying it needed to reload and directed me back to same Adobe site.  Hmm.  Round and round we go.  How do I get off of this loop and get my Adobe Lightroom and PS working fine again?  Whole episode started after loading CC and then PS said it didn't have Camera Raw.  Went and downloaded that, wouldn't load and said I needed Adobe Download Diagnostic (or something like that) went to suggested link, whereupon it tells me it is no loger available. 
    Looking forward to cleaning everything off and starting over!!  Any input gratefully accepted and I will NOT be trying CC again.  I am sure it is just fine, just not for me, now. 
    David Balcaen

    I forgot to write down my computer specs:
    iMac 27 Mid 2011
    2.7 GHz Intel Core i5
    4 GB 1333 MHz DDR3
    AMD Radeon HD 6770M 512 MB
    OS X 10.9.2

  • I've read a lot of comments/suggestions about camera issues that it turns black when opening the phone camera but nothing is worked for me. I'm so frustrate on my iPhone 5s im using it like for a month, I thought its more better than Samsung but I failed.

    I've read a lot of comments/suggestions about camera issues that it turns black when opening the phone camera but nothing is worked for me. I'm so frustrate on my iPhone 5s im using it like for a month, I thought its more better than Samsung but I failed. Please help!!! I hope apple has something to do about this. Thanks.

    I would have had the phone looked at long before a month of problems.
    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.
    If that doesn't help Make an appointment at an Apple Store to have your device examined by a technician. Or contact Apple Support. You phone is under warranty and someone at an Apple store can help you.

  • Retina MBP Camera Issue?

    I purchased a 13" Macbook Pro with Retina Display around Christmas time in 2012, and right when I opened it up I noticed the camera was pretty bad. I searched online and found that others were having similar issues or it could've just been the lighting. Early January or a little after Christmas (I don't remember exactly when) I took my computer to the apple store in Willow Grove, Pennsylvania and they told me it was "just fine." They looked at the camera and compared it to others in the store and said it was okay. This summer, a family member of mine purchased the 2013 13" Macbook Air and I noticed that the camera quality was very good and clear, especially compared to mine. The camera is slow to respond to movement, and has a low frame rate. The picture also just looks pretty bad and pixelated. Also, when I skype with a friend of mine I notice her camera quality looks much better than mine, and she is on a 2010 Macbook Pro. I paid around $1700 for this computer so I should be getting one that works perfectly fine. Is there anything I can do to fix the camera issue or is there any chance of getting it replaced by Apple? What makes me angry is the fact that the Apple Store told me it was fine when it clearly isn't.

    Go to another apple store. Also tell them, if it looks fine in the store, take it into a darker room. These camera's have differen't ISO's and yours could be "fine" in the clear day light but may not be when it's sensor doesn't have enough light. This can be due to a number of factors. But they have to fix it because it's under a year old. You just got to find a way to prove it.
    You need to find the situation where it looks at it's worse and see how the lighting is and show them that. If you hold shift command and 3 at the same time it'll take a screen shot of your camera. That makes a picture of it which you can show also.
    There are different camera's in different year's models also though. For example, my thunderbolt display camera is much better than the camera on my MacBook pro, they are both from 2012.

  • When I use Preview,Photo Mechanic and Pages, all JPEG or RAW images appear corrupted. I thought my hard drive was failing and replaced it and migrated everything over but the problem still exists. Any idea what is going on?

    When I use Preview,Photo Mechanic and Pages, all JPEG or RAW images appear corrupted.
    I thought my hard drive was failing and replaced it and migrated everything over but the problem still exists.
    It felt as if maybe a virus was at work but I ran Sophos and found nothing.
    I store images on my Drobo Raid system but when I work from my Macbook Pro I have no issues, just on the tower.
    Any idea what is going on?

    First of all, why did you say yes to Nero Back up before researching what it does with files already on the HDD? When I install Nero, the Back Up is the first thing I disable, it is a nagging pain, there are much better backup programs available. There are several file recovery programs out there to recover deleted files, that is, if that is what happened. Also, if you haven't overwritten the files, so you should be able to find them.

  • Wifi problems still exists?

    I sold my gs60 that had an 870m back in january mainly because i couldnt bare the wifi problem. I really loved the laptop and everything about it but everytime my laptop overheated the wifi would drop from 100mb to 1mb or less at times, monday im thinking of buying a new msi laptop and im wondering if these models that are currently being sold on amazon and etc still have the wifi problem or has it been fixed?
    And trust me, i read the forums, i read the guides and im pretty decent with computers/software and etc, i uninstalled, reinstalled, updated it, changes adv. settings and even though it improves certain things the problem was still there. So does it still exist?
    Or should i just buy a USB wifi?

    This problem only occurs in earlier patches of Intel WiFi card of GS60 2Px (8xx series of NVIDIA graphic cards) and not every unit was affected.
    If you don't want to take this risk, I'll suggest you buy GS60 2Qx (9xx series of NVIDIA graphic cards).
    USB WiFi is a good idea. It certainly has a better signal comparing to the WiFi embedded in the body of the laptop.

  • The Bug about 'DB_SECONDARY_BAD' still exists in BerkeleyDB4.8!

    The Bug about 'DB_SECONDARY_BAD' still exists in BerkeleyDB4.8?
    I'm sorry for my poor English, But I just cannot find anywhere else for help.
    Thanks for your patience first!
    I'm using BDB4.8 C++ API on Ubuntu 10.04, Linux Kernel 2.6.32-24-generic
    $uname -a
    $Linux wonpc 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:17:33 UTC 2010 i686 GNU/Linux
    When I update(overwrite) a record in database, I may get a DB_SECONDARY_BAD exception,
    What's worse, This case doesn't always occures, it's random. So I think it probably a bug
    of BDB, I have seen many issues about DB_SECONDARY_BAD with BDB4.5,4.6...
    To reproduce the issue, I make a simplified test program from my real program.
    The data to be stroed into database is a class called 'EntryData', It's defined in db_access.h,
    where also defines some HighLevel API functions that hide the BDB calls, such as
    store_entry_data(), which use EntryData as its argument. The EntryData have a string-type
    member-data 'name' and a vector<string>-type mem-data 'labels', So store_entry_data() will
    put the real data of EntryData to a contiguous memory block. The get_entry_data() returns
    an EntryData builed up from the contiguous memory block fetched from database.
    The comlete test program is post following this line:
    /////////db_access.h////////////
    #ifndef __DB_ACCESS_H__
    #define __DB_ACCESS_H__
    #include <string>
    #include <vector>
    #include <db_cxx.h>
    class EntryData;
    //extern Path DataDir; // default value, can be changed
    extern int database_setup();
    extern int database_close();
    extern int store_entry_data(const EntryData&, u_int32_t = DB_NOOVERWRITE);
    extern int get_entry_data(const std::string&, EntryData*, u_int32_t = 0);
    extern int rm_entry_data(const std::string&);
    class DBSetup
    // 构造时调用database_setup, 超出作用域自动调用database_close .
    // 该类没有数据成员.
    public:
    DBSetup() {
    database_setup();
    ~DBSetup() {
    database_close();
    class EntryData
    public:
    typedef std::vector<std::string> LabelContainerType;
    EntryData() {}
    EntryData(const std::string& s) : name(s) {}
    EntryData(const std::string& s, LabelContainerType& v)
    : name(s), labels(v) {}
    EntryData(const std::string&, const char*[]);
    class DataBlock;
    // 直接从内存块中构建, mem指针将会从数据库中获取,
    // 它就是EntryData转化成的DataBlock中buf_ptr->buf的内容.
    EntryData(const void* mem_blk, const int len);
    ~EntryData() {};
    const std::string& get_name () const { return name; }
    const LabelContainerType& get_labels() const { return labels; }
    void set_name (const std::string& s) { name = s; }
    void add_label(const std::string&);
    void rem_label(const std::string&);
    void show() const;
    // get contiguous memory for all:
    DataBlock get_block() const { return DataBlock(*this); }
    class DataBlock
    // contiguous memory for all.
    public:
    DataBlock(const EntryData& data);
    // 引进一块内存作为 buf_ptr->buf 的内容.
    // 例如从数据库中获取结果
    DataBlock(void* mem, int len);
    // 复制构造函数:
    DataBlock(const DataBlock& orig) :
    data_size(orig.data_size),
    capacity(orig.capacity),
    buf_ptr(orig.buf_ptr) { ++buf_ptr->use; }
    // 赋值操作符:
    DataBlock& operator=(const DataBlock& oth)
    data_size = oth.data_size;
    capacity = oth.capacity;
    if(--buf_ptr->use == 0)
    delete buf_ptr;
    buf_ptr = oth.buf_ptr;
    return *this;
    ~DataBlock() {
    if(--buf_ptr->use == 0) { delete buf_ptr; }
    // data()函数因 Dbt 构造函数不支持const char*而被迫返回 char*
    // data() 返回的指针是应该被修改的.
    const char* data() const { return buf_ptr->buf; }
    int size() const { return data_size; }
    private:
    void pack_str(const std::string& s);
    static const int init_capacity = 100;
    int data_size; // 记录数据块的长度.
    int capacity; // 已经分配到 buf 的内存大小.
    class SmartPtr; // 前向声明.
    SmartPtr* buf_ptr;
    class SmartPtr
    friend class DataBlock;
    char* buf;
    int use;
    SmartPtr(char* p) : buf(p), use(1) {}
    ~SmartPtr() { delete [] buf; }
    private:
    std::string name; // entry name
    LabelContainerType labels; // entry labels list
    }; // class EntryData
    #endif
    //////db_access.cc/////////////
    #include <iostream>
    #include <cstring>
    #include <cstdlib>
    #include <vector>
    #include <algorithm>
    #include "directory.h"
    #include "db_access.h"
    using namespace std;
    static Path DataDir("~/mydict_data"); // default value, can be changed
    const Path& get_datadir() { return DataDir; }
    static DbEnv myEnv(0);
    static Db db_bynam(&myEnv, 0); // using name as key
    static Db db_bylab(&myEnv, 0); // using label as key
    static int generate_keys_for_db_bylab
    (Db* sdbp, const Dbt* pkey, const Dbt* pdata, Dbt* skey)
    EntryData entry_data(pdata->get_data(), pdata->get_size());
    int lab_num = entry_data.get_labels().size();
    Dbt* tmpdbt = (Dbt*) malloc( sizeof(Dbt) * lab_num );
    memset(tmpdbt, 0, sizeof(Dbt) * lab_num);
    EntryData::LabelContainerType::const_iterator
    lab_it = entry_data.get_labels().begin(), lab_end = entry_data.get_labels().end();
    for(int i = 0; lab_it != lab_end; ++lab_it, ++i) {
    tmpdbt[ i ].set_data( (void*)lab_it->c_str() );
    tmpdbt[ i ].set_size( lab_it->size() );
    skey->set_flags(DB_DBT_MULTIPLE | DB_DBT_APPMALLOC);
    skey->set_data(tmpdbt);
    skey->set_size(lab_num);
    return 0;
    //@Return Value: return non-zero at error
    extern int database_setup()
    const string DBEnvHome (DataDir + "DBEnv");
    const string dbfile_bynam("dbfile_bynam");
    const string dbfile_bylab("dbfile_bylab");
    db_bylab.set_flags(DB_DUPSORT);
    const u_int32_t env_flags = DB_CREATE | DB_INIT_MPOOL;
    const u_int32_t db_flags = DB_CREATE;
    rmkdir(DBEnvHome);
    try
    myEnv.open(DBEnvHome.c_str(), env_flags, 0);
    db_bynam.open(NULL, dbfile_bynam.c_str(), NULL, DB_BTREE, db_flags, 0);
    db_bylab.open(NULL, dbfile_bylab.c_str(), NULL, DB_BTREE, db_flags, 0);
    db_bynam.associate(NULL, &db_bylab, generate_keys_for_db_bylab, 0);
    } catch(DbException &e) {
    cerr << "Err when open DBEnv or Db: " << e.what() << endl;
    return -1;
    } catch(std::exception& e) {
    cerr << "Err when open DBEnv or Db: " << e.what() << endl;
    return -1;
    return 0;
    int database_close()
    try {
    db_bylab.close(0);
    db_bynam.close(0);
    myEnv.close(0);
    } catch(DbException &e) {
    cerr << e.what();
    return -1;
    } catch(std::exception &e) {
    cerr << e.what();
    return -1;
    return 0;
    // 返回Dbt::put()的返回值
    int store_entry_data(const EntryData& e, u_int32_t flags)
    int res = 0;
    try {
    EntryData::DataBlock blk(e);
    // data()返回的buf中存放的第一个字符串便是 e.get_name().
    Dbt key ( (void*)blk.data(), strlen(blk.data()) + 1 );
    Dbt data( (void*)blk.data(), blk.size() );
    res = db_bynam.put(NULL, &key, &data, flags);
    } catch (DbException& e) {
    cerr << e.what() << endl;
    throw; // 重新抛出.
    return res;
    // 返回 Db::get()的返回值, 调用成功时 EntryData* e的值才有意义
    int get_entry_data
    (const std::string& entry_name, EntryData* e, u_int32_t flags)
    Dbt key( (void*)entry_name.c_str(), entry_name.size() + 1 );
    Dbt data;
    data.set_flags(DB_DBT_MALLOC);
    int res = db_bynam.get(NULL, &key, &data, flags);
    if(res == 0)
    new (e) EntryData( data.get_data(), data.get_size() );
    free( data.get_data() );
    return res;
    int rm_entry_data(const std::string& name)
    Dbt key( (void*)name.c_str(), name.size() + 1 );
    cout << "to remove: \'" << name << "\'" << endl;
    int res = db_bynam.del(NULL, &key, 0);
    return res;
    EntryData::EntryData(const std::string& s, const char* labels_arr[]) : name(s)
    {   // labels_arr 需要以 NULL 结尾.
    for(const char** i = labels_arr; *i != NULL; i++)
    labels.push_back(*i);
    EntryData::EntryData(const void* mem_blk, const int len)
    const char* buf = (const char*)mem_blk;
    int consumed = 0; // 已经消耗的mem_blk的大小.
    name = buf; // 第一串为 name
    consumed += name.size() + 1;
    for (string label = buf + consumed;
    consumed < len;
    consumed += label.size() + 1)
    label = buf + consumed;
    labels.push_back(label);
    void EntryData::add_label(const string& new_label)
    if(find(labels.begin(), labels.end(), new_label)
    == labels.end())
    labels.push_back(new_label);
    void EntryData::rem_label(const string& to_rem)
    LabelContainerType::iterator iter = find(labels.begin(), labels.end(), to_rem);
    if(iter != labels.end())
    labels.erase(iter);
    void EntryData::show() const {
    cout << "name: " << name << "; labels: ";
    LabelContainerType::const_iterator it, end = labels.end();
    for(it = labels.begin(); it != end; ++it)
    cout << *it << " ";
    cout << endl;
    EntryData::DataBlock::DataBlock(const EntryData& data) :
    data_size(0),
    capacity(init_capacity),
    buf_ptr(new SmartPtr(new char[init_capacity]))
    pack_str(data.name);
    for(EntryData::LabelContainerType::const_iterator \
    i = data.labels.begin();
    i != data.labels.end();
    ++i) { pack_str(*i); }
    void EntryData::DataBlock::pack_str(const std::string& s)
    int string_size = s.size() + 1; // to put sting in buf separately.
    if(capacity >= data_size + string_size) {
    memcpy(buf_ptr->buf + data_size, s.c_str(), string_size);
    else {
    capacity = (data_size + string_size)*2; // 分配尽可能大的空间.
    buf_ptr->buf = (char*)realloc(buf_ptr->buf, capacity);
    memcpy(buf_ptr->buf + data_size, s.c_str(), string_size);
    data_size += string_size;
    //////////// test_put.cc ///////////
    #include <iostream>
    #include <string>
    #include <cstdlib>
    #include "db_access.h"
    using namespace std;
    int main(int argc, char** argv)
    if(argc < 2) { exit(EXIT_FAILURE); }
    DBSetup setupup_mydb;
    int res = 0;
    EntryData ed(argv[1], (const char**)argv + 2);
    res = store_entry_data(ed);
    if(res != 0) {
         cerr << db_strerror(res) << endl;
         return res;
    return 0;
    // To Compile:
    // $ g++ -ldb_cxx -lboost_regex -o test_put test_put.cc db_access.cc directory.cc
    //////////// test_update.cc ///////////
    #include <iostream>
    #include <cstdlib>
    #include <string>
    #include <boost/program_options.hpp>
    #include "db_access.h"
    using namespace std;
    namespace po = boost::program_options;
    int main(int argc, char** argv)
    if(argc < 2) { exit(EXIT_SUCCESS); }
    DBSetup setupup_mydb;
    int res = 0;
    po::options_description cmdopts("Allowed options");
    po::positional_options_description pos_opts;
    cmdopts.add_options()
    ("entry", "Specify the entry that will be edited")
    ("addlabel,a", po::value< vector<string> >(),
    "add a label for specified entry")
    ("removelabel,r", po::value< vector<string> >(),
    "remove the label of specified entry")
    pos_opts.add("entry", 1);
    po::variables_map vm;
    store( po::command_line_parser(argc, argv).
    options(cmdopts).positional(pos_opts).run(), vm );
    notify(vm);
    EntryData entry_data;
    if(vm.count("entry")) {
    const string& entry_to_edit = vm["entry"].as<string>();
    res = get_entry_data( entry_to_edit, &entry_data );
    switch (res)
    case 0:
    break;
    case DB_NOTFOUND:
    cerr << "No entry named: \'"
    << entry_to_edit << "\'\n";
    return res;
    break;
    default:
    cerr << db_strerror(res) << endl;
    return res;
    } else {
    cerr << "No entry specified\n";
    exit(EXIT_FAILURE);
    EntryData new_entry_data(entry_data);
    typedef vector<string>::const_iterator VS_CI;
    if(vm.count("addlabel")) {
    const vector<string>& to_adds = vm["addlabel"].as< vector<string> >();
    VS_CI end = to_adds.end();
    for(VS_CI i = to_adds.begin(); i != end; ++i) {
    new_entry_data.add_label(*i);
    if(vm.count("removelabel")) {
    const vector<string>& to_rems = vm["removelabel"].as< vector<string> >();
    VS_CI end = to_rems.end();
    for(VS_CI i = to_rems.begin(); i != end; ++i) {
    new_entry_data.rem_label(*i);
    cout << "Old data| ";
    entry_data.show();
    cout << "New data| ";
    new_entry_data.show();
    res = store_entry_data(new_entry_data, 0); // set flags to zero permitting Over Write
    if(res != 0) {
    cerr << db_strerror(res) << endl;
    return res;
    return 0;
    // To Compile:
    // $ g++ -ldb_cxx -lboost_regex -lboost_program_options -o test_update test_update.cc db_access.cc directory.cc

    ////////directory.h//////
    #ifndef __DIRECTORY_H__
    #define __DIRECTORY_H__
    #include <string>
    #include <string>
    #include <sys/types.h>
    using std::string;
    class Path
    public:
    Path() {}
    Path(const std::string&);
    Path(const char* raw) { new (this) Path(string(raw)); }
    Path upper() const;
    void operator+= (const std::string&);
    // convert to string (char*):
    //operator std::string() const {return spath;}
    operator const char*() const {return spath.c_str();}
    const std::string& str() const {return spath;}
    private:
    std::string spath; // the real path
    inline Path operator+(const Path& L, const string& R)
    Path p(L);
    p += R;
    return p;
    int rmkdir(const string& path, const mode_t mode = 0744, const int depth = -1);
    #endif
    ///////directory.cc///////
    #ifndef __DIRECTORY_H__
    #define __DIRECTORY_H__
    #include <string>
    #include <string>
    #include <sys/types.h>
    using std::string;
    class Path
    public:
    Path() {}
    Path(const std::string&);
    Path(const char* raw) { new (this) Path(string(raw)); }
    Path upper() const;
    void operator+= (const std::string&);
    // convert to string (char*):
    //operator std::string() const {return spath;}
    operator const char*() const {return spath.c_str();}
    const std::string& str() const {return spath;}
    private:
    std::string spath; // the real path
    inline Path operator+(const Path& L, const string& R)
    Path p(L);
    p += R;
    return p;
    int rmkdir(const string& path, const mode_t mode = 0744, const int depth = -1);
    #endif
    //////////////////// All the code is above ////////////////////////////////
    Use the under command
    $ g++ -ldb_cxx -lboost_regex -o test_put test_put.cc db_access.cc directory.cc
    to get a test program that can insert a record to database.
    To insert a record, use the under command:
    $ ./test_put ubuntu linux os
    It will store an EntryData named 'ubuntu' and two labels('linux', 'os') to database.
    Use the under command
    $ g++ -ldb_cxx -lboost_regex -lboost_program_options -o test_update test_update.cc db_access.cc directory.cc
    to get a test program that can update the existing records.
    To update the record, use the under command:
    $ ./test_update ubuntu -r linux -a canonical
    It will update the with the key 'ubuntu', with the label 'linux' removed and a new
    label 'canonical'.
    Great thanks to you if you've read and understood my code!
    I've said that the DB_SECONDARY_BAD exception is random. The same operation may cause
    exception in one time and may goes well in another time.
    As I've test below:
    ## Lines not started with '$' is the stdout or stderr.
    $ ./test_put linux os linus
    $ ./test_update linux -r os
    Old data| name: linux; labels: os linus
    New data| name: linux; labels: linus
    $ ./test_update linux -r linus
    Old data| name: linux; labels: linus
    New data| name: linux; labels:
    dbfile_bynam: DB_SECONDARY_BAD: Secondary index inconsistent with primary
    Db::put: DB_SECONDARY_BAD: Secondary index inconsistent with primary
    terminate called after throwing an instance of 'DbException'
    what(): Db::put: DB_SECONDARY_BAD: Secondary index inconsistent with primary
    已放弃
    Look! I've received a DB_SECONDARY_BAD exception. But thus exception does not always
    happen even under the same operation.
    For the exception is random, you may have not the "luck" to get it during your test.
    So let's insert a record by:
    $ ./test_put t
    and then give it a great number of labels:
    $ for((i = 0; i != 100; ++i)); do ./test_update t -a "label_$i"; done
    and then:
    $ for((i = 0; i != 100; ++i)); do ./test_update t -r "label_$i"; done
    Thus, the DB_SECONDARY_BAD exception is almost certain to happen.
    I've been confused by the problem for times. I would appreciate if someone can solve
    my problem.
    Many thanks!
    Wonder

  • Bug #18104 still exists

    Hello,
    I am quite disappointed about BDB 5. One of the most nasty bugs (#18104) still
    exists. As soon as you want to use the set_thread_count() feature, BDB will not
    free the thread-control-block. If you connect/disconnect, BDB will stop working
    quite early. You can re-produce this issue with any `db_*` tool.
    The testcase:
    #include <stdlib.h>
    #include <db.h>
    #define DIRECTORY "/tmp/db"
    int main()
        /* open environment */
        DB_ENV *handle;
        int status = db_env_create( &handle, 0 );
        status = handle->set_cachesize( handle, 0, 32*1024*1024, 0 );
        status = handle->set_thread_count( handle, 0x100 );
        status = handle->open( handle, DIRECTORY, DB_CREATE, 0644 );
        if( status != 0 )
            return 1;
        /* raise error "Unable to allocate thread control block" */
        for( ;; )
            system( "db_stat -e -h " DIRECTORY " | grep process/thread | wc" );
        return 0;
    }

    Hi Sandra,
    Hi Greg,
    Our architecture is quite simple: a cron-job runs ENV->failchk() and ENV->txn_checkpoint()
    once a minute (which should be fine, shouldn't it?)
    The problem, neither ENV->close() nor ENV->failchk() removes outdated items from the
    thread-control-block. One would expect, that the PID is added to the block as soon as the
    process connects and removed when the process disconnects. But it is not.
    If the block runs out of memory, BDB requires a recovery (see the down below testcase).
    Usually ENV->failchk() cleans the thread-control-block, as soon as there are more items in
    the block than "thread_count". Today three times it did not even remove them, if there were
    more than "thread_count" items in the block - but this happend sporadic so it was difficult
    to create a testcase.
    Once ENV->failchk() cleans the thread-control-block, BDB works as expected. If a process
    connects, the PID is added to the block, and as soon as the process disconnects, the PID is
    removed from the thread-control-block. You can test this by looping the first loop 1090 times.
    The testcase:
    #include <stdio.h>
    #include <stdlib.h>
    #include <signal.h>
    #include <db.h>
    #include <errno.h>
    #define DIRECTORY "/tmp/db"
    static int bdb_is_alive( DB_ENV *dbenv, pid_t pid, db_threadid_t tid, u_int32_t flags )
        int status;
        status = kill( pid, 0 );
        if( status != -1 )
            return 1;
        if( errno == ESRCH )
            return 0;
        exit( 1 );  /* should never happen */
    int main()
        system( "mkdir -p " DIRECTORY );
        system( "db_recover -h " DIRECTORY );
        system( "rm -rfv " DIRECTORY "/*" );
        /* open environment */
        int status, i;
        DB_ENV *handle;
        status = db_env_create( &handle, 0 );
        status = handle->set_cachesize( handle, 0, 32*1024*1024, 0 );
        status = handle->set_thread_count( handle, 1091 );
        status = handle->set_isalive( handle, bdb_is_alive );
        status = handle->open( handle, DIRECTORY, DB_CREATE, 0644 );
        if( status != 0 )
            return 1;   /* should never happen */
        status = handle->failchk( handle, 0 );
        status = handle->close( handle, 0 );
        /* Now start workers (`db_stat`) + failchks() */
        for( i=0; i < 1089; ++i )       /* thread_count - 2 */
            fprintf(stderr,"Number of items in the thread-control-block: "); fflush(stdout);
            system( "db_stat -e -h " DIRECTORY " | grep process/thread | wc -l" );
            status = db_env_create( &handle, 0 );
            status = handle->set_isalive( handle, bdb_is_alive );
            status = handle->open( handle, DIRECTORY, DB_CREATE, 0644 );
            if( status != 0 )
                return 1;   /* should never happen */
            status = handle->failchk( handle, 0 );      /* strange - does not remove the process-entries created by `db_stat` */
            if( status != 0 )
                return 1;   /* should never happen */
            status = handle->close( handle, 0 );
        /* raise error: "Unable to allocate thread control block" */
        for( i=1; i < 422; ++i )
            fprintf(stderr,"Number of items in the thread-control-block: "); fflush(stdout);
            system( "db_stat -e -h " DIRECTORY " | grep process/thread | wc -l" );
        /* You should see on stderr:
                db_stat: Unable to allocate thread control block
                db_stat: Unable to allocate thread control block
                db_stat: DB_ENV->open: /tmp/db: Cannot allocate memory
        fprintf(stderr,"BDB is dead now. Only `db_recover` helps...\n%s\n",db_version(NULL,NULL,NULL));
        return 0;
    }

  • Old kexi bug still exists?

    So I was looking into using something other than phpMyAdmin for editing my databases, so I looked into kexi.  When I used the import "Structure and Data" option, it just populates the tables with empty values.
    After some searching, I found that this use to be an issue a while back: Problem and Resolution.
    Can anyone else confirm this as a still-existing (or reoccurring) bug?
    Or, am I just messing something up along the way?
    Thanks.

    I hope someone can help me... it is very important and i am desperate for answers (BUMP)

  • What is the reason that the integrated camera does not exist in the hardware configuration?

    When I start Face Time, my integrated camera doesn't work.
    I check my hardware configuration, but, the camera doesn't exist.

    Welcome to Apple Support Communities
    Does it happen with other applications that use the camera, like Photo Booth? If so, I recommend you to reset the PRAM > http://support.apple.com/kb/HT1379 Then, reset the SMC > http://support.apple.com/kb/HT3964
    After resetting the SMC, start the iMac and see if you can use your camera. If not, hold Command and R keys while your computer is starting and reinstall OS X through OS X Recovery > http://support.apple.com/kb/HT4718
    If it doesn't work, it's a hardware issue, so make a backup of your data and take the iMac to an Apple Store or reseller

Maybe you are looking for

  • Using the Mac Mini to create a Wisp Client Router

    My condo association has just offered WiFi to all units however the problem that I have is firstly lack of signal penetration within my unit and secondly the use of WPA2 Enterprise PEAP access. I can't find *ANY*  Wisp routers or range extenders that

  • Install BOE XI 3.1

    I am going to install Business Objects XI 3.1 on windows 2008 server, can I install Crystal Reports 2008 V0 first and then install BOE XI 3.1. Or is that any other order I have to follow. Thanks in advance.

  • How to get ScenarioVariables inside my Scenario ?

    Hi All ! I have a package with several ODI-Variables declared inside. I want to add a procedure into this package and generate a Scenario out of this PKG The procedure should get all ScenarioVariables of the Scenario where it is inside. I found the M

  • E72 Email disconnecting

    I have an E72. It has two email accounts one is a yahoo account with no issues it stays connected 24/7. I also have another account which I've set up and it works however everytime I go to it I have to select a connection with the "Select Connection"

  • REP-50159 While Running Reports

    Hi ALL, Pletform : LINUX enterprise 3 . AS10g I want to run the report on printer, for that I had made a entries in uiprinter.txt but I am getting REP-50159 executed successfully but error in distrubuting output. What should I configure to resolve th