View Issue Details

IDProjectCategoryView StatusLast Update
0001423NoesisGUIC++ SDKpublic2019-04-25 18:00
ReporterstonstadAssigned Tosfernandez 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.2.0b6 
Target Version2.2.2Fixed in Version2.2.2 
Summary0001423: ToolTipService.SetToolTip on ListBoxItem Causes Crash
DescriptionListBoxItem lb = _Root.FindName("_lb") as ListBoxItem;
ToolTipService.SetToolTip(lb, new ToolTip());

// crash!
TagsNo tags attached.
PlatformAny

Activities

stonstad

stonstad

2019-03-12 15:59

reporter   ~0005521

Please close this issue -- it was caused by a null parameter being passed to SetToolTip.
jsantos

jsantos

2019-03-12 19:16

manager   ~0005523

Was this crashing (restarting) Unity? If affirmative then we need to solve that.
stonstad

stonstad

2019-03-13 19:29

reporter   ~0005524

Yes -- it crashes Unity. Seems to be two separate behaviors. 1) Sending in null to SetToolTip causes a crash. and 2) FindName for a listboxitem seems to always returns null.
stonstad

stonstad

2019-03-13 22:05

reporter   ~0005526

encl. crash .dmp for above issue.

crash.zip (332,026 bytes)
jsantos

jsantos

2019-03-14 00:46

manager   ~0005529

@sfernandez, this is the native code crashing (obj is null)
void ToolTipService::SetToolTip(DependencyObject* obj, BaseComponent* toolTip)
{
    NS_ASSERT(obj);
    obj->SetValue<Ptr<BaseComponent> >(ToolTipProperty, toolTip);
}


By the way, the check against NULL must be done at C#, not in C++, where asserts are being used.
stonstad

stonstad

2019-03-25 19:15

reporter   ~0005557

Sure thing, no problem. Just curious -- why does it crash instead of throw an exception?
sfernandez

sfernandez

2019-04-25 18:00

manager   ~0005641

It was crashing because the native code wasn't checking if the input parameter was null, so an unhandled exception was generated closing Unity.
We added checks for all the attached properties functions so proper exceptions are thrown in C# code.

Issue History

Date Modified Username Field Change
2019-03-12 15:53 stonstad New Issue
2019-03-12 15:59 stonstad Note Added: 0005521
2019-03-12 19:16 jsantos Note Added: 0005523
2019-03-12 19:16 jsantos Assigned To => jsantos
2019-03-12 19:16 jsantos Status new => feedback
2019-03-12 19:16 jsantos Assigned To jsantos => sfernandez
2019-03-13 19:29 stonstad Note Added: 0005524
2019-03-13 19:29 stonstad Status feedback => assigned
2019-03-13 22:05 stonstad File Added: crash.zip
2019-03-13 22:05 stonstad Note Added: 0005526
2019-03-14 00:46 jsantos Note Added: 0005529
2019-03-25 19:15 stonstad Note Added: 0005557
2019-03-26 21:58 jsantos Target Version => 2.2.1
2019-04-05 12:26 sfernandez Target Version 2.2.1 => 2.2.2
2019-04-25 18:00 sfernandez Status assigned => resolved
2019-04-25 18:00 sfernandez Resolution open => fixed
2019-04-25 18:00 sfernandez Fixed in Version => 2.2.2
2019-04-25 18:00 sfernandez Note Added: 0005641