NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: trent on April 22, 2012, 04:16:13 PM
-
Hi Everyone,
I am converting our win32 app reports into WebServer and am receiving GPF errors only on certain builds when nothing has changed. The process is:
1. Select drill-down data on a NetWebForm.
2. User presses Save button which does validation of the Form.
3. The validation calls a Window(ABC) procedure to do a count to see if there are records to report on (if there are none then validation fails).
4. If the count returns records then user is taken to another NetWebForm which has a Print(Other) button.
4. User presses Print button and Report(ABC) procedure is called.
The GPF error happens at step 3. I have a debug (trace) statement just before the call to the Window(ABC) procedure to do the count and debug statement in the Init > Enter Procedure Scope embed of the Window(ABC) procedure. On the builds that I get the GPF I see the debug before the count procedure starts and then the GPF occurs.
To fix this I open any embed on the Window(ABC) procedure, click save and close without changing any code at all, then re-build WebServer and the GPF does not occur. On the next build, if I do not do this, then the GPF error occurs again.
Anyone know why this is happening?
Regards,
Trent
-
seems a bit odd - what clarion version are you on? As a workaround can you move your validation to a source procedure?
-
Hi Kevin,
Clarion version 8.0.0.8973. I can't really change the procedure to a NetWebSource as the procedure uses a template built by our win32 developer that isn't compatible with NetTalk (the embeds for the template do not appear when I add the template to the procedure).
No issues when running the same procedure in win32 app.
Regards,
Trent
-
Is the procedure in the same app as your web server stuff? Just curious...
cheers
Bruce
-
Hi Bruce,
Yes the procedure is in my web app, imported from a 'cleaned up' exported txa file from the win32 app. This is a single exe web app.
The extra template in the Window(ABC) procedure is just a template to create and perform an SQL Select statement, or close the window if there are no records. This selects all the records for the report and puts the records into a TPS file (keyed on SessionID of course) ready for the Report procedure to use.
I have taken all items out of this procedure like 'message()' etc that are not needed.
I guess I could re-write the procedure and put in into a NetWebSource procedure, just hoping I would not have to as this is already written and proven to work.
Regards,
Trent
-
You want the code in a souce (windows) procedure not netwebsource but not sure if the template would work there either. Sounds like you could just copy the template generated code to your validation embed on your netwebform.
-
OK I will try put it into a source procedure and will let you know how it goes!
Regards,
Trent
-
Hi Kevin,
I have change the procedure to a Source procedure but still get the same results - PGF errors on some builds and not others. GPF is attached.
Regards,
Trent
[attachment deleted by admin]
-
what does line 9047 of klws021.clw say?
cheers
Bruce
-
Hi Bruce,
A few lines before and after...
9043 ! End of "Validate Value"
9044 If not ((p_web.GSV('LOC:PointsBookedFrom') = 0 or p_web.GSV('LOC:Report') > 5))
9045 if loc:invalid = '' then p_web.SetSessionValue('LOC:PointID',LOC:PointID).
9046 End
9047 ! Start of "Validate Value"
9048 ! [Priority 5000]
9049
9050 ! End of "Validate Value"
Regards,
Trent
-
can you post the source file?
-
Hi Bruce,
klws021.clw - Form with Validation that calls the procedure.
klws061.clw - Called procedure.
Thanks for checking this,
Trent
[attachment deleted by admin]
-
Hi Trent,
what Debug message do you get before the GPF?
-
Hi Kevin,
Lets say I'm printing LOC:Report = 1. The last debug message before the GPF is: Do Count for LOC:Report 1
This is in klws021.clw.
Regards,
Trent
-
Your GPF seems to be here ...
ComIniter cCOMIniter ! COM Subsystem !RED_ADO
That makes sense your last debug message.
-
Hi Trent,
>> A few lines before and after...
I think you did a right-click there, and went to "source" and got the limes from there.
Unfortunately that's not the code the _compiler_ sees. So when inspecting the GPF Report you have to look at the lime number in the actual _module_ (ie right click on the procedure and choose Module, not Source).
Unfortunately I can't add too much useful information about the COMIniter - I'm definitely not the COM expert. But hopefully it helps you narrow down the cause of the GPF.
cheers
Bruce
-
Sorry about that Bruce.
Has anyone used COM ADO in NetTalk? Could this be caused by a memory leak? Would changing the procedure to use Dynamic File Driver instead make any difference?
Regards,
Trent
-
only Capesoft office which uses com and I know I have had problems if I don't kill the object and initialize it again.
I just use Prop:SQL for any specific SQL stuff I'm doing.
-
Where do you return the data to? I would like to run an SQL script that returns data into a TPS file for my PDF report to use.
-
If the SQL statement matches the table definition I just use the table definition. So if I want to return a bunch of vendors matching a certain criteria I bring this back into the vendor record buffer.
If the SQL statement is doing sums, grouping or I just want a couple of fields info etc then I have a DUMMY table setup.
You might be able to use the DFD to move the data into a TPS file. If there are not a lot of records you could just do it in a loop. If you have a lot of records XFiles is amazingly fast but you would need to have the data in a Q rather than just a buffer. You would need to log the session ID and then remove those records at the end of the report.
Depending on how much data you are talking about it could be a real bottleneck getting data into this TPS file.
-
The GPF was caused by using COM ADO in the procedure.
Changing the procedure to use the Dynamic File Driver (with incomplete documentation and examples to learn from imho) has fixed this issue.
Thank you for your help Kevin and Bruce.
Regards,
Trent