#173 ✓resolved
teuf

Assertion when trying to copy a PList::Dictionary

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

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

*/

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A project around supporting the iPhone in Linux.

See http://libimobiledevice.org

People watching this ticket

Attachments

Pages