www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Trace/breakpoint trap

reply Bastiaan Veelo <Bastiaan.N.Veelo ntnu.no> writes:
Hi,

There seems to be a problem involving a template class that inherits an 
interface, and an associative array holding interface references to 
objects of this class.
The following code stops execution when an element is added to the AA 
(in the Widget class). Before I removed a few printfs, this happened 
with a segmentation fault, in the version below it happens with a 
"Trace/breakpoint trap" message.

dmd version: 0.101
system: Linux

Output:
Enter.
Constructing SpinBox.
Constructing Slot.
Widget.register(genericSlot) entered.
Trace/breakpoint trap


Code:

#interface SlotManager




#interface GenericSlot




#class Slot() : GenericSlot










#class Widget : SlotManager









#private:



#class SpinBox : Widget















#void main()









Bastiaan.
Sep 07 2004
next sibling parent Bastiaan Veelo <Bastiaan.N.Veelo ntnu.no> writes:
The bug remains, but I can work around it by using MinTL's SortedSet 
instead of the build-in AA.

Instead of



use




Thanks Ben :-)

Bastiaan.
Sep 13 2004
prev sibling parent Bastiaan Veelo <Bastiaan.N.Veelo ntnu.no> writes:
This is a smaller example, exposing the same bug (I think). This time, 
using MinTL does not help :-(

#import mintl.util;


#class. */
#interface Base






#class Foo : Base




#class Bar : Base




#int main()
















Sep 13 2004