Rockbox

Tasklist

FS#9281 - Rename of splash functions and fix some gcc4.3.1 warnings

Attached to Project: Rockbox
Opened by Nils Wallménius (nls) - Thursday, 14 August 2008, 21:34 GMT
Last edited by Nils Wallménius (nls) - Friday, 15 August 2008, 08:28 GMT
Task Type Patches
Category Applications
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch does the following:

1) Removes gui_splash()

2) Rename gui_syncsplash() to splashf() and removed its voice capabilities.

3) Rename the internal splash() to splash_internal() and introduce an externally visible splash() that handles simple printing without printf functionality e.g splash(HZ, ID2P(LANG_FOO)); or splash(HZ, "foo"); LANG_* id's will be voiced.

4) adjust all places that called gui_syncsplash() to use the correct version from above, and the same for plugins, and now also have naming consistency with the plugins.
(Earlier rb->splash() was used to call gui_syncsplash())


Anyway, I have not yet committed this because I ran into a weird crash bug on my 64 bit sim, it does not crash on target or 32 bit sims.
On my sim any call to splashf() will segfault after the splash is displayed, gdb tells me the crash is in strlen...

I have discovered a couple of crazy things about the crash.
placing DEBUGF("foo\n"); before the call to splashf makes it not crash.

When I turned on optimization when compiling the sim it would only crash with a voicefile present, without optimization voicefile doesn't matter.

I would really like some help trying to pin down this issue as I don't really know where to look next...
This task depends upon

Closed by  Nils Wallménius (nls)
Friday, 15 August 2008, 08:28 GMT
Reason for closing:  Accepted
Additional comments about closing:  committed as r 18282
Comment by Steve Bavin (pondlife) - Friday, 15 August 2008, 06:19 GMT
Is P2STR and P2ID, should "p<=VIRT_PTR+VIRT_SIZE" be "p<VIRT_PTR+VIRT_SIZE"

A couple of (minor, silly) questions:
1) In splashf, why cast to (unsigned char *)? Should it not be (const char *)?
2) Should "splash(1," ever be used? I'd think "aplash(HZ," or "splash(0,".
3) Maybe the splash timer should be standardised and the first parameter made into a bool wait (false meaning time=0, true meaning time = HZ*2)?
Comment by Nils Wallménius (nls) - Friday, 15 August 2008, 07:57 GMT
ok, new patch, fixed the crashbug mentioned above, it was already present in svn code...
fixed the macros s/<=/</

1) it comes down to the constants VIRT_PTR and VIRT_SIZE being defined as unsigned char* so gcc complains about comparisons between different pointer types.

2) I don't see a reason for it either so i changed the two occurrences to splash(0 (screens.c and bubbles.c)

3) I think we would loose much flexibility by doing this but I agree that we should set a standard splash time to be used in most of the core, maybe a new define like
#define STD_DELAY HZ*2
and
splash(STD_DELAY, "foo");

Loading...