Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Assertion when trying to copy a PList::Dictionary

#173

The following test case unexpectedly stops with an exception:

include

include <plist/plist++.h>

int main()

{

PList::Dictionary a;

PList::String b("Hello");

PList::String c("Hi!");

PList::Dictionary d;



a.Insert("Key", &b);

a.Insert("Another Key", &c);

std::cout << a.ToXml() << std::endl;



d.Insert("dictionary", &a); //CRAAAAAAAAASH!

std::cout << d.ToXml() << std::endl;

return 0;

}

/* Output:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<key>Key</key>

<string>Hello</string>

<key>Another Key</key>

<string>Hi!</string>

terminate called after throwing an instance of 'std::logic_error'

what(): basic_string::_S_construct NULL not valid

*/

Reported by teuf · October 3rd, 2010 @ 10:37 AM

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. teuf
    teuf
    • Tag changed from libplist to libplist, patch

    October 3rd, 2010 @ 10:38 AM

  2. Martin S.
    Martin S.
    • State changed from new to resolved

    Thanks, pushed to master.

    February 12th, 2011 @ 01:21 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.