[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Infinite loop in frm_driver.c
From: |
Marlin Forbes |
Subject: |
Infinite loop in frm_driver.c |
Date: |
Wed, 29 Aug 2001 23:20:27 +0200 |
Hi,
I am probably doing something stupid, but when debugging my NCurses form app,
a change I must have introduced recently and can no longer find results in an
infinite loop inside the Synchronize_Linked_Fields function:
937 for(linked_field = field->link;
938 linked_field!= field;
939 linked_field = linked_field->link )
940 {
941 if (((syncres=Synchronize_Field(linked_field)) != E_OK) &&
942 (res==E_OK))
943 res = syncres;
944 }
945 return(res);
946 }
The problem is that linked_field is equal to linked_field->link, and not
equal to field. IOW, the Synchronize_FIeld function gets called ad infinitum
because the linked_field is linked to itself.
Now I'm not too sure what the field->link attribute is for, since I'm not
even using linked fields.
This behaviour only occurs when a field requires validation, ie: something
changes and the user tries to leave the field.
Everything was working fine (sob). I don't know what I did.
Stack trace is as follows:
#0 0x08053159 in Synchronize_Linked_Fields (field=0x80ac130)
at ../form/frm_driver.c:942
#1 0x08054bef in _nc_Internal_Validation (form=0x80af378)
at ../form/frm_driver.c:2704
#2 0x08054fd6 in Inter_Field_Navigation (fct=0x8055040 <FN_Next_Field>,
form=0x80af378) at ../form/frm_driver.c:3059
#3 0x0805573a in form_driver (form=0x80af378, c=516)
at ../form/frm_driver.c:3698
#4 0x0804f58f in form_show (form=0x80af378) at form.c:189
#5 0x0804e3c4 in main (argc=2, argv=0xbffff8dc)
#6 0x400760de in __libc_start_main () from /lib/libc.so.6
I am using Mandrake 8.0 with ncurses-5.2-16mdk.src.rpm. I have not applied
any patches since another problem I have is getting the damn patch*.sh file
to run. Which shell are they written for? /bin/sh spits out complaints
:)
Regards,
M.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Infinite loop in frm_driver.c,
Marlin Forbes <=