On possible problem that comes to mind is that in the OS 3.5 debug ROM, you will get a
bus error if you attempt to draw to the
screen when a form first loads, but before your active form calls FrmDrawForm().
I presume this was added to protect developers from the change in drawing behaviour in
which FrmDrawForm() now erases the entire
window, which would erase any drawing you did before the call to FrmDrawForm.
So my first question would be if you are trying to draw before the form is formally
drawn with FrmDrawForm(), which generally occurs
after handling your frmOpenEvent?
Ng Wei Gee wrote:
> Hi,
>
> I've a statement that draws a line in the window:
>
> WinDrawLine (bounds.topLeft.x, bounds.topLeft.y + bounds.extent.y,
> bounds.topLeft.x + bounds.extent.x, bounds.topLeft.y + bounds.extent.y);
>
> At runtime, the values of bounds are:
> topLeft.x = 0
> topLeft.y = 62
> extent.x = 160
> extent.y = 80
>
> The code runs fine on all on-debug ROMs on OS3.0, 3.1, 3.3 and 3.5. The code
> also runs fine on debug ROMs of OS 3.0, 3.1 and 3.3. However, I always get a
> bus error when I run it on the debug ROM for OS3.5. Can someone please
> enlighten me?! Attached below the the asm code for anyone who can
> understand. I don't have the slightest knowledge of assembly so I guess I
> can't help myself there... :(
>
> Regards,
> Gee.
>
> 10C565F2: 24680020 movea.l 32(a0),a2
> 10C565F6: 1612 move.b (a2),d3
> 10C565F8: 182A0001 move.b 1(a2),d4
> 10C565FC: 4212 clr.b (a2)
> 10C565FE: 422A0001 clr.b 1(a2)
> 10C56602: 3F2E000E move.w 14(a6),-(sp)
> 10C56606: 3F2E000C move.w 12(a6),-(sp)
> 10C5660A: 3F2E000A move.w 10(a6),-(sp)
> 10C5660E: 3F2E0008 move.w 8(a6),-(sp)
> 10C56612: 4EBAFE16 jsr *-488 ; 0x10c5642a
> 10C56616: 1483 move.b d3,(a2)
> 10C56618: 15440001 move.b d4,1(a2)
> 10C5661C: 504F addq.w #8,sp
> 10C5661E: 4CDF0418 movem.l (sp)+,d3-d4/a2
> 10C56622: 4E5E unlk a6
> 10C56624: 4E75 rts
> 10C56626: 8B57 or.w d5,(sp)
> 10C56628: 696E bvs.s *+112 ; 0x10c56698
> 10C5662A: 447261774C696E6500004E56 neg.w ([1281977957,a2],20054)
> 10C56636: 000048E7 ori.b #0xe7,d0
> 10C5663A: 1C20 move.b -(a0),d6
> 10C5663C: 20780194 movea.l 0x00000194,a0
> 10C56640: 24680020 movea.l 32(a0),a2
> 10C56644: 1612 move.b (a2),d3
> 10C56646: 182A0001 move.b 1(a2),d4
> 10C5664A: 1A2A0010 move.b 16(a2),d5
> 10C5664E: 4212 clr.b (a2)
> 10C56650: 422A0001 clr.b 1(a2)
> 10C56654: 156A00110010 move.b 17(a2),16(a2)
> 10C5665A: 3F2E000E move.w 14(a6),-(sp)
> 10C5665E: 3F2E000C move.w 12(a6),-(sp)
> 10C56662: 3F2E000A move.w 10(a6),-(sp)
> 10C56666: 3F2E0008 move.w 8(a6),-(sp)
>
> (arbituarily cut here, I dunno how much to copy)
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/