Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divide By Zero #31

Closed
derwin12 opened this issue Apr 11, 2022 · 2 comments
Closed

Divide By Zero #31

derwin12 opened this issue Apr 11, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@derwin12
Copy link

Making progress (basically rebuilding my install base since it was so out of date)..
here is another divide by zero - even if you can point me to the cause I can remedy the fault without waiting on a code fix. thanks.

Doing a scan - works with table/bg/pov - but when I added in all the media choices I got this..

(is there a vid out there on the workflow you do to use this tool? Ie how do I run this to see what tables are out of date and/or missing?)

Scanner started, settings={"PinballFolder":"C:\VPinball","PinballTablesFolder":"C:\vp\tables\vpx","FrontendFolder":"C:\PinballX","AllContentTypes":[{"Enum":16,"Category":2,"Extensions":".vpx, .vpt","KindredExtensions":".vbs, .txt, .pdf","Tip":"Playfield table","ExtensionsList":[".vpx",".vpt"],"KindredExtensionsList":[".vbs",".txt",".pdf"],"Folder":"C:\VPinball\Tables","Description":"Tables"},{"Enum":17,"Category":2,"Extensions":".directb2s","KindredExtensions":"","Tip":"Image used for the backglass","ExtensionsList":[".directb2s"],"KindredExtensionsList":[""],"Folder":"C:\VPinball\Tables","Description":"Backglasses"},{"Enum":18,"Category":2,"Extensions":".pov","KindredExtensions":"","Tip":"3D camera configuration","ExtensionsList":[".pov"],"KindredExtensionsList":[""],"Folder":"C:\VPinball","Description":"Point Of Views"},{"Enum":0,"Category":0,"Extensions":".xml","KindredExtensions":"","Tip":"Pinball X or Pinball Y database file","ExtensionsList":[".xml"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Databases\Visual Pinball","Description":"Database"},{"Enum":1,"Category":1,"Extensions":".mp3, .wav","KindredExtensions":"","Tip":"Audio used when displaying a table","ExtensionsList":[".mp3",".wav"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Table Audio","Description":"Table Audio"},{"Enum":2,"Category":1,"Extensions":".mp3, .wav","KindredExtensions":"","Tip":"Audio used when launching a table","ExtensionsList":[".mp3",".wav"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Launch Audio","Description":"Launch Audio"},{"Enum":3,"Category":1,"Extensions":".f4v, .mp4, .mkv","KindredExtensions":"","Tip":"Video used when displaying a table","ExtensionsList":[".f4v",".mp4",".mkv"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Table Videos","Description":"Table Videos"},{"Enum":4,"Category":1,"Extensions":".f4v, .mp4, .mkv","KindredExtensions":"","Tip":"Video used when displaying a table\u0027s backglass","ExtensionsList":[".f4v",".mp4",".mkv"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Backglass Videos","Description":"Backglass Videos"},{"Enum":5,"Category":1,"Extensions":".png, .apng, .jpg","KindredExtensions":"","Tip":"Image used when displaying a table","ExtensionsList":[".png",".apng",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Wheel Images","Description":"Wheel Images"},{"Enum":6,"Category":1,"Extensions":".f4v, .mp4, .mkv","KindredExtensions":"","Tip":"Video used when displaying the topper","ExtensionsList":[".f4v",".mp4",".mkv"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Topper Videos","Description":"Topper Videos"},{"Enum":7,"Category":1,"Extensions":".png, .jpg, .swf","KindredExtensions":"","Tip":"Image used when displaying instruction cards","ExtensionsList":[".png",".jpg",".swf"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Instruction Cards","Description":"Instruction Cards"},{"Enum":8,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Back","Description":"Flyer Images\Back"},{"Enum":9,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Front","Description":"Flyer Images\Front"},{"Enum":10,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside1","Description":"Flyer Images\Inside1"},{"Enum":11,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside2","Description":"Flyer Images\Inside2"},{"Enum":12,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside3","Description":"Flyer Images\Inside3"},{"Enum":13,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside4","Description":"Flyer Images\Inside4"},{"Enum":14,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside5","Description":"Flyer Images\Inside5"},{"Enum":15,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside6","Description":"Flyer Images\Inside6"}],"BackupFolder":"C:\Users\daryl\Downloads\ClrVPinBackups","TrainerWheels":true,"MatchFuzzyMinimumPercentage":205,"Scanner":{"SelectedCheckContentTypes":["Point Of Views","Backglasses","Tables"],"SelectedCheckHitTypes":[0,1,5,6,2,3],"SelectedFixHitTypes":[0,1,2,3],"SelectedMultipleMatchOption":2,"MultipleMatchExceedSizeThresholdPercentage":85},"Rebuilder":{"SourceFolder":"C:\Users\daryl\Downloads\POV","DestinationContentType":"Point Of Views","IgnoreIfSmallerPercentage":75,"IgnoreIWords":["nude","adult","tba","original","orginal","b\u0026w"," bw ","2scr","2 screen"],"DeleteIgnoredFiles":false,"SelectedMatchTypes":[0,1,2,3],"SelectedMergeOptions":[0,1],"SelectedIgnoreOptions":[]},"Importer":{"IncludeOriginalTables":false,"UpdatedAtDateBegin":null,"UpdatedAtDateEnd":null},"Version":2}

Scanner started, settings={"PinballFolder":"C:\VPinball","PinballTablesFolder":"C:\vp\tables\vpx","FrontendFolder":"C:\PinballX","AllContentTypes":[{"Enum":16,"Category":2,"Extensions":".vpx, .vpt","KindredExtensions":".vbs, .txt, .pdf","Tip":"Playfield table","ExtensionsList":[".vpx",".vpt"],"KindredExtensionsList":[".vbs",".txt",".pdf"],"Folder":"C:\VPinball\Tables","Description":"Tables"},{"Enum":17,"Category":2,"Extensions":".directb2s","KindredExtensions":"","Tip":"Image used for the backglass","ExtensionsList":[".directb2s"],"KindredExtensionsList":[""],"Folder":"C:\VPinball\Tables","Description":"Backglasses"},{"Enum":18,"Category":2,"Extensions":".pov","KindredExtensions":"","Tip":"3D camera configuration","ExtensionsList":[".pov"],"KindredExtensionsList":[""],"Folder":"C:\VPinball","Description":"Point Of Views"},{"Enum":0,"Category":0,"Extensions":".xml","KindredExtensions":"","Tip":"Pinball X or Pinball Y database file","ExtensionsList":[".xml"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Databases\Visual Pinball","Description":"Database"},{"Enum":1,"Category":1,"Extensions":".mp3, .wav","KindredExtensions":"","Tip":"Audio used when displaying a table","ExtensionsList":[".mp3",".wav"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Table Audio","Description":"Table Audio"},{"Enum":2,"Category":1,"Extensions":".mp3, .wav","KindredExtensions":"","Tip":"Audio used when launching a table","ExtensionsList":[".mp3",".wav"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Launch Audio","Description":"Launch Audio"},{"Enum":3,"Category":1,"Extensions":".f4v, .mp4, .mkv","KindredExtensions":"","Tip":"Video used when displaying a table","ExtensionsList":[".f4v",".mp4",".mkv"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Table Videos","Description":"Table Videos"},{"Enum":4,"Category":1,"Extensions":".f4v, .mp4, .mkv","KindredExtensions":"","Tip":"Video used when displaying a table\u0027s backglass","ExtensionsList":[".f4v",".mp4",".mkv"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Backglass Videos","Description":"Backglass Videos"},{"Enum":5,"Category":1,"Extensions":".png, .apng, .jpg","KindredExtensions":"","Tip":"Image used when displaying a table","ExtensionsList":[".png",".apng",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Wheel Images","Description":"Wheel Images"},{"Enum":6,"Category":1,"Extensions":".f4v, .mp4, .mkv","KindredExtensions":"","Tip":"Video used when displaying the topper","ExtensionsList":[".f4v",".mp4",".mkv"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Visual Pinball\Topper Videos","Description":"Topper Videos"},{"Enum":7,"Category":1,"Extensions":".png, .jpg, .swf","KindredExtensions":"","Tip":"Image used when displaying instruction cards","ExtensionsList":[".png",".jpg",".swf"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Instruction Cards","Description":"Instruction Cards"},{"Enum":8,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Back","Description":"Flyer Images\Back"},{"Enum":9,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Front","Description":"Flyer Images\Front"},{"Enum":10,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside1","Description":"Flyer Images\Inside1"},{"Enum":11,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside2","Description":"Flyer Images\Inside2"},{"Enum":12,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside3","Description":"Flyer Images\Inside3"},{"Enum":13,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside4","Description":"Flyer Images\Inside4"},{"Enum":14,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside5","Description":"Flyer Images\Inside5"},{"Enum":15,"Category":1,"Extensions":".png, .jpg","KindredExtensions":"","Tip":"Image used when displaying flyer","ExtensionsList":[".png",".jpg"],"KindredExtensionsList":[""],"Folder":"C:\PinballX\Media\Flyer Images\Inside6","Description":"Flyer Images\Inside6"}],"BackupFolder":"C:\Users\daryl\Downloads\ClrVPinBackups","TrainerWheels":true,"MatchFuzzyMinimumPercentage":205,"Scanner":{"SelectedCheckContentTypes":["Point Of Views","Backglasses","Tables","Table Audio","Launch Audio","Table Videos","Backglass Videos","Wheel Images","Topper Videos","Instruction Cards","Flyer Images\Back","Flyer Images\Front","Flyer Images\Inside1","Flyer Images\Inside2","Flyer Images\Inside3","Flyer Images\Inside4","Flyer Images\Inside5","Flyer Images\Inside6"],"SelectedCheckHitTypes":[0,1,5,6,2,3],"SelectedFixHitTypes":[0,1,2,3],"SelectedMultipleMatchOption":2,"MultipleMatchExceedSizeThresholdPercentage":85},"Rebuilder":{"SourceFolder":"C:\Users\daryl\Downloads\POV","DestinationContentType":"Point Of Views","IgnoreIfSmallerPercentage":75,"IgnoreIWords":["nude","adult","tba","original","orginal","b\u0026w"," bw ","2scr","2 screen"],"DeleteIgnoredFiles":false,"SelectedMatchTypes":[0,1,2,3],"SelectedMergeOptions":[0,1],"SelectedIgnoreOptions":[]},"Importer":{"IncludeOriginalTables":false,"UpdatedAtDateBegin":null,"UpdatedAtDateEnd":null},"Version":2}
Unhandled exception detected

Message: Attempted to divide by zero.
Assembly: ClrVpin, Version=2.3.1.0, Culture=neutral, PublicKeyToken=null
Sender: System.Windows.Threading.Dispatcher
Source: Application.Current.DispatcherUnhandledException
System.DivideByZeroException: Attempted to divide by zero.
at System.Decimal.DecCalc.VarDecDiv(DecCalc& d1, DecCalc& d2)
at ClrVpin.Scanner.ScannerUtils.<>c__DisplayClass4_4.b__14(Hit hit) in C:\code\ClrVpin\ClrVpin\Scanner\ScannerUtils.cs:line 137
at System.Linq.EnumerableSorter2.ComputeKeys(TElement[] elements, Int32 count) at System.Linq.OrderedEnumerable1.ToList()
at ClrVpin.Scanner.ScannerUtils.<>c__DisplayClass4_3.b__7(Game game) in C:\code\ClrVpin\ClrVpin\Scanner\ScannerUtils.cs:line 137
at System.Collections.Generic.List1.ForEach(Action1 action)
at System.Collections.Generic.List1.ForEach(Action1 action)
at ClrVpin.Scanner.ScannerUtils.Fix(ICollection1 games, String backupFolder, Action2 updateProgress) in C:\code\ClrVpin\ClrVpin\Scanner\ScannerUtils.cs:line 151
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at ClrVpin.Scanner.ScannerUtils.FixAsync(List1 games, String backupFolder, Action`2 updateProgress) in C:\code\ClrVpin\ClrVpin\Scanner\ScannerUtils.cs:line 73
at ClrVpin.Scanner.ScannerViewModel.Start() in C:\code\ClrVpin\ClrVpin\Scanner\ScannerViewModel.cs:line 219
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

@derwin12
Copy link
Author

Found the cause/trigger.. I had 0 byte table videos in my media folder. I tried to create a video using the Pinballx/Game List manager "Create Videos" - and I guess it didnt work and created those 0 byte files.

@stojy stojy added the bug Something isn't working label Apr 12, 2022
@stojy
Copy link
Owner

stojy commented Apr 12, 2022

hi @derwin12

Thanks for reporting the zero byte video issue. I certainly didn't anticipate that one :) I'll be sure to fix it up shortly.

Regarding the 'how to use', I haven't got a video.. but i did write up a few pages on the wiki here. Hopefully that helps.. but if not let me know and i'll see what I can do to make it a little clearer.

stojy referenced this issue Apr 13, 2022
@stojy stojy closed this as completed Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants