Recent

Author Topic: [Resolved] Apache Module - Segment 11 - when accessing TField's .AsAnything...  (Read 1822 times)

ozznixon

  • Full Member
  • ***
  • Posts: 119
    • http://www.modernpascal.com/
I am working in an environment when I can not install the debugger...

My Code -> Dataset.FieldByName('FIELDNAME').AsString:='0';

Terminates the app... same code in command line, runs perfectly. Change to AsInteger:=0, same thing.

When calling AsString or AsInteger - what is actually happening? I tried to follow the source on github, without seeing anything - hopefully someone can simply trace the code and reply with a dump. The Dataset is THalcyon7Dataset - tested and works perfectly outside of Apache. On Apache, Reads of .AsAnything work, but the writes of .AsAnything fail. (and note, running same code outside of Apache works perfectly, so it is either a memory restriction as a .so, or some other type of permission restriction) - again the Apache module works fine reading the field data.  :o

I assume the TField.AsAnything is calling TField.TDataset.GetFieldData(Self, Buffer) or something similar, so I can put more debug messages in the TDataset (do not have db.pas source on this environment).

FPC v2.6.4 Linux 64bit, CentOS Server in my office, then I upload the .so to the Cloud...  ssh access only... so I am doing a lot of ap_log_error() calls right now.

Ozz
« Last Edit: March 03, 2017, 04:44:59 pm by ozznixon »
---
Want to kick the tires to a Free Pascal like script engine? http://www.ModernPascal.com/

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: Apache Module - Segment 11 - when accessing TField's .AsAnything...
« Reply #1 on: February 21, 2017, 02:04:29 pm »
FPC v2.6.4 is unsupported.. we are at FPC 3.0.2.
THalcyon7Dataset : Why would you want to use that?
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

ozznixon

  • Full Member
  • ***
  • Posts: 119
    • http://www.modernpascal.com/
Re: Apache Module - Segment 11 - when accessing TField's .AsAnything...
« Reply #2 on: March 03, 2017, 04:44:16 pm »
FPC v2.6.4 is unsupported.. we are at FPC 3.0.2.
THalcyon7Dataset : Why would you want to use that?


v3.0.0 broke things for us, and I used xBase, because I get paid [a lot (6 digits)] a year to do so... and we do over that amount a month in sales/licenses since FoxPro development stopped in 2009/2010.

Anyway, I found the issue is exception handling in Apache does not always work.... the lib file raises the exception up to the host. The actual error was down in DataEvent, disabled the call - as I am not GUI bound as this is a web module... just took days to trace it down to the actual line dying down in the RTL units. Why do people always retort questions like WHY, instead of addressing the question?  >:D ... this is why I make my own products.

Ozz
---
Want to kick the tires to a Free Pascal like script engine? http://www.ModernPascal.com/

 

TinyPortal © 2005-2018