Re: Glib error
- From: Chris Vine <chris cvine freeserve co uk>
- To: gtkmm-list gnome org, rope-walker yandex ru
- Cc:
- Subject: Re: Glib error
- Date: Tue, 31 Jan 2006 20:28:49 +0000
On Monday 30 January 2006 12:38, Volosatov Alexander wrote:
> I have:
>
> list<Glib::ustring> string_Fish_name;
> Gtk::Combo combo_Fish_name;
> DB fish_info; //class-interface for DB
> //if Connection OK
> if (fish_info.DB_Connect("") == -1)
> {
> // if query OK
> if (fish_info.DB_SQL_Query("SELECT fish_name FROM t_fish") == -1)
> {
> //if count(row) > 0
> if (fish_info.DB_Result_n() > 0)
> {
> //getting result
> string_Fish_name = fish_info.DB_Result_values(0);
> }
> }
> }
>
> combo_Fish_name.set_popdown_strings(string_Fish_name);
>
> ERROR: Glib-ERROR **::gmem.c:174:faild allocate 16 bytes
>
> Sometimes crach after widget.show();
> Sometimes after 5-10 seconds.
>
> When I use:
> string_Fish_name.push_back("fish one");
> string_Fish_name.push_back("fish two");
> no prolems.
If "list<Glib::ustring>" means std::list<Glib::ustring> and this is what
fish_info.DB_Result_values() returns then you probably have memory corruption
somewhere in your program and this is where it happens to show itself. The
error is probably somewhere completely different.
Chris
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]