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

all examples crash on Win 10 #16

Open
aferust opened this issue Jul 24, 2020 · 9 comments · May be fixed by #21
Open

all examples crash on Win 10 #16

aferust opened this issue Jul 24, 2020 · 9 comments · May be fixed by #21

Comments

@aferust
Copy link

aferust commented Jul 24, 2020

LDC 1.19.0 64 bit

How to reproduce:
Download and unzip the repo
run dub run :basic

gdb crash report:

gdb: unknown target exception 0xc000041d at 0x7ffa2ff3a799

Thread 1 received signal ?, Unknown signal.
0x00007ffa2ff3a799 in RaiseException ()
   from C:\WINDOWS\System32\KernelBase.dll

ui.log:

beamui log file
2020-07-24 11:30:58.970 I  Log level changed to trace
2020-07-24 11:30:58.970 I  Logger is initialized
2020-07-24 11:30:58.970 I  Creating Win32FontManager
2020-07-24 11:30:58.972 I  Found 342 font faces
2020-07-24 11:30:58.973 D  Initializing resource managers
2020-07-24 11:30:58.973 I  Creating ImageCache
2020-07-24 11:30:58.973 D  initResourceManagers() -- finished
2020-07-24 11:30:58.973 V  Registering window class
2020-07-24 11:30:58.976 D  Setting platform
2020-07-24 11:30:58.977 V  CSS: loading 'light.css'
2020-07-24 11:30:59.006 D  Destroying theme
2020-07-24 11:30:59.006 D  Screen dimensions: {(0, 0), [1920, 1080]}
2020-07-24 11:30:59.019 V  created window, adding to map
2020-07-24 11:30:59.019 I  GL: trying to create 3.2 context
2020-07-24 11:30:59.057 I  GL: created successfully
2020-07-24 11:30:59.058 V  GL: GLSL version is 150
2020-07-24 11:30:59.058 D  Window DPI changed from 96 to 120
@aferust aferust changed the title all examples crashe on Win 10 all examples crash on Win 10 Jul 24, 2020
@dayllenger
Copy link
Owner

I haven't reproduced yet, but I've fixed something related. Try now.

@aferust
Copy link
Author

aferust commented Jul 25, 2020

now this is what I get when I try to compile and run in a VC 2017 x64 cmd:

Linking...
libcmt.lib(exe_main.obj) : error LNK2019: unresolved external symbol main referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
examples\canvas\.dub\build\application-debug-windows-x86_64-ldc_2091-705E402B21F4F3E5B284614C05A9094D\canvas.exe : fatal error LNK1120: 1 unresolved externals
Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe failed with status: 1120

And in a regular cmd window:

Linking...
lld-link: error: undefined symbol: main
>>> referenced by vcruntime140.lib(msvcrt_stub1.obj):($LN3)
Error: linking with LLD failed

@dayllenger
Copy link
Owner

Try now again.

@aferust
Copy link
Author

aferust commented Jul 26, 2020

Thank you, it is now working using a regular cmd, but not using VC 2007 x64 native cmd. If this is intended behavior, we can just ignore this by adding an explanation in the windows section of the readme.

Linking...
libcmt.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
examples\basic\.dub\build\application-debug-windows-x86_64-ldc_2091-E14114AE6D43A7D9BCEF63664086EA98\basic.exe : fatal error LNK1120: 1 unresolved externals
Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe failed with status: 1120
C:\dlang\ldc2-1.21.0-windows-x64\bin\ldc2.exe failed with exit code 1.

by the way, it looks fancy comparing to dlangui. Very nice and promising ui library. Once I made a PR to dlangui for a new spinctrl widget. I see that the focus is not new widgets, so after a while I can make some PRs for beamui.

@dayllenger
Copy link
Owner

dayllenger commented Jul 26, 2020

It is most possibly a bug. I don't develop on Windows, so sometimes I miss such issues.

My intention is to create a conservative list of standard controls plus a bunch of abstract building blocks for making arbitrary components. Spinbox is in my TODO list too. I need to sort out a couple of issues with event propagation and focus switching beforehand.

@aferust
Copy link
Author

aferust commented Jul 26, 2020

I see. I just figured out that you designed something similar to React's state concept. Is there any reason to do that?

@dayllenger
Copy link
Owner

Well, React-like flow is ten times more intuitive to work with than usual retained widgets. It separates data from widgets naturally, it allows you to arbitrarily build and modify widget tree with little mental effort and with good performance. You just write what first pops up in your head and it works. With retained widgets, state management technics like bindings, MVVM, or Rx are bulky or too magical comparing to this.

Also, React is famous, lots of people are already familiar with this mindset. One can port items from existing reactive frameworks if needed.

@aferust
Copy link
Author

aferust commented Jul 27, 2020

Thank you for clarification.

@aberba
Copy link

aberba commented Sep 30, 2020

I completely agree with @dayllenger, can't wait to see him sort through the stuff he's working on. Not skilled enough to help at this stage, but anything I can do to help?

@my-ijet my-ijet linked a pull request Oct 23, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants