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

cfd.ErrorCancelled not declared by package cfd #8

Open
SwatDoge opened this issue Feb 4, 2022 · 3 comments
Open

cfd.ErrorCancelled not declared by package cfd #8

SwatDoge opened this issue Feb 4, 2022 · 3 comments

Comments

@SwatDoge
Copy link

SwatDoge commented Feb 4, 2022

Ola, when using this module, it seems that cfd.ErrorCancelled is no longer supported:

if err == cfd.ErrorCancelled { //<--- ErrorCancelled not declared by package cfdcompiler[UndeclaredImportedName]
   log.Fatal("Dialog was cancelled by the user.")
}

Is there an alternative way to check if a dialog was cancelled?
It could just be a mistake on my end, this is literally my first go project

@harryjph
Copy link
Owner

harryjph commented Feb 7, 2022

Hey! This is probably because go is choosing the latest tag rather than the latest snapshot from master.

I've added tag v1.2.0. Please can you check that your go.mod is set to use version 1.2.0?

@SwatDoge
Copy link
Author

Heya, I was working on another project, sorry for the late awnser:

v1.2.0 is in my project now, but I am running into the next issue, I get a stack error with both "select folder" examples, when running go run .\main.go

platform: windows/386
go version: 1.17.4

Exception 0xc0000005 0x0 0x140d8b64 0x772248e1
PC=0x772248e1

runtime.cgocall(0x479b20, 0x570b3c)
        C:/Program Files (x86)/Go/src/runtime/cgocall.go:156 +0x58 fp=0x12057e34 sp=0x12057e1c pc=0x423398
syscall.Syscall(0x77248b10, 0x1, 0x1582808, 0x15aaf64, 0x0)
        C:/Program Files (x86)/Go/src/runtime/syscall_windows.go:483 +0xbb fp=0x12057e50 sp=0x12057e34 pc=0x476f6b
github.com/harry1453/go-common-file-dialog/cfd.(*iFileDialogVtbl).setFolder(0x772018b4, 0x1582808, {0x4d3c11, 0x3})
        C:/Users/bobde/go/pkg/mod/github.com/harry1453/[email protected]/cfd/vtblCommonFunc.go:138 +0xc5 fp=0x12057e8c sp=0x12057e50 pc=0x4b9a75
github.com/harry1453/go-common-file-dialog/cfd.(*iFileOpenDialog).SetFolder(0x1582808, {0x4d3c11, 0x3})
        C:/Users/bobde/go/pkg/mod/github.com/harry1453/[email protected]/cfd/iFileOpenDialog.go:100 +0x39 fp=0x12057ea8 sp=0x12057e8c pc=0x4b8f19
github.com/harry1453/go-common-file-dialog/cfd.(*DialogConfig).apply(0x12057ef0, {0x4f80f4, 0x1582808})
        C:/Users/bobde/go/pkg/mod/github.com/harry1453/[email protected]/cfd/DialogConfig.go:70 +0xbf fp=0x12057ed4 sp=0x12057ea8 pc=0x4b89bf
github.com/harry1453/go-common-file-dialog/cfd.NewSelectFolderDialog({{0x4d4de4, 0xb}, {0x4d63ff, 0x11}, {0x0, 0x0}, {0x4d3c11, 0x3}, {0x0, 0x0, ...}, ...})
        C:/Users/bobde/go/pkg/mod/github.com/harry1453/[email protected]/cfd/CommonFileDialog_windows.go:54 +0x7c fp=0x12057ef0 sp=0x12057ed4 pc=0x4b883c
github.com/harry1453/go-common-file-dialog/cfdutil.ShowPickFolderDialog({{0x4d4de4, 0xb}, {0x4d63ff, 0x11}, {0x0, 0x0}, {0x4d3c11, 0x3}, {0x0, 0x0, ...}, ...})
        C:/Users/bobde/go/pkg/mod/github.com/harry1453/[email protected]/cfdutil/CFDUtil.go:29 +0x68 fp=0x12057f54 sp=0x12057ef0 pc=0x4ba278
main.main()
        C:/Users/bobde/Desktop/Local_repos_and_projects/(GO) krunker mass uploader/main.go:11 +0x2c fp=0x12057fc8 sp=0x12057f54 pc=0x4ba35c
runtime.main()
        C:/Program Files (x86)/Go/src/runtime/proc.go:255 +0x23a fp=0x12057ff0 sp=0x12057fc8 pc=0x453d5a
runtime.goexit()
        C:/Program Files (x86)/Go/src/runtime/asm_386.s:1319 +0x1 fp=0x12057ff4 sp=0x12057ff0 pc=0x478e51
eax     0x135f6a8
ebx     0x478b7e
ecx     0x478b7e
edx     0x1
edi     0x140d8b64
esi     0x1
ebp     0x135f6ac
esp     0x135f68c
eip     0x772248e1
eflags  0x10206
cs      0x23
fs      0x53
gs      0x2b
exit status 2

@harryjph
Copy link
Owner

Ah, you've run into #7. Somewhere, when compiled to 32 bit it throws a memory corruption exception even though the 64 bit version works perfectly. I'm afraid I've spent quite a while debugging this and don't have a solution yet :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants