Click here to go to the forum index Click here for the home page
 
Author Message

<  TAP and patch development  ~  Crash when doing GetOSDRegionHeight

Page 1 of 1
Geoff Bacon
Posted: Thu Jul 18, 2013 8:05 pm Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4378
Hi

After successfully creating an OSD, the toppy crashes if I try to interrogate it's height (I know it works because I can use it to display output using standard functions).

Anyone have any idea what I am missing?

Code:
 Snippet:

int Rgn;
    Rgn = TAP_Osd_Create( 0, 0, MaxXValue, MaxYValue, 0, FALSE );
    TAP_Print("Rgn=%d\n", Rgn);
    TAP_Print("GetOSDRegionHeight(Rgn)=%d\n",GetOSDRegionHeight(Rgn));

The output is

Rgn=128 

$sp=80500078
$at=82cd2d70    $v0=fffec021    $v1=ffffc021    $a0=00000003
$a1=804fff0c    $a2=804fff0c    $a3=8015ac38    $t0=0000000
$t1=30008000    $t2=fc00ffff    $t3=00000001    $t4=0fffffff
$t5=0000000f    $t6=00000000    $t7=00000011    $t8=0000000d
$t9=82cd04bc    $s0=fffec821    $s1=82d643a0    $s2=82cd3b16
...


Same effect if I try to access Width etc,
I've looked though the GetOSDRegionHeight.c in the libFirebird[av] but there isn't much in that file!

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
EMJB
Posted: Thu Jul 18, 2013 8:30 pm Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3632 Location: Maldon Essex
Quick thought - has the FireBirdLib been initiated - normally he checks at the beginning of each function, but perhaps he forgot here?

EMJB

_________________
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
View user's profile Send private message
Geoff Bacon
Posted: Thu Jul 18, 2013 9:10 pm Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4378
Just checked and find that I have called both InitTAPAPIFix() and InitTAPex() in the Tap_Main routine.

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
EMJB
Posted: Fri Jul 19, 2013 8:22 am Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3632 Location: Maldon Essex
Have you tried with slightly different OSD sizes? - Perhaps there is something funny if the height 576 & width of 720.

I know it doesn't help, but am puzzled by your code - the answer should be MaxYValue so why use GetOSDRegionHeight()?

EMJB

_________________
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
View user's profile Send private message
Geoff Bacon
Posted: Fri Jul 19, 2013 9:34 am Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4378
The max values were just used as an example; I'm trying to write a generic routine for use with your routines to get the width of the region so that I can add a scrollbar. I'm trying to base the routine on FireBird's DrawWindowScrollBar.

I've tried building DialogDemo in FBs dialog folder to see if I can get that to work with a view to enhancing it to test scrolling but it won't build and googling doesn't help.

I'm using a virgin DialogDemo.c with the Makefile target as
"DialogDemo.elf:: DialogDemo.o libtap.a libFireBird.a"
It compiles but generates link errors:-
Code:
/usr/local/topfield-gcc/bin/mips-gcc -mqnxpic -fno-delayed-branch -mlong-calls -msoft-float -isystem /usr/local/topfield-gcc/topfield-sdk/include -D_TAP -O2   -c -o DialogDemo.o DialogDemo.c
/usr/local/topfield-gcc/bin/mips-gcc -mqnxpic -fno-delayed-branch -mlong-calls -msoft-float -isystem /usr/local/topfield-gcc/topfield-sdk/include -L/usr/local/topfield-gcc/topfield-sdk/lib -ltap -lc -lm   DialogDemo.o   -o DialogDemo
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x14): In function `_start':
../../../../../newlib-1.13.0/libgloss/mips/crt0.S:80: undefined reference to `hardware_hazard_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x18):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:80: undefined reference to `hardware_hazard_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x38):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:110: undefined reference to `hardware_hazard_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x3c):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:110: undefined reference to `hardware_hazard_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x9c): In function `zerobss':
../../../../../newlib-1.13.0/libgloss/mips/crt0.S:147: undefined reference to `get_mem_info'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xa4):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:150: undefined reference to `__stack'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xa8):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:151: undefined reference to `__stack'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xd0): In function `init':
../../../../../newlib-1.13.0/libgloss/mips/crt0.S:180: undefined reference to `hardware_init_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xd4):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:181: undefined reference to `hardware_init_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xe8):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:186: undefined reference to `software_init_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0xec):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:187: undefined reference to `software_init_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x100):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:192: undefined reference to `_fini'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x104):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:193: undefined reference to `_fini'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x110):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:207: undefined reference to `_init'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x128):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:219: undefined reference to `main'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x138): In function `_exit':
../../../../../newlib-1.13.0/libgloss/mips/crt0.S:260: undefined reference to `hardware_exit_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/crt0.o(.text+0x13c):../../../../../newlib-1.13.0/libgloss/mips/crt0.S:261: undefined reference to `hardware_exit_hook'
/usr/local/topfield-gcc/mips/lib/soft-float/libc.a(__atexit.o)(.text+0x78): In function `__register_exitproc':
/cygdrive/c/cygwin/topfield-gcc/build-newlib/mips/soft-float/newlib/libc/stdlib/../../../../../../newlib-1.13.0/newlib/libc/stdlib/__atexit.c:38: undefined reference to `malloc'
/usr/local/topfield-gcc/mips/lib/soft-float/libc.a(__call_atexit.o)(.text+0x184): In function `__call_exitprocs':
/cygdrive/c/cygwin/topfield-gcc/build-newlib/mips/soft-float/newlib/libc/stdlib/../../../../../../newlib-1.13.0/newlib/libc/stdlib/__call_atexit.c:74: undefined reference to `free'
DialogDemo.o(.text+0x7c): In function `TAP_EventHandler':
DialogDemo.c: undefined reference to `DialogProfileCheck'
DialogDemo.o(.text+0xf0):DialogDemo.c: undefined reference to `DialogWindowInit'
DialogDemo.o(.text+0x140):DialogDemo.c: undefined reference to `DialogProfileLoadMy'
DialogDemo.o(.text+0x158):DialogDemo.c: undefined reference to `DialogWindowReInit'
DialogDemo.o(.text+0x1e4):DialogDemo.c: undefined reference to `DialogWindowItemAdd'
DialogDemo.o(.text+0x218):DialogDemo.c: undefined reference to `DialogWindowInfoAddS'
DialogDemo.o(.text+0x248):DialogDemo.c: undefined reference to `DialogWindowShow'
DialogDemo.o(.text+0x264):DialogDemo.c: undefined reference to `DialogWindowExit'
DialogDemo.o(.text+0x278):DialogDemo.c: undefined reference to `TAP_Exit'
DialogDemo.o(.text+0x29c):DialogDemo.c: undefined reference to `DialogEvent'
collect2: ld returned 1 exit status
<builtin>: recipe for target `DialogDemo' failed
make: *** [DialogDemo] Error 1

> Process Exit Code: 2
> Time Taken: 00:01

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
BobD
Posted: Fri Jul 19, 2013 1:41 pm Reply with quote
MyStuff Team Joined: 03 Aug 2005 Posts: 4218
Aren't regions meant to be dwords?

_________________
FW: ChunkyWizard Recommended
TAPs:
MyStuff (always one version ahead of everyone else!), and recommended support TAPS
MyStuff skins, manual and latest version: http://www.BobDsMyStuff.co.uk
Known bugs & forthcoming fixes: http://www.BobDsMyStuff.co.uk/Bugs.shtml
Changes coming in the next version: http://www.BobDsMyStuff.co.uk/NextVersion.shtml
View user's profile Send private message Visit poster's website
Geoff Bacon
Posted: Fri Jul 19, 2013 5:36 pm Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4378
@BobD

Nice to know you are looking!

The wiki documentation says "int TAP_Osd_Create(dword x, dword y..."

looking at some source file I see "GetOSDRegionHeight (word Region)"

and OSDCopy is also using a word for the region

i.e. not dword (I guess int and word are interchangable size wise)

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
BobD
Posted: Fri Jul 19, 2013 7:13 pm Reply with quote
MyStuff Team Joined: 03 Aug 2005 Posts: 4218
I wasn't sure what size they compiled to, I just looked at my code side I couldn't see anything wrong with yours. Clearly mine is wrong but gets away with it!

_________________
FW: ChunkyWizard Recommended
TAPs:
MyStuff (always one version ahead of everyone else!), and recommended support TAPS
MyStuff skins, manual and latest version: http://www.BobDsMyStuff.co.uk
Known bugs & forthcoming fixes: http://www.BobDsMyStuff.co.uk/Bugs.shtml
Changes coming in the next version: http://www.BobDsMyStuff.co.uk/NextVersion.shtml
View user's profile Send private message Visit poster's website
Geoff Bacon
Posted: Fri Jul 19, 2013 7:52 pm Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4378
Yours will work fine as you will only be using the low word of the dword.

Of course if it did require a dword then that could have been the cause of the problem.

Thanks anyway

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
Geoff Bacon
Posted: Fri Jul 19, 2013 10:43 pm Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4378
I'm getting really confused now.

I've copied all the relevent bits of DialogDemo.c into my tap (fsCheck.c) and it compiles and links without errors.

I then renamed DialogDemo.c to *_old.c.
Copied fsCheck.c into DialogDemo.c and did a make (identical data in the Makefile to fsCheck apart from the change in the name). Make also performed using -B.

Get the same problem as before i.e. complaints about hardware_init_hook and missing Dialog* modules.

To summarize, it builds without issues when called fsCheck but fails when it is another name! (I tried calling it Demo.c as well!)

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
Geoff Bacon
Posted: Fri Jul 19, 2013 11:02 pm Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4378
Ok ignore the above post.

Found that the makefile didn't have a "Demo: Demo.tap" line.
Also found that I had to use a different name for the target e.g. "DemoX: Demo,tap"

As least I can now build it properly.

Made similar changes to buildthe pukka Firebird DialogDemo.c
Unfortunately, this crashes the toppy so I'm no further on (I was hoping it would work and I could then make it look more like fsCheck to see what was causing it).
Adding InitTAPAPIFix() and InitTAPex() did not fix the problem.

Ho Hum.

Has anyone successfully managed to use the dialog routines in the Firebird library?

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website
EMJB
Posted: Sat Jul 20, 2013 6:18 am Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3632 Location: Maldon Essex
Geoff Bacon wrote:
The max values were just used as an example ...
Was concerned it might be a bad example, but if you have tried other values then that is obviously a red herring.

EMJB

_________________
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
View user's profile Send private message
EMJB
Posted: Sat Jul 20, 2013 6:21 am Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3632 Location: Maldon Essex
Geoff Bacon wrote:
..... Has anyone successfully managed to use the dialog routines in the Firebird library?
I'm pretty sure HDFW uses them, and they worked as designed, but not how I wanted, when I tried using them in CO.

EMJB

_________________
Silver 5800, Board Rev 1.2, MS recomm F/W, Sudbury Tx, varying TAP config
View user's profile Send private message
Geoff Bacon
Posted: Sat Jul 20, 2013 7:05 am Reply with quote
Frequent contributor Joined: 12 Jan 2007 Posts: 4378
Do you have a link to the HDFW sources; I've failed to find it (several attempts)

Perhaps we should take thisa offline?

Geoff

_________________
TopManager program
TF5800, TS On, F/W: MS6 Recommended F/W 12/9/2009 -Sy+EvEzPfUUuZ
TAPs: PcControl B1.4; StopExit v1.01; PruneEPG 1.0; fsSave 1.1; QuickJump 1.72; SecCache (UK) v0.4; EIT Sub (Game) v0.6; EPG2MEI v0.96; MyStuff 6.6; Bookmark 3.0; Extend v1.7; Font Manager 1.0d; MyInfo B5.6; MHEG On/Off A3;
Sig generated by EMJB's MyInfo.tap on 29/12/18
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT + 1 Hour
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum