Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #1746

Problem with DragAnObject on RISC OS 6.20

Date 2012-05-26 22:50 +0100
From Matthew Phillips <spam2011m@yahoo.co.uk>
Newsgroups comp.sys.acorn.programmer
Subject Problem with DragAnObject on RISC OS 6.20
Message-ID <d3bc1c9652.Matthew@sinenomine.freeserve.co.uk> (permalink)

Show all headers | View raw


Does anyone know of any change to the DragAnObject module in RISC OS 6.20
which might be causing some code to crash only on that version of the
operating system?  Impact's database record card design uses DragAnObject to
allow users to drag fields around the card.  It has worked fine for a number
of years on most versions of RISC OS, and I can verify that it works on 4.02,
4.39, 5.16 and 5.18.  Users of RISC OS 6.20 are reporting that Impact crashes
immediately on the drag starting.

I've appended a typical back trace.  A function within Impact called
Drag_Object calls the SWI DragAnObject_Start (via a generic library function
called Swi) with a C function as the callback for rendering.  The SWI is
called via _kernel_swi.  While within that library function an address
exception occurs, which is passed to my signal handler which spits out the
back trace to a file.

The code works fine on lots of other versions of RISC OS, but fails every
time on RISC OS 6.20.  Does anyone know of any changes which might have
caused this?

In <dd968d15-13ad-4f4b-a736-74152f76dcb3@c26g2000vbq.googlegroups.com> (3
June 2011) James Lampard described a fault in DragAnObject which could lead
to stack overflows and aborts on 32-bit systems, which was fixed in ROOL's
DragAnObject 0.09.  Might there be a chance that RISC OS 6.20's version of
the module still has this fault and it is coming to the surface for some
reason?  RISC OS 6.20 is able to be compiled as a 32-bit system, so maybe
26-bit builds are affected somehow as well?  All speculation on my part.

The other thing I am considering is a fault in Impact.  The documentation is
a bit sparse as to what environment your C program might expect to receive. 
I have found a problem (on RISC OS 4.02, but not on 5.16, not tested on
others) where using setjmp and longjmp within the rendering callback code
caused a crash, so I had to trap errors in other ways.  I think the crashes
occurred even if setjmp was called and longjmp was not needed.  Maybe RISC OS
6.20 is less tolerant of something else I am doing wrong?

I could always fall back on Wimp_DragBox, but it would be nicer to use
DragAnObject.

Any ideas before I insert masses of debug code to attempt to debug at a
distance?

Thanks,

Matthew


Serious error at 18:14:04 25th May 2012, user quitting...
Impact, version 3.40 (10-Jan-2012)
WIMP version 6.61

Internal error: Abort on data transfer at &0386B0E4

Postmortem requested

Stack backtrace
  Arg2: 0x00000001           1
  Arg1: 0x0009b800      636928 -> [0x65746e49 0x6c616e72 0x72726520 0x203a726f]
385d0d0 in function _sys_error
  Arg1: 0x00000005           5
38645f0 in function _real_default_signal_handler
  Arg2: 0x00000000           0
  Arg1: 0x00000005           5
38646f4 in function _raise_trap
  Arg1: 0x00000005           5
386474c in function raise
  Arg1: 0x00000005           5
897c8 in function SignalHandler
386b100 in unknown procedure
  Arg1: 0x0009d20c      643596 -> [0x00050190 0x000122d4 0x0009d1fc 0x0009d258]
3859778 in shared library function
  Arg2: 0x0009d20c      643596 -> [0x00050190 0x000122d4 0x0009d1fc 0x0009d258]
  Arg1: 0x00049c40      302144 -> [0xe594100c 0xe5b2300c 0xe1510003 0x0a000004]
758ec in function Swi
  Arg5: 0x00000000           0
  Arg4: 0x00000190         400
  Arg3: 0x0009d258      643672 -> [0x0000042a 0x00000424 0x00000624 0x0000045c]
  Arg2: 0x000e7424      947236 -> [0x6e69614d 0x00000000 0x00000000 0x00000000]
  Arg1: 0x000122d4       74452 -> [0xe1a0c00d 0xe92dd831 0xe24cb004 0xe15d000a]
65540 in function Drag_Object
  Arg1: 0x000e7424      947236 -> [0x6e69614d 0x00000000 0x00000000 0x00000000]
12490 in function C_DragSelection
  Arg3: 0x00000040          64
  Arg2: 0x00000007           7
  Arg1: 0x000e2a7c      928380 -> [0x5fc1ba39 0x00000000 0x000e6384 0x000da8b8]
.....

-- 
Matthew Phillips
Durham

Back to comp.sys.acorn.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Problem with DragAnObject on RISC OS 6.20 Matthew Phillips <spam2011m@yahoo.co.uk> - 2012-05-26 22:50 +0100
  Re: Problem with DragAnObject on RISC OS 6.20 Steve Fryatt <news@stevefryatt.org.uk> - 2012-05-26 23:15 +0100
  Re: Problem with DragAnObject on RISC OS 6.20 Gerph <gerph@gerph.org> - 2012-05-26 15:59 -0700
    Re: Problem with DragAnObject on RISC OS 6.20 Matthew Phillips <spam2011m@yahoo.co.uk> - 2012-05-28 08:42 +0100
      Re: Problem with DragAnObject on RISC OS 6.20 Gerph <gerph@gerph.org> - 2012-05-28 12:00 -0700
        Re: Problem with DragAnObject on RISC OS 6.20 Matthew Phillips <spam2011m@yahoo.co.uk> - 2012-05-28 23:39 +0100
        Re: Problem with DragAnObject on RISC OS 6.20 Matthew Phillips <spam2011m@yahoo.co.uk> - 2012-05-28 23:54 +0100
          Re: Problem with DragAnObject on RISC OS 6.20 Matthew Phillips <spam2011m@yahoo.co.uk> - 2012-06-08 00:35 +0100
            Re: Problem with DragAnObject on RISC OS 6.20 Gerph <gerph@gerph.org> - 2012-06-12 13:18 -0700

csiph-web