Bug 5276 (int-141722)

Summary: hildon-games-wrapper crashes in hgw_conf_request_string if gconf key has no value
Product: [Maemo Official Applications] Games Reporter: Javier S. Pedro <maemo>
Component: GeneralAssignee: unassigned <nobody>
Status: VERIFIED FIXED QA Contact: games-general-bugs
Severity: normal    
Priority: Low CC: andre_klapper, urho.konttori
Version: 5.0/(3.2010.02-8)Keywords: patch
Target Milestone: 5.0/(10.2010.19-1)   
Hardware: All   
OS: Maemo   
Attachments: testcase
proposed patch

Description Javier S. Pedro (reporter) 2009-10-05 01:46:06 UTC
SOFTWARE VERSION: hildon-games-wrapper 1.9.4 (diablo & fremantle).

1. Call hgw_conf_request_string with a unassigned GConf key without default
value or no schema.

hgw_gconf_request_string returning something other than HGW_ERR_NONE.



The library has no -dbg package. I'll try to build my own and make a proper
coredump latter (or even a patch if it's easy enough).

An initial guess is that gconf sends a dbus message the library doesn't parse

This has been bugging me for a while because I have to ensure no value is unset
before spawning the game from osso-games-startup, but I guess the builtin games
already take care of that for themselves.
Comment 1 Javier S. Pedro (reporter) 2009-10-06 00:22:08 UTC
Created an attachment (id=1398) [details]

Attaching a simple app currently crashing, build in Fremantle SDK with gcc -o
test -lhgw test.c .

Before running, make sure to "export HGW_EXEC_SERVICE=com.blabla.bla" and
"export HGW_EXEC_SERVICE=com.blabla.bla".

This fails with the following backtrace:
#0  0x00000000 in ?? ()
#1  0xf7e99d8b in _dbus_type_reader_recurse (reader=0xffffcfc8, sub=0xffffcf90)
    at dbus-marshal-recursive.c:1020
#2  0xf7e9ec2c in dbus_message_iter_recurse (iter=0xffffcfc0, sub=0xffffcf88)
    at dbus-message.c:1883
#3  0xf7fdec95 in get_value_from_daemon (conn=0x804caa8, 
    path=0x80486a7 "/apps/unset_key", dest=0x8049820, type=1) at hgw_conf.c:161
#4  0xf7fdef3c in hgw_conf_request_string (ctx=0x804e2b8, 
    value_path=0x80486a7 "/apps/unset_key", dest=0x8049820 "") at hgw_conf.c:72
#5  0x08048572 in main ()
Comment 2 Javier S. Pedro (reporter) 2009-10-06 00:23:48 UTC
Created an attachment (id=1399) [details]
proposed patch

And my proposed fix. This introduces a new HgwError, HGW_ERR_NO_VALUE, but of
course that can be debated.
Comment 3 Urho Konttori 2010-02-25 15:26:23 UTC
integrated to pr1.2
Comment 4 Andre Klapper maemo.org 2010-02-25 18:01:56 UTC
This has been fixed in package
hildon-games-wrapper 1.9.4-5+0m5
which is part of the internal build version
(Note: 2009/2010 is the year, and the number after is the week.)

A future public update released with the year/week later than this internal
build version will include the fix. (This is not always already the next public
Please verify that this new version fixes the bug by marking this bug report as
VERIFIED after the public update has been released and if you have some time.

To answer popular followup questions:
 * Nokia does not announce release dates of public updates in advance.
 * There is currently no access to these internal, non-public build versions.
   A Brainstorm proposal to change this exists at
Comment 5 Andre Klapper maemo.org 2010-03-15 21:10:38 UTC
Setting explicit PR1.2 milestone (so it's clearer in which public release the
fix will be available to users).

Sorry for the bugmail noise (you can filter on this message).
Comment 6 Javier S. Pedro (reporter) 2010-05-04 18:32:14 UTC
Verified under x86 SDK: hgw now returns HGW_ERR_NO_VALUE ("res: -23" in
testcase). Thanks!