• Welcome to PlanetSquires Forums.
 

Solved - WinFBE 3.0.0 BETA 2 x64 crashes when trying to open a file

Started by Bruce Huber, April 09, 2022, 05:21:13 PM

Previous topic - Next topic

Bruce Huber

Hi Paul,

Little :) problem with x64 BETA 2 - (not a problem with x32 version)...

    [File] [Open] {select a .bas file} [OK] ... WinFBE closes without error message

(even with a pristine download of WinFBE_Suite3-BETA-2.zip).

And FYI...
    [Tools] [SetCompilerPaths] {error} ...  (SetCompilerPathsII.exe (and .bas) don't exist).

Environment:
Win10-Pro x64 (ver)1803 (build)17134.799 i7-3770 32GB-RAM

Thanks,
CBruce

Paul Squires

Hi Bruce,

I am also using Windows 10 but unfortunately I am not getting the GPF on File/Open of a .bas file using x64 version of WinFBE.

Does it happen for you fore every *.bas file that you try to open, or just for a specific file? If just for one specific file then maybe it is the internal WinFBE parser that is GPF'ing when trying to parse the code for that file.

The author, David Roberts, mentioned the SetCompilerPathsII issue to me a few days ago. That tool is no longer applicable in WinFBE 3 so it has been removed from the distribution, however, an entry for it was still be generated for new default winfbe.ini configuration file.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Bruce Huber

One file, multiple files, different file types, and even drag and drop a file... bites the dust each time.

And, like I said, the x32 version is not a problem at all.

SeaVipe

I am also using Windows 10, not getting the GPF Bruce is getting on File/Open of a .bas, .bi, or .inc files using x64 version of WinFBE 3 Beta 2.
My File/Open File... dialog has an "Open" button, not an "OK" button.


Clive Richey

Paul Squires

Thanks Clive for the report. Appreciate it.

Bruce, could you download and replace your existing WinFBE64.exe with the one int he following zip file? Please let me know if it makes any difference at all.
https://www.planetsquires.com/files/WinFBE64.zip
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer


Bruce Huber

FYI, Paul... Windows event log ERROR and INFO entries for the crash - (from the special build you had me download)... standard "trying to run something at location 0x0":

Faulting application name: WinFBE64.exe, version: 0.0.0.0, time stamp: 0x62522431
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x0000000000000000
Faulting process id: 0x20bc
Faulting application start time: 0x01d84c810f45d7ea
Faulting application path: D:\FB_WinFBE_3_BETA_2\WinFBE64.exe
Faulting module path: unknown
Report Id: 513dc229-3b02-4f47-a6b7-592cdb096ae8
Faulting package full name:
Faulting package-relative application ID:

Fault bucket 2166815065118652559, type 5
Event Name: BEX64
Response: Not available
Cab Id: 0

Problem signature:
P1: WinFBE64.exe
P2: 0.0.0.0
P3: 62522431
P4: StackHash_58b2
P5: 0.0.0.0
P6: 00000000
P7: PCH_84_FROM_WinFBE64+0x0000000000040F68
P8: c0000005
P9: 0000000000000008
P10:

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA3FE.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA48C.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA49C.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA4AC.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA4BC.tmp.txt

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_WinFBE64.exe_d55c7d4a648fb28396214c65911327b5c4fc478a_3e590e1a_0fdea72a

Analysis symbol:
Rechecking for solution: 0
Report Id: 513dc229-3b02-4f47-a6b7-592cdb096ae8
Report Status: 268435456
Hashed bucket: ae091e442d1273c86e1212d24a5cb88f
Cab Guid: 0


Paul Squires

Thanks Bruce, this might be a tough error for me to track down but I will do some detective work and I'll post back here when I think I've isolated the issue.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

Hi Bruce,

I am pretty sure that I found the source of the GPF. The top tab control current tab selected was set to -1 but there was an array that needed to be accessed in order to position the tab correctly. The -1 would cause an invalid array access.

Please try the following new EXE to see if the problem is now fixed.
https://www.planetsquires.com/files/WinFBE64-fix.zip

Thanks,
Paul
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Bruce Huber


Paul Squires

Well, that is odd. I compiled the 64 bit using -exx in order to get the out of bound exceptions. Sure enough, when I ran the program and tried to display a new or existing file then the program would GPF. After adding code to check for the out of bounds array index then the GPF vanished.

For the sake of completeness, can you check the file date/time o f the WinFBE64.exe that you are using to give me peace of mind that we are dealing with the same EXE's?

2022-04-10 12:41PM

Also, your program GPF's the very moment that select File/New or when you press Open to open an existing file? You don't see any tab loading at the top of the editor at all?


Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Bruce Huber

2022-04-10 12:41
2.03 MB (2,138,624 bytes)

After I do a [File][New] - there is a very short pause - (no tab appears) - then GPFs.
After I do a [File][Open] I get the open dialog - choose a file - hit [Open] - there is a very short pause - (no tab appears) - then GPFs.

Paul Squires

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Bruce Huber

Ok, Paul. I have been compiling the BETA and shoving OutputDebugString() calls all through it.

Finally have narrowed it down to frmMain_OpenFileSafely().

It's good up until the call to pDoc->CreateCodeWindow( HWnd, false, bIsTemplate, wszName )... it dies in there somewhere.

I'll try to dig deeper.

CBruce

Paul Squires

Hi Bruce,

That is where my journey started yesterday when I was tracing the GPF. I was able to follow out of that call and all the way to the function "frmTopTabs_PositionWindows" located in the frmTopTabs.inc file. In my case, the GPF was the result of gTTabCtl.CurSel being a value of -1 causing invalid array access.

This is the code that I added around the line 182 area:


      if gTTabCtl.CurSel = -1 then
         ' Put If check for CurSel being invalid otherwise other tab calculations
         ' Scenarios will fail via GPF on invalid array access.
         
      ' SCENARIO #1
      ' New gTTabCtl.CurSel is located before gTTabCtl.FirstDisplayTab so it is visually
      ' not on screen. We simply need to move the gTTabCtl.CurSel rect into the
      ' the first position (gTTabCtl.FirstDisplayTab) and adjust all rects accordingly.
      elseif gTTabCtl.CurSel < gTTabCtl.FirstDisplayTab then
         ' The amount of the adjustment is equal to the difference between the
         ' current first tab's left edge and the new cursel's left edge.
...
...

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer