Bug 194435

Summary: yast2 dumps core
Product: [openSUSE] openSUSE 10.2 Reporter: Steffen Winterfeldt <snwint>
Component: YaST2Assignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Stanislav Visnovsky <visnov>
Severity: Normal    
Priority: P5 - None CC: mvidner, suse-beta
Version: Alpha 2   
Target Milestone: ---   
Hardware: i386   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 logs

Description Steffen Winterfeldt 2006-07-24 10:20:40 UTC
yast2 crashed with:

/usr/lib/YaST2/startup/YaST2.call: line 306: 4673 Aborted (core dumped) $OPT_FBITERM y2base "$Y2_MODULE_NAME" $Y2_MODE_FLAGS $Y2_MODULE_ARGS $Y2_MODE $Y2_UI_ARGS

I think it doesn't like that there's no catalog or something. Logs attached.
Comment 1 Steffen Winterfeldt 2006-07-24 10:21:34 UTC
Created attachment 94294 [details]
yast2 logs
Comment 2 Michal Zugec 2006-07-24 10:25:31 UTC
reassigned to Stano, but he is on vacation
Comment 3 Martin Vidner 2006-08-09 08:29:10 UTC
[Interpreter] Packages.ycp:653 Invalid cast of YCP value 'nil'! Should be but is not Integer!

Pkg::SourceCreateBase returned nil, Pkg::SourceProvideFile did not cope with nil as source id. I don't know which of these (or both) should be fixed.
Comment 4 Ladislav Slezák 2006-08-22 11:00:40 UTC
The problem is in the file generated by generateYCPWrappers script.

The generated code looks like this:
return m_instance->CallbackStartProvide(m_param1->asString());

If m_param1 is nil the conversion to string causes abort().

I have a patch ready - the generated code now contains a nil test before conversion. (The other YCP types are checked in compile time.)
Comment 5 Ladislav Slezák 2006-08-22 13:48:28 UTC
Fixed in yast2-core-2.13.30 - there should be an error message in the log now, returned value is nil