|
-
Apr 23rd, 2025, 09:38 AM
#1
Github corrupted FRM file, what settings do you have in .gitattributes?
On one of my projects, only one specific project, when I cloned it from github to a PC, the VBP could not be opened, bringing the IDE and the project to a halt.
The error is related to the picture object property that cannot be set.
This showed there was some inconsistency between the FRM and the FRX files and if I looked in the error log I would see the error showing for all command buttons that had been set to graphic mode, and where the button had an assigned picture image.
This only occurred when I used github to clone the rep. If I copied it over the network, it worked so a github error was indicated.
I tried manually copying the FRX files alone, no luck, if I copied the associated the FRM file, the project would open. All my other projects can be cloned without error.
So, I have modified my .gitattributes file to contain the following:
Code:
# Auto detect text files and perform LF normalization
* text auto
# Custom for Visual Studio
*.res binary
*.RES binary
*.frx binary
*.exe binary
*.dll binary
*.ico binary
*.gif binary
*.ocx binary
*.tlb binary
*.ocx.bin binary
*.ism binary
*.bin binary
*.aps binary
*.ncb binary
*.wav binary
*.mp3 binary
*.oca binary
*.exe.compat binary
*.ocx.compat binary
*.ctx -diff
*.ctl text eol=crlf
*.txt text eol=crlf
*.bas text eol=crlf
*.frm text eol=crlf
*.log text eol=crlf
*.vbp text eol=crlf
*.cls text eol=crlf
*.vbw text eol=crlf
*.dsr text eol=crlf
*.ini text eol=crlf
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
Since then the final github clone worked well.
Does anyone have a .gitattributes file that deals with VB6 better than the above?
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
May 4th, 2025, 08:20 AM
#2
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
No-one else uses github with a configured .gitattributes? Surprised.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
May 4th, 2025, 11:13 AM
#3
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
To fix files with corrupted windbreaks:
VB6 GitHub Linebreak Repair
-
May 4th, 2025, 12:06 PM
#4
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
Yes, I saw that and I have already downloaded it. Trouble is some people attempt to download a project and then just load it, not an unreasonable expectation. We upload, they download. It should just work.
One chap became rather annoyed when he could not download due to github screwing things up. It was no use asking him to do anything, entitled generations don't want excuses nor little utilities to fix things, they just want it to work out of the box.
So far that .gitattributes change seems to fixed things.
You don't notice this sort of stuff until you need to use it oneself. I was restoring onto an old laptop using github desktop synch and the result was a broken FRX or FRM file, not sure which, assuming the FRM.
Perhaps we should have a 'sticky' on the codebank for the best .gitattributes file to use in case you are a VB6/github user.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
May 4th, 2025, 12:29 PM
#5
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
-
May 4th, 2025, 01:23 PM
#6
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
 Originally Posted by yereverluvinuncleber
Yes, I saw that and I have already downloaded it. Trouble is some people attempt to download a project and then just load it, not an unreasonable expectation. We upload, they download. It should just work.
One chap became rather annoyed when he could not download due to github screwing things up. It was no use asking him to do anything, entitled generations don't want excuses nor little utilities to fix things, they just want it to work out of the box.
So far that .gitattributes change seems to fixed things.
You don't notice this sort of stuff until you need to use it oneself. I was restoring onto an old laptop using github desktop synch and the result was a broken FRX or FRM file, not sure which, assuming the FRM.
Perhaps we should have a 'sticky' on the codebank for the best .gitattributes file to use in case you are a VB6/github user.
Heh surprised someone like that didn't just post "WHERES EXE? POST EXE" lol
-
May 4th, 2025, 02:44 PM
#7
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
May 4th, 2025, 02:54 PM
#8
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
https://github.com/DecimalTurn/VBA-on-GitHub - probably more info than you need but it's a good informative read
https://github.com/Planet-Source-Code - every repo in the org has a working .gitattributes
https://github.com/Unicontsoft/UcsFi....gitattributes - my preferred and most compatible one (any-case for file extensions but cp1251 for ANSI i.e. cyrillic)
cheers,
</wqw>
-
May 4th, 2025, 03:45 PM
#9
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
Crikey, that's comprehensive! Thankyou. I will be doing some copying/paste-ing tonight.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
May 8th, 2025, 02:57 PM
#10
New Member
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
Thanks wqweto for the shout-out and yereverluvinuncleber for considering using the .gitattributes template I'm providing.
However, I just want to clarify something: The main template I'm providing will work well for newly created projects and should ensure that line endings are never a worry as long as the template was there from the begining. Regarding existing projects where commit were already made while * text=auto was enabled, it's not as simple. In that case, you'll have to perform a second step after using the template: line normalization for your code files. Otherwise, they will keep the LF line endings on GitHub, the Git Index and your working directory (after cloning).
You can double-check that what I'm saying is correct by re-cloning the project and running the following command in the console: You'll see that "i/lf" means that the corresponding file has LF endings in the index and "w/lf" would mean that a file has LF endings in the working directory.
If I clone Steampunk-clock-calendar-vb6 at the moment, that what I get for most code files.
Now to perform line normalization, there are multiple options. Namely, you can use fafalone's GitHub Linebreak Repair tool, my GitHub Action named Enforce-CRLF or a simple PowerShell script like this:
Code:
Get-ChildItem -Recurse -Include *.cls,*.bas,*.frm, *.vbs, *.ctl, *.dsr, *.dob, *.pag, *.vbg, *.vbl, *.vbp, *.vbr, *.vbw | ForEach-Object {
(Get-Content $_.FullName -Raw) -replace "`r?`n", "`r`n" | Set-Content $_.FullName -NoNewline
}
And if you don't want to go through line normalization, you can always use the secondary template I'm providing which is similar to what you had above that you said was working:
https://github.com/DecimalTurn/VBA-o....gitattributes
The only downside of the secondary template is that GitHub will serve files with LF line endings if people try to download single files using the GitHub download button. For a large project where people usually perform a full clone of the repo or download the whole repo as a zip file, the risk is minor, but if you take the time to perform line normalization across the board and use the main template, this will never be an issue.
Last edited by DecimalTurn; May 8th, 2025 at 08:03 PM.
-
May 8th, 2025, 03:42 PM
#11
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
I think I will just refer people to Faf's repair tool. I'll add a link to each repo. A pain.
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
-
May 8th, 2025, 03:54 PM
#12
New Member
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
I guess it's better than nothing, but if you want to implement the quickest solution that will solve most problems and make things as smooth as possible, I still think you are better off just using the .gitattributes template you posted above or the secondary one from the VBA-on-GitHub repo.
-
May 9th, 2025, 04:14 AM
#13
Re: Github corrupted FRM file, what settings do you have in .gitattributes?
https://github.com/yereverluvinunclebert
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|