1. ALEXANDER TAPIA
  2. PowerBuilder
  3. Wednesday, 2 August 2023 02:43 AM UTC

Our PB windows application was developed in PB version 8 and it has been migrated to PB 2019 R3. The PB 8 build it not crashing but when it was migrated to PB2019 R3, we encountered crashing issue during its runtime. I did a debugging and found out that the application is crashing inside the window function, of_filter( ). By the way, the back end is Oracle 12g.


Here is the code under the window object, function of_filter:

/////////////////////////////////////////////////////////////////////////////
// Object      	:   w_job_list
// Function  	:   of_filter
//
//  Override:     No
//
// Arguments:		None
//						
// Returns  :     (None)
//
// Description:   Filters the job list data window to match what the user
//                has selected as a filter option.
//
// ///////////////////////////////////////////////////////////////////////////

String  ls_filter
integer li_rc
Long 	 ll_primary_rowcount, ll_filter_rowcount
Long    ll_row
long    ll_rows
long    ll_found
decimal ld_job_id
string  ls_sort
string  ls_server_date_time
long		ll_job_search

dw_list.SetRedraw( FALSE )
iuo_parent.SetRedraw( FALSE)
ib_filter_in_progress = true
IF iuo_parent.dw_job_search.Rowcount() > 0 THEN
	ld_job_id = iuo_parent.dw_job_search.object.job_id[iuo_parent.dw_job_search.Getrow()]
End If

/* rbl 4 April 2023   VSDEV-744
 * For some reason, this Filter action doesnt work with an empty primary buffer,
 * nor do subsequent filters if I skip over this one.
 * Move all rows from the Filter buffer to the Primary buffer before filtering. */
/* rbl 23 June 2023   VSDEV-801
 * Now it sometimes doesn't work at all, but sometimes it does.
 * Move all rows from filtered to primary regardless of counts. */
ll_primary_rowcount = iuo_parent.dw_job_search.RowCount()
ll_filter_rowcount = iuo_parent.dw_job_search.FilteredCount()

li_rc = iuo_parent.dw_job_search.RowsMove &
					(1, ll_filter_rowcount, Filter!, &
					 iuo_parent.dw_job_search, 1, Primary!)
//IF ((ll_primary_rowcount = 0) AND (ll_filter_rowcount > 0)) THEN
//END IF

iuo_parent.dw_job_search.SetFilter( '' )
iuo_parent.dw_job_search.Filter()
ll_rows = iuo_parent.dw_job_search.RowCount()


CHOOSE CASE as_status
	CASE 'W'
		ls_server_date_time = string(sqlca.of_get_server_datetime(),"YYYY-MM-DD")
		
		ls_sort = 'Long(bill_customer_no) A, enter_date A, prefix_sort A'
		ls_filter = "( isnull(ship_date) and status not in ( 'CANCEL' , 'STKCANCL') ) "+&
		            "or (date(ship_date) = "+ls_server_date_time+") "+&
						"or (status in ( 'CANCEL', 'STKCANCL' ) "+&
						     " and date(cancel_date) = "+ls_server_date_time+")"
		dw_list.Object.date_holder_t.text = 'Ship Date'
		FOR ll_row = 1 TO ll_rows
			dw_list.Object.date_holder[ll_row] = iuo_parent.dw_job_search.Object.ship_date[ll_row]
		NEXT					 
					 
	CASE 'S'
		ls_sort = 'Long(bill_customer_no) A, ship_date A, prefix_sort A'
		dw_list.Object.date_holder_t.text = 'Ship Date'
		FOR ll_row = 1 TO ll_rows
			dw_list.Object.date_holder[ll_row] = iuo_parent.dw_job_search.Object.ship_date[ll_row]
		NEXT
		ls_filter = 'Not IsNull( ship_date )'
		
	CASE 'C'
		ls_sort = 'Long(bill_customer_no) A, cancel_date A, prefix_sort A'
		dw_list.Object.date_holder_t.text = 'Cancel Date'
		FOR ll_row = 1 TO ll_rows
			dw_list.Object.date_holder[ll_row] = iuo_parent.dw_job_search.Object.cancel_date[ll_row]
		NEXT
		ls_filter = 'Not IsNull( cancel_date )'
		
	CASE 'A'
		ls_sort = 'Long(bill_customer_no) A, enter_date A, prefix_sort A'
		ls_filter = ''
		dw_list.Object.date_holder_t.text = 'Ship Date'
		FOR ll_row = 1 TO ll_rows
			dw_list.Object.date_holder[ll_row] = iuo_parent.dw_job_search.Object.ship_date[ll_row]
		NEXT					 

END CHOOSE

li_rc = iuo_parent.dw_job_search.SetFilter( ls_filter )
If IsNull(li_rc) or li_rc < 1 Then
     error.of_application_error(this,"of_filter",&
	     "Error encountered when setting filter.~r~n"+&
		  "   Return code = "+f_null_check(li_rc)+"~r~n"+&
		  "   Filter command = "+f_null_check(ls_filter))
End IF
	
li_rc = iuo_parent.dw_job_search.Filter()
If IsNull(li_rc) or li_rc < 1 Then
     error.of_application_error(this,"of_filter",&
	     "Error encountered when filtering job list.~r~n"+&
		  "   Return code = "+f_null_check(li_rc)+"~r~n"+&
		  "   Filter command = "+f_null_check(ls_filter))
End IF

li_rc = iuo_parent.dw_job_search.SetSort( ls_sort )
If IsNull(li_rc) or li_rc < 1 Then
     error.of_application_error(this,"of_filter",&
	     "Error encountered when setting sort criteria.~r~n"+&
		  "   Return code = "+f_null_check(li_rc)+"~r~n"+&
		  "   Sort command = "+f_null_check(ls_sort))
End IF

li_rc = iuo_parent.dw_job_search.Sort()
If IsNull(li_rc) or li_rc < 1 Then
     error.of_application_error(this,"of_filter",&
	     "Error encountered when sorting job list.~r~n"+&
		  "   Return code = "+f_null_check(li_rc)+"~r~n"+&
		  "   Sort command = "+f_null_check(ls_sort))
End IF

ib_filter_in_progress = false

//  Put the current row back to the same job id if the job id exists
//  in the current list.

ll_found = 0
IF not ISNULL(ld_job_id) and ld_job_id <> 0 THEN 
	ll_found=iuo_parent.dw_job_search.Find("job_id = " + String(ld_job_id),1,iuo_parent.dw_job_search.RowCount())
End If
If ll_found = 0 or ll_found <> iuo_parent.dw_job_search.getrow() or ll_found > 0 Then
		iuo_parent.dw_job_search.ScrollTorow(max(1,ll_found))
End If	
dw_list.SetRedraw( TRUE )
iuo_parent.SetRedraw( TRUE)

this.Event vs_set_environment()


Here is an Event Log description of the crash:

Faulting application name: customer.exe, version: 5.0.0.0, time stamp: 0x6100e416
Faulting module name: orageneric12.dll, version: 12.2.0.1, time stamp: 0x58a2624c
Exception code: 0xc0000005
Fault offset: 0x01136007
Faulting process ID: 0x4578
Faulting application start time: 0x01d9c4e68bb84a68
Faulting application path: C:\SourceTree\Build Release\V05.22.00-VSDEV819\customer\customer.exe
Faulting module path: C:\Oracle\Win.32\12.2_InstantClient\bin\orageneric12.dll
Report ID: a16e707a-0f52-40d3-8fb2-e868019a4cd3
Faulting package full name:
Faulting package-relative application ID:



Anyone else experience this?

Regards,
Alex



Responses (4)
  1. Likes
  2. Latest
  3. Oldest
Loading...

Find Questions by Tag

.EXE .NET 6.0 .NET Assembly .NET Core 3.1 .NET Core Framework .NET DataStore .NET Std Framework 32-bit 64-bit ADO.NET AEM AI Algorithm Amazon AWS Android Apache API APK App Store App Store (Apple) Appeon Workspace Appeon Xcelerator Plug-in Architecture Array ASE Asynchronous Methods Authentication AutoBuild AutoCompiler Automated Testing Automation AutoScript Azure Barcode Base64 Batch BigData BLOB Branch & Merge Browser Bug Build Button C# C# Class Importer C# Editor C# Model generator Calendar Camera Certificate Chrome Citrix Class Client Client/Server Cloud Cluster Collection COM Command Line Compiler Compression Computed Field Configuration Controls Cookies Cordova Crash Cross-Platform Crosstab CSharpAssembly CSharpObject CSS CSV Cursor Data Database Database Driver Database Painter Database Profile Database Provider DataObject DataSource DataStore DataStore (C#) DataStore (PS) DataType DataWindow DATE DATETIME DB2 Debug Debugger Debugging Deployment Design DLL DO-WHILE Dockable Docker Documentation DOUBLE Download DragDrop Edge Edit Style Editor Elevate Conference Email Embedded SQL Emulator Encoding Encryption Enhancement Request Entity Entity Framework ERP Error Event Event Handler Event Handling Excel Exception Export Expression External Functions F# Field File File Access Filter Firefox Firewall Font FOR-NEXT Foreground Format Function Garbage Collection GeoLocation Git Graph HANA Hash Header HTML/5 HTTP/S HTTPClient Icon IDE Identity IIS IMAPI Import InfoMaker Inheritance Installation Integer IntelliSense Interface Internet Internet Explorer iOS IPA iPad iPhone IWA J# Java JavaScript JBoss JDBC JOIN JSON JSONGenerator JSONParser Kestrel Label Lambda Large File LDAP Library License LINQ Linux OS Load Balancing Localization Localized PBVM Log In Log Out Logging LONG LONGLONG macOS MAPI Maps MDI Memory Memory Leak Menu Merge MessageBox Messagging Method Migration MIME TYPE Mobile Model ModelStore ModelStore (C#) MSOLEDBSQL Multi Threading MVC MySQL n-Tier Namespace NativePDF NVO OAuth ODATA ODBC Office Offline OLE OLEDB Online Open Source OpenAPI OpenSSL Oracle OrcaScript Other Outlook Output Package Parameter Patch PayPal PB Classic PB Native PB.NET PBC PBD PBDOM PBG PBJVM PBL PBNI PBORCA PBVM PBX PDF Performance Permission PFC Picture Pipeline Play Store (Google) Plugin Popup Port POST PostgreSQL PowerBuilder PowerBuilder (Appeon) PowerBuilder (SAP) PowerBuilder Compiler PowerBuilder Runtime PowerClient PowerScript (PS) PowerScript IDE PowerScript Migrator PowerServer PowerServer Mobile PowerServer Toolkit PowerServer Web PowerServerLabel Print Properties Proxy Publish PULL PUSH Query Regression Release Renew Resize Response REST Retrieve RibbonBar RibbonBar Builder Rich Text Roadmap RPC Runtime Packager SaaS Scaffolding Script SDI SDK Security Server Service Session Single Sign-on Size SMTP SMTPClient SnapDevelop SOAP Sort Source Code Speech Recognition SQL SQL Anywhere SQL Server SqlBuilder SqlExecutor SQLite SqlModelMapper Storage Stored Procedure Subscription SVN Swagger Syntax TabbedBar TabbedView Tablet TabPage Target TE Control Testing Text TFS Theme TIME Timer TLS/SSL Tomcat TortoiseGit TortoiseSVN Transaction Transparency Trial Trigger TRY-CATCH TX Control Type UI ULONG UltraLite Uninstall Unit Test Unit Testing UNIX OS Update Upgrade Upload URL User Center User Object UWP Validation VARCHAR Variable Versioning Visual Studio Visual Studio Code VM Voice Warning WCF Web API Web Extensions Web Service WebBrowser WebForms WebLogic WebSphere WildFly WinAPI Window Windows OS WinForms Wizard Workgroup Workspace WPF XCODE XHTML XML Zoom

Helpful?

If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.