richelbilderbeek / BrainWeaver

BrainWeaver, tool for teacher education
https://github.com/richelbilderbeek/tools
GNU General Public License v3.0
5 stars 1 forks source link

Arrow gets left behind #288

Closed richelbilderbeek closed 6 years ago

richelbilderbeek commented 6 years ago

From the Ruffian:

2018-08-16-090635_1920x1080_scrot

richelbilderbeek commented 6 years ago

Created a YouTube video demonstrating this bug.

richelbilderbeek commented 6 years ago

Final state:

899 QEvent::Type(KeyPress) "Left" QFlags<Qt::KeyboardModifiers>(ControlModifier)
0 0x55f5b3effa40: QtTool, connected to 0
1 0x55f5b3eb02d0: QtNewArrow, connected to 0
2 0x55f5b418e900: 
QtNode: <examples></examples>,1,normal,-1,-1,-1
3 0x7f2688020760: QtNode: <examples></examples>,1,normal,-1,-1,-1
4 0x55f5b3f14270: QtNode: <examples></examples>,0,normal,0,0,0
5 0x55f5b3ef6db0: QtNode: <examples></examples>,1,center,-1,-1,-1
Closing ...
Clean exit

2018-08-18-121733_1920x1080_scrot

richelbilderbeek commented 6 years ago

Improved output:

0 0x55df476b94c0: QtTool, is visible: 0, buddy item: 0
1 0x55df476b0f00: QtNewArrow, is visible: 0, connected to 0
2 0x55df479905b0: QtNode, has parent item 0
3 0x7f269400a890: QtNode, has parent item 0
4 0x55df47869770: QtNode, has parent item 0
5 0x55df476abc00: QtNode, has parent item 0
richelbilderbeek commented 6 years ago

Probably connected to #301

[edit: this hypothesis has turned out to be false]

richelbilderbeek commented 6 years ago

Hypothesis: this is just a messy left-behind arrow in drawing, from #301. I expected fixing #301 ("QtEdges messy") to fix the problem.

[edit: this hypothesis has turned out to be false]

richelbilderbeek commented 6 years ago

Even though the arrows are not messy anymore (see #301), this Issue still occurs:

2018-08-21-081343_1920x1080_scrot

richelbilderbeek commented 6 years ago

The arrows are not saved.

288_123.zip

288_1

graph G {
0[label="<node><concept><name>As$$$SPACE$$$a$$$SPACE$$$student$$$SPACE$$$teacher$$$SPACE$$$of$$$SPACE$$$English$$$SPACE$$$as$$$SPACE$$$a$$$SPACE$$$foreign$$$SPACE$$$language$$$COMMA$$$$$$SPACE$$$I$$$SPACE$$$have$$$SPACE$$$knowledge$$$SPACE$$$of$$$SPACE$$$...</name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>0</x><y>0</y><type>center</type></node>"];
1[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>4</x><y>4</y><type>normal</type></node>"];
2[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-15</x><y>-15</y><type>normal</type></node>"];
3[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-45</x><y>-45</y><type>normal</type></node>"];
4[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-65</x><y>-65</y><type>normal</type></node>"];
5[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-85</x><y>-85</y><type>normal</type></node>"];
6[label="<node><concept><name>My$$$SPACE$$$own$$$SPACE$$$professional$$$SPACE$$$development</name><examples><example><text>Keep$$$SPACE$$$your$$$SPACE$$$portfolio$$$SPACE$$$posted$$$SPACE$$$up</text><competency>ti_knowledge</competency><is_complex>0</is_complex><is_concrete>1</is_concrete><is_specific>1</is_specific></example><example><text>Reflection</text><competency>ti_knowledge</competency><is_complex>1</is_complex><is_concrete>1</is_concrete><is_specific>1</is_specific></example></examples><concept_is_complex>1</concept_is_complex><complexity>1</complexity><concreteness>1</concreteness><specificity>1</specificity></concept><x>-101.684</x><y>-218.386</y><type>normal</type></node>"];
0--6 [label="<edge><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><has_head>0</has_head><has_tail>1</has_tail><x>-60.8421</x><y>-104.193</y></edge>"];
}

288_1

288_2

graph G {
0[label="<node><concept><name>As$$$SPACE$$$a$$$SPACE$$$student$$$SPACE$$$teacher$$$SPACE$$$of$$$SPACE$$$English$$$SPACE$$$as$$$SPACE$$$a$$$SPACE$$$foreign$$$SPACE$$$language$$$COMMA$$$$$$SPACE$$$I$$$SPACE$$$have$$$SPACE$$$knowledge$$$SPACE$$$of$$$SPACE$$$...</name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>0</x><y>0</y><type>center</type></node>"];
1[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>4</x><y>4</y><type>normal</type></node>"];
2[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-15</x><y>-15</y><type>normal</type></node>"];
3[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-45</x><y>-45</y><type>normal</type></node>"];
4[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-65</x><y>-65</y><type>normal</type></node>"];
5[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-85</x><y>-85</y><type>normal</type></node>"];
6[label="<node><concept><name>My$$$SPACE$$$own$$$SPACE$$$professional$$$SPACE$$$development</name><examples><example><text>Keep$$$SPACE$$$your$$$SPACE$$$portfolio$$$SPACE$$$posted$$$SPACE$$$up</text><competency>ti_knowledge</competency><is_complex>0</is_complex><is_concrete>1</is_concrete><is_specific>1</is_specific></example><example><text>Reflection</text><competency>ti_knowledge</competency><is_complex>1</is_complex><is_concrete>1</is_concrete><is_specific>1</is_specific></example></examples><concept_is_complex>1</concept_is_complex><complexity>1</complexity><concreteness>1</concreteness><specificity>1</specificity></concept><x>-101.684</x><y>-218.386</y><type>normal</type></node>"];
0--6 [label="<edge><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><has_head>0</has_head><has_tail>1</has_tail><x>-60.8421</x><y>-104.193</y></edge>"];
}

288_2

288_3

graph G {
0[label="<node><concept><name>As$$$SPACE$$$a$$$SPACE$$$student$$$SPACE$$$teacher$$$SPACE$$$of$$$SPACE$$$English$$$SPACE$$$as$$$SPACE$$$a$$$SPACE$$$foreign$$$SPACE$$$language$$$COMMA$$$$$$SPACE$$$I$$$SPACE$$$have$$$SPACE$$$knowledge$$$SPACE$$$of$$$SPACE$$$...</name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>0</x><y>0</y><type>center</type></node>"];
1[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-2</x><y>-2</y><type>normal</type></node>"];
2[label="<node><concept><name></name><examples></examples><concept_is_complex>1</concept_is_complex><complexity>-1</complexity><concreteness>-1</concreteness><specificity>-1</specificity></concept><x>-58</x><y>-58</y><type>normal</type></node>"];
3[label="<node><concept><name>My$$$SPACE$$$own$$$SPACE$$$professional$$$SPACE$$$development</name><examples><example><text>Keep$$$SPACE$$$your$$$SPACE$$$portfolio$$$SPACE$$$posted$$$SPACE$$$up</text><competency>ti_knowledge</competency><is_complex>0</is_complex><is_concrete>1</is_concrete><is_specific>1</is_specific></example><example><text>Reflection</text><competency>ti_knowledge</competency><is_complex>1</is_complex><is_concrete>1</is_concrete><is_specific>1</is_specific></example></examples><concept_is_complex>1</concept_is_complex><complexity>1</complexity><concreteness>1</concreteness><specificity>1</specificity></concept><x>-101.684</x><y>-228.386</y><type>normal</type></node>"];
}

288_3

richelbilderbeek commented 6 years ago

Is it a coincidence that all left-over arrows are connected to the center node?

[edit] Yes. The center node is selected more often, but the error does not reside in a connection to the center node

richelbilderbeek commented 6 years ago

Left-over arrows can be left over from the deletion of non-center nodes as well:

2018-08-21-094342_869x712_scrot

richelbilderbeek commented 6 years ago

It is caused by an Undo on CreateNewEdge!

2018-08-21-141754_1920x1080_scrot

richelbilderbeek commented 6 years ago
Do command: "Create new normal << node with text '' at (0, 0)"
357 KeyPress "Shift+E"
358 KeyPress "Shift+Del"
Do command: "delete selected nodes and edges"
QtQuadBezierArrowItem must have a parent
QtQuadBezierArrowItem must have a parent
QBackingStore::endPaint() called with active painter on backingstore paint device
richelbilderbeek commented 6 years ago

Cannot reproduce anymore after +100K random actions did not cause crashes anymore. Assuming this is fixed. Closing this Issue for that reason.