Recent

Author Topic: Dbase on Power PC  (Read 21913 times)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Dbase on Power PC
« Reply #15 on: August 31, 2009, 10:52:15 pm »
I have just uploaded a new version at

http://www.ctd.com.au/mac.html

It has the latest daily snapshots.

I am of to sleep now.
I hope when I get up I will have happy news that someone has tested it and found it works.

It crashes when opening the database file:

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
0x003a77b4 in DBF_IDXFILE_TMDXPAGE_$__GETISINNERNODE$$BOOLEAN ()
(gdb) bt
#0  0x003a77b4 in DBF_IDXFILE_TMDXPAGE_$__GETISINNERNODE$$BOOLEAN ()
#1  0x003a78cc in DBF_IDXFILE_TINDEXPAGE_$__SETPAGENO$LONGINT ()
#2  0x003aa438 in DBF_IDXFILE_TINDEXFILE_$__READINDEXES ()
#3  0x003a9128 in DBF_IDXFILE_TINDEXFILE_$__OPEN ()
#4  0x00398cd0 in DBF_DBFFILE_TDBFFILE_$__OPEN ()
#5  0x002b1c30 in DBF_TDBF_$__INTERNALOPEN ()
#6  0x002bb3fc in DB_TDATASET_$__DOINTERNALOPEN ()
#7  0x002bca7c in DB_TDATASET_$__OPENCURSOR$BOOLEAN ()
#8  0x002bcf2c in DB_TDATASET_$__SETACTIVE$BOOLEAN ()
#9  0x00055194 in TFRMMAIN__BTNOPENCLICK (SENDER=0x2dd56d0, this=0x2fa8210) at pmain.pas:332
#10 0x00194940 in TCONTROL__CLICK (this=0x2dd56d0) at control.inc:2264
#11 0x00222030 in TBUTTONCONTROL__CLICK (this=0x2dd56d0) at buttoncontrol.inc:72
#12 0x00222958 in TCUSTOMBUTTON__CLICK (this=0x2dd56d0) at buttons.inc:164
#13 0x002230f8 in TBUTTON__CLICK (this=0x2dd56d0) at buttons.inc:331
#14 0x00221dcc in TBUTTONCONTROL__WMDEFAULTCLICKED (MESSAGE={MSG = 66567, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMHI = 0, WPARAMLO = 0, LPARAMHI = 0, LPARAMLO = 0, RESULTHI = 0, RESULTLO = 0}, this=0x2dd56d0) at buttoncontrol.inc:26
#15 0x00011678 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#16 0x001932e0 in TCONTROL__WNDPROC (THEMESSAGE={MSG = 66567, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMHI = 0, WPARAMLO = 0, LPARAMHI = 0, LPARAMLO = 0, RESULTHI = 0, RESULTLO = 0}, this=0x2dd56d0) at control.inc:1630
#17 0x00186930 in TWINCONTROL__WNDPROC (MESSAGE={MSG = 66567, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMHI = 0, WPARAMLO = 0, LPARAMHI = 0, LPARAMLO = 0, RESULTHI = 0, RESULTLO = 0}, this=0x2dd56d0) at wincontrol.inc:5012
#18 0x001dcd4c in DELIVERMESSAGE (TARGET=0x2dd56d0, AMESSAGE=void) at lclmessageglue.pas:111
#19 0x001dce88 in SENDSIMPLEMESSAGE (TARGET=0x2dd56d0, MSG=66567) at lclmessageglue.pas:141
#20 0x001dd540 in LCLSENDCLICKEDMSG (TARGET=0x2dd56d0) at lclmessageglue.pas:520
#21 0x0023c9c0 in TCARBONCUSTOMBUTTON__HIT (ACONTROLPART=10, this=0x49df850) at carbonbuttons.pp:348
#22 0x0022e6c8 in CARBONCONTROL_HIT (ANEXTHANDLER=0xbfffb698, AEVENT=0x2e08970, AWIDGET=0x49df850) at carbonprivatecontrol.inc:46
#23 0x96001c4c in DispatchEventToHandlers ()
#24 0x96000de4 in SendEventToEventTargetInternal ()
#25 0x9601dd08 in SendEventToEventTarget ()
#26 0x96078e3c in SendControlHit ()
#27 0x96078cd0 in HIView::NotifyControlHit ()
#28 0x960e3160 in HIView::ClickInternal ()
#29 0x960d1714 in HIView::ClickSelf ()
#30 0x96010524 in HIView::EventHandler ()
#31 0x96001c4c in DispatchEventToHandlers ()
#32 0x96000de4 in SendEventToEventTargetInternal ()
#33 0x9601dd08 in SendEventToEventTarget ()
#34 0x960cedc0 in HIView::Click ()
#35 0x960cec28 in HandleClickAsHIView ()
#36 0x960ce528 in HandleWindowClick ()
#37 0x960ce30c in HandleMouseEvent ()
#38 0x96087c7c in StandardWindowEventHandler ()
#39 0x96001c4c in DispatchEventToHandlers ()
#40 0x96000de4 in SendEventToEventTargetInternal ()
#41 0x9601dd08 in SendEventToEventTarget ()
#42 0x96030eac in ToolboxEventDispatcherHandler ()
#43 0x960020a0 in DispatchEventToHandlers ()
#44 0x96000de4 in SendEventToEventTargetInternal ()
#45 0x9601dd08 in SendEventToEventTarget ()
#46 0x001ca194 in TCARBONWIDGETSET__APPPROCESSMESSAGES (this=0x2dda310) at carbonobject.inc:486
#47 0x0003a6f4 in TAPPLICATION__HANDLEMESSAGE (this=0x2f2c010) at application.inc:1135
#48 0x0003adec in TAPPLICATION__RUNLOOP (this=0x2f2c010) at application.inc:1269
#49 0x001c94e8 in EVENTLOOPEVENTHANDLER (INHANDLERCALLREF=0xbfffdc98, INEVENT=0x2e65030, INUSERDATA=0x2dda310) at carbonobject.inc:126
#50 0x96001c4c in DispatchEventToHandlers ()
#51 0x96000de4 in SendEventToEventTargetInternal ()
#52 0x96000c00 in SendEventToEventTargetWithOptions ()
#53 0x96030b8c in ToolboxEventDispatcherHandler ()
#54 0x960020a0 in DispatchEventToHandlers ()
#55 0x96000de4 in SendEventToEventTargetInternal ()
#56 0x9601dd08 in SendEventToEventTarget ()
#57 0x9608c4ac in ToolboxEventDispatcher ()
#58 0x960889e8 in RunApplicationEventLoop ()
#59 0x001ca010 in TCARBONWIDGETSET__APPRUN (ALOOP=0x3ada0 <TAPPLICATION__RUNLOOP>, this=0x2dda310) at carbonobject.inc:434
#60 0x0003ad7c in TAPPLICATION__RUN (this=0x2f2c010) at application.inc:1257
#61 0x00002464 in PASCALMAIN () at Theory_can_be_fun.lpr:20
#62 0x00024440 in SYSTEM_FPC_SYSTEMMAIN$LONGINT$PPCHAR$PPCHAR ()
#63 0x000020fc in _start ()
#64 0x00001e00 in start ()

(this is on an Intel Mac under emulation, but that shouldn't matter).

Can you make a small program that simply opens the database the same way you do it your program? So without a dialog box or anything, just opening a dbf file with a certain name.

freddynerk

  • Jr. Member
  • **
  • Posts: 96
Re: Dbase on Power PC
« Reply #16 on: September 01, 2009, 12:45:37 am »
Hi All,

I have created a very small application.
It finds the path for the database file.
Sets its filepath
sets the tablename
then active:= True;
This is handled in the Activate event.
I have included the source.

http://www.ctd.com.au/mac.html

Powerpc emulator , what is this interesting piece of software?

Tom

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Dbase on Power PC
« Reply #17 on: September 01, 2009, 10:31:50 am »

Powerpc emulator , what is this interesting piece of software?

It's included with Mac OS X, and called Rosetta. As Apple said when it announced it, "it's the most interesting software you'll never see".

The binary you put on your website is a PowerPC binary. You can run it directly on an Intel Mac by simply double clicking it. Rather than crashing with a segmentation fault, it will just seem to hang after you try to open a dbf file due to the fact that the emulated signal handling is not 100% compatible with native signals.

There is a way to run such emulated binaries under the debugger, documented at http://developer.apple.com/legacy/mac/library/documentation/MacOSX/Conceptual/universal_binary/universal_binary_exec_a/universal_binary_exec_a.html

I would not recommend you to do so, unless you are familiar with the gdb command line.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Dbase on Power PC
« Reply #18 on: September 01, 2009, 10:58:19 am »
Hi All,

I have created a very small application.
It finds the path for the database file.
Sets its filepath
sets the tablename
then active:= True;
This is handled in the Activate event.
I have included the source.

It works fine.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Dbase on Power PC
« Reply #19 on: September 01, 2009, 11:05:03 am »
Hi All,

I have created a very small application.
It finds the path for the database file.
Sets its filepath
sets the tablename
then active:= True;
This is handled in the Activate event.
I have included the source.

It works fine.

Or maybe not: it doesn't crash, but the grid in the window is empty (as if there are no records in the database -- but the field titles are correct).

Can you please make a command line version that does not depend on the LCL? (i.e., it directly uses the dbf unit, it does not use dbgrid etc.)

freddynerk

  • Jr. Member
  • **
  • Posts: 96
Re: Dbase on Power PC
« Reply #20 on: September 01, 2009, 11:35:40 am »
excuse my ignorance but how do I make a command line version only.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Dbase on Power PC
« Reply #21 on: September 01, 2009, 11:54:06 am »
excuse my ignorance but how do I make a command line version only.

In that case you might want to submit the Lazarus version of the test program (only the source and the database file, not the compiled version) as a Lazarus bug report at http://bugs.freepascal.org

Please mention as much information as possible, do not assume that the person who reads the report has read this thread.

freddynerk

  • Jr. Member
  • **
  • Posts: 96
Re: Dbase on Power PC
« Reply #22 on: September 01, 2009, 11:57:57 am »
Thanks for that.
I will make one up now and post the bug.

Tom

 

TinyPortal © 2005-2018