assert error on some files with character detail analysis

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
kived
Posts: 2
Joined: Wed Dec 10, 2014 10:57 am

assert error on some files with character detail analysis

Post by kived » Wed Dec 10, 2014 11:23 am

I have rarely had any issues with DiffMerge, but I recently started a rebase and found that DiffMerge was crashing when attempting to merge some of the files. Not all (most of the changed files were fine) but a few were not working, and raised the following assertion errors:
$ diffmerge --merge --result=combosuggest.py combosuggest.py.LOCAL.24799.py combosuggest.py.BASE.24799.py combosuggest.py.REMOTE.24799.py

(diffmerge:26562): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(diffmerge:26562): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",
de_sync_list.cpp(2129): assert "(!pSync->isSameType(DE_ATTR_MRG_3EQ))" failed in _divide_node3_21(): Coding Error!
de_sync_list.cpp(2129): assert "(!pSync->isSameType(DE_ATTR_MRG_3EQ))" failed in _divide_node3_21(): Coding Error!
de_sync_list.cpp(2129): assert "(!pSync->isSameType(DE_ATTR_MRG_3EQ))" failed in _divide_node3_21(): Coding Error!
de_sync_list.cpp(2129): assert "(!pSync->isSameType(DE_ATTR_MRG_3EQ))" failed in _divide_node3_21(): Coding Error!
de_sync_list.cpp(2129): assert "(!pSync->isSameType(DE_ATTR_MRG_3EQ))" failed in _divide_node3_21(): Coding Error!
de_sync_list.cpp(2129): assert "(!pSync->isSameType(DE_ATTR_MRG_3EQ))" failed in _divide_node3_21(): Coding Error!
de_sync_list.cpp(2129): assert "(!pSync->isSameType(DE_ATTR_MRG_3EQ))" failed in _divide_node3_21(): Coding Error!
Trace/breakpoint trap
After clicking 'Continue' on each dialog, DiffMerge exits.

I am able to work around the problem by changing Analysis Detail Level to Lines Only instead of Lines and Character. Changing Multi-Line Intra-Line Analysis Detail Level seemed to have no effect.

I am running SourceGear DiffMerge 4.2.0 (697:52f98c4fcb) on Ubuntu 14.10 amd64. Example files follow.

combosuggest.py.LOCAL.24799.py

Code: Select all

'''
.. module: aeris2.widget.combosuggest
	:synopsis:
.. moduleauthor:: Nathan Lewis <nathan@essential-elements.net>
'''

#from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.uix.behaviors import ButtonBehavior
from gryphus.controller import ControllerRegistry as CR
from gryphus.util.localization import markx
from gryphus.data.session import pause_commit_decorator

from aeris2.widget.button import FullWidthLabel
from aeris2.views.popup import AttachedPopup

Builder.load_string('''
<SuggestedComboButton>:

	height: 100
	size_hint_y: None
	orientation: 'vertical'

	canvas.before:
		Color:
			rgba: self.kv_theme('label_text_color')
		Line:
			rectangle: self.x + 4, self.y, self.width - 8, self.height - 8
			width: 1

	BoxLayout:

		Label:
			id: items
			size_hint_x: 0.2
			# Translators: List of items in a combo
			text: markx('Items:')
			bold: True
			text_size: self.width - (self.width * 0.3), self.height - (self.height * 0.3)
			halign: 'left'

		Label:
			id: items_label
			text_size: self.width, self.height - (self.height * 0.1)
			halign: 'left'

	BoxLayout:
		size_hint_x: 0.5

		Label:
			id: discount
			halign: 'left'
			valign: 'top'
			bold: True
			text_size: self.width - (self.width * 0.1), self.height - (self.height * 0.5)

''')

class SuggestedComboPopup(AttachedPopup):
	''' Combo Suggestion Popup
	Show a list of available combos based on what is
	already in the cart.
	'''
	grid_layout = ObjectProperty()
	scroll_view = ObjectProperty()

	combos = None

	def __init__(self, combos, **kwargs):
		super(SuggestedComboPopup, self).__init__(**kwargs)

		#self.scroll_view.paging_increment = 0.4
		self.lang_cc = CR['Lang']
		self.combos = combos

		self.grid_layout.bind(minimum_height=self.grid_layout.setter('height'))

		self.add_buttons()

		self.combo_cc = CR['Combo']

	def add_buttons(self):

		discount_combos = CR['Combo'].get_combo_by_discount(self.combos)

		for combo in discount_combos:
			scb = SuggestedComboButton(combo['order_products'], combo['discount'], self.lang_cc)
			scb.build()
			scb.bind(on_press=self.build_combo)
			self.grid_layout.add_widget(scb)

	@pause_commit_decorator
	def build_combo(self, instance):
		self.combo_cc.auto_combo_update_cart(instance.order_products)
		self.dismiss()

class SuggestedComboButton(ButtonBehavior, BoxLayout):
	''' Combo Suggestion Button
	A button that shows combo items and discount.
	'''

	order_products = None
	discount = None

	def __init__(self, order_products, discount, lang_cc, **kwargs):
		super(SuggestedComboButton, self).__init__(**kwargs)
		self.order_products = order_products
		self.discount = discount
		self.lang_cc = lang_cc

	def build(self):
		self.order_products = self.order_products
		items = []
		for op, ci in self.order_products:
			items.append(op.product.get_translation(self.lang_cc.lang))
			#self.ids.grid_layout.add_widget(self.build_label(op.product.name))

		self.ids.items_label.text = ', '.join(items)
		self.ids.discount.text = markx('Discount: $%s', unicode(self.discount))


	# def build_label(self, text, size_hint_x=1.0, halign='left'):
	#
	# 	label = FullWidthLabel(text=text,
	# 						   size_hint_x=size_hint_x,
	# 						   halign=halign)
	# 	#label.color = label.kv_theme('cart_text_color')
	# 	label.padding_x_divider = 0
	#
	# 	return label
combosuggest.py.BASE.24799.py

Code: Select all

'''
.. module: aeris2.widget.combosuggest
	:synopsis:
.. moduleauthor:: Nathan Lewis <nathan@essential-elements.net>
'''

#from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.uix.behaviors import ButtonBehavior
from gryphus.controller import ControllerRegistry as CR
from gryphus.util.localization import mark
from gryphus.data.session import pause_commit_decorator

from aeris2.widget.button import FullWidthLabel
from aeris2.views.popup import AttachedPopup

Builder.load_string('''
<SuggestedComboButton>:

	height: 100
	size_hint_y: None
	orientation: 'vertical'

	canvas.before:
		Color:
			rgba: self.kv_theme('label_text_color')
		Line:
			rectangle: self.x + 4, self.y, self.width - 8, self.height - 8
			width: 1

	BoxLayout:

		Label:
			id: items
			size_hint_x: 0.2
			text: 'Items:'
			bold: True
			text_size: self.width - (self.width * 0.3), self.height - (self.height * 0.3)
			halign: 'left'

		Label:
			id: items_label
			text_size: self.width, self.height - (self.height * 0.1)
			halign: 'left'

	BoxLayout:
		size_hint_x: 0.5

		Label:
			id: discount
			halign: 'left'
			valign: 'top'
			bold: True
			text_size: self.width - (self.width * 0.1), self.height - (self.height * 0.5)

''')

class SuggestedComboPopup(AttachedPopup):
	''' Combo Suggestion Popup
	Show a list of available combos based on what is
	already in the cart.
	'''
	grid_layout = ObjectProperty()
	scroll_view = ObjectProperty()

	combos = None

	def __init__(self, combos, **kwargs):
		super(SuggestedComboPopup, self).__init__(**kwargs)

		#self.scroll_view.paging_increment = 0.4

		self.combos = combos

		self.grid_layout.bind(minimum_height=self.grid_layout.setter('height'))

		self.add_buttons()

		self.combo_cc = CR['Combo']

	def add_buttons(self):

		discount_combos = CR['Combo'].get_combo_by_discount(self.combos)

		for combo in discount_combos:
			scb = SuggestedComboButton(combo['order_products'], combo['discount'])
			scb.build()
			scb.bind(on_press=self.build_combo)
			self.grid_layout.add_widget(scb)

	@pause_commit_decorator
	def build_combo(self, instance):
		self.combo_cc.auto_combo_update_cart(instance.order_products)
		self.dismiss()

class SuggestedComboButton(ButtonBehavior, BoxLayout):
	''' Combo Suggestion Button
	A button that shows combo items and discount.
	'''

	order_products = None
	discount = None

	def __init__(self, order_products, discount, **kwargs):
		super(SuggestedComboButton, self).__init__(**kwargs)
		self.order_products = order_products
		self.discount = discount

	def build(self):
		self.order_products = self.order_products
		items = []
		for op, ci in self.order_products:
			items.append(op.product.name)
			#self.ids.grid_layout.add_widget(self.build_label(op.product.name))

		self.ids.items_label.text = ', '.join(items)
		self.ids.discount.text = 'Discount: $%s' % str(self.discount)


	def build_label(self, text, size_hint_x=1.0, halign='left'):

		label = FullWidthLabel(text=text,
							   size_hint_x=size_hint_x,
							   halign=halign)
		#label.color = label.kv_theme('cart_text_color')
		label.padding_x_divider = 0

		return label
combosuggest.py.REMOTE.24799.py

Code: Select all

'''
.. module: aeris2.widget.combosuggest
	:synopsis:
.. moduleauthor:: Nathan Lewis <nathan@essential-elements.net>
'''

#from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.uix.behaviors import ButtonBehavior
from gryphus.controller import ControllerRegistry as CR
from gryphus.util.localization import mark
from gryphus.data.session import pause_commit_decorator

from aeris2.widget.button import FullWidthLabel
from aeris2.views.popup import AttachedPopup

Builder.load_string('''
<SuggestedComboButton>:

	height: 100
	size_hint_y: None
	orientation: 'vertical'

	canvas.before:
		Color:
			rgba: self.kv_theme('label_text_color')
		Line:
			rectangle: self.x + 4, self.y, self.width - 8, self.height - 8
			width: 1

	BoxLayout:

		Label:
			id: items
			size_hint_x: 0.2
			text: 'Items:'
			bold: True
			text_size: self.width - (self.width * 0.3), self.height - (self.height * 0.3)
			halign: 'left'

		Label:
			id: items_label
			text_size: self.width, self.height - (self.height * 0.1)
			halign: 'left'

	BoxLayout:
		size_hint_x: 0.5

		Label:
			id: discount
			halign: 'left'
			valign: 'top'
			bold: True
			text_size: self.width - (self.width * 0.1), self.height - (self.height * 0.5)

''')

class SuggestedComboPopup(AttachedPopup):
	''' Combo Suggestion Popup
	Show a list of available combos based on what is
	already in the cart.
	'''
	grid_layout = ObjectProperty()
	scroll_view = ObjectProperty()

	combos = None

	def __init__(self, combos, **kwargs):
		super(SuggestedComboPopup, self).__init__(**kwargs)

		#self.scroll_view.paging_increment = 0.4

		self.combos = combos

		self.grid_layout.bind(minimum_height=self.grid_layout.setter('height'))

		self.add_buttons()

		self.combo_cc = CR['Combo']

	def add_buttons(self):

		discount_combos = CR['Combo'].get_combo_by_discount(self.combos)

		for combo in discount_combos:
			scb = SuggestedComboButton(combo['order_products'], combo['discount'])
			scb.build()
			scb.bind(on_press=self.build_combo)
			self.grid_layout.add_widget(scb)

	@pause_commit_decorator
	def build_combo(self, instance):
		self.combo_cc.auto_combo_update_cart(instance.order_products)
		self.dismiss()

class SuggestedComboButton(ButtonBehavior, BoxLayout):
	''' Combo Suggestion Button
	A button that shows combo items and discount.
	'''

	order_products = None
	discount = None

	def __init__(self, order_products, discount, **kwargs):
		super(SuggestedComboButton, self).__init__(**kwargs)
		self.order_products = order_products
		self.discount = discount

	def build(self):
		self.order_products = self.order_products
		items = []
		for op, ci in self.order_products:
			items.append(op.product.name)
			#self.ids.grid_layout.add_widget(self.build_label(op.product.name))

		self.ids.items_label.text = ', '.join(items)
		self.ids.discount.text = 'Discount: $%s' % unicode(self.discount)


	def build_label(self, text, size_hint_x=1.0, halign='left'):

		label = FullWidthLabel(text=text,
							   size_hint_x=size_hint_x,
							   halign=halign)
		#label.color = label.kv_theme('cart_text_color')
		label.padding_x_divider = 0

		return label

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: assert error on some files with character detail analysi

Post by Beth » Wed Dec 10, 2014 5:54 pm

Thank you for the report.

Were you running DiffMerge on Ubuntu 2014 this entire time? I don't think it was tested with that version.

Did you have any updates to your gtk?
Beth Kieler
SourceGear Technical Support

kived
Posts: 2
Joined: Wed Dec 10, 2014 10:57 am

Re: assert error on some files with character detail analysi

Post by kived » Fri Dec 12, 2014 11:27 am

I have upgraded Ubuntu regularly whenever a release is available, and I use Gnome Shell. My current GTK versions are 2.24.25-0ubuntu1 (GTK2) and 3.12.2-0ubuntu15.1 (GTK3). My last update to any GTK was on 11/15 from GTK3 version 3.12.2-0ubuntu15 to 3.12.2-0ubuntu15.1.

Post Reply