Git Product home page Git Product logo

nuklear-test's Introduction

nuklear-test's People

Contributors

khionu avatar snuk182 avatar th0rex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nuklear-test's Issues

Error while building.

Trying to build it. And when I run: "cargo build" I get this errors;

Compiling memmap v0.4.0
Compiling nuklear-rust v0.3.2
error[E0432]: unresolved import `self::alloc::heap::Heap`
 --> /home/vic/.cargo/registry/src/github.com-1ecc6299db9ec823/nuklear-rust-0.3.2/src/alloc_heap.rs:8:25
  |
8 | use self::alloc::heap::{Heap, Alloc, Layout};
  |                         ^^^^ no `Heap` in `heap`

error[E0432]: unresolved import `self::alloc::heap::Alloc`
 --> /home/vic/.cargo/registry/src/github.com-1ecc6299db9ec823/nuklear-rust-0.3.2/src/alloc_heap.rs:8:31
  |
8 | use self::alloc::heap::{Heap, Alloc, Layout};
  |                               ^^^^^ no `Alloc` in `heap`                                                    

error[E0432]: unresolved import `self::alloc::heap::Layout`
 --> /home/vic/.cargo/registry/src/github.com-1ecc6299db9ec823/nuklear-rust-0.3.2/src/alloc_heap.rs:8:38
  |
8 | use self::alloc::heap::{Heap, Alloc, Layout};
  |                                      ^^^^^^ no `Layout` in `heap`                                           

error[E0554]: #[feature] may not be used on the stable release channel
 --> /home/vic/.cargo/registry/src/github.com-1ecc6299db9ec823/nuklear-rust-0.3.2/src/lib.rs:1:41
  |
1 | #![cfg_attr(feature = "rust_allocator", feature(allocator_api, alloc, heap_api))]
  |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                            

error: aborting due to previous error(s)

error: Could not compile `nuklear-rust`.
Build failed, waiting for other jobs to finish...
error: build failed

Segfaults on window opening

Mac OS X 10.11.2

Ran the program with cargo run.
The window takes around 10 seconds to open.
When it does, this is spit out.

Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const: conn 0x267c3 token 0x1ffffffffffe85
Oct 11 10:53:23  t[57492] <Warning>: Backtrace (at 56029.2):
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  0   CoreGraphics                        0x00007fff8644dd56 CGSDisableUpdateToken + 155
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  1   AppKit                              0x00007fff99ebac20 ___disable_updates_sync_block_invoke_2 + 17
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  2   libdispatch.dylib                   0x00007fff8d20633f _dispatch_client_callout + 8
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  3   libdispatch.dylib                   0x00007fff8d207926 _dispatch_barrier_sync_f_invoke + 74
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  4   AppKit                              0x00007fff99eb9de9 NSCGSDisableUpdates + 213
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  5   AppKit                              0x00007fff99ebafff NSCGSTransactionRunPreCommitActionsForOrder_ + 156
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  6   AppKit                              0x00007fff99eba014 NSCGSTransactionRunPreCommitActions_ + 21
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  7   AppKit                              0x00007fff99eba4ea -[_NSCGSTransaction synchronize] + 33
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  8   AppKit                              0x00007fff99ebab38 NSCGSTransactionSynchronize + 76
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  9   AppKit                              0x00007fff99c8ee09 -[NSSurface syncSurfaceWantsExtendedDynamicRange] + 150
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  10  AppKit                              0x00007fff995c73d9 -[NSSurface _createSurface] + 677
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  11  AppKit                              0x00007fff995c6d34 -[NSSurface setFrame:] + 785
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  12  AppKit                              0x00007fff99c8ef0f __38-[NSSurface syncToViewUnconditionally]_block_invoke + 154
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  13  AppKit                              0x00007fff99dbb659 NSPerformVisuallyAtomicChange + 147
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  14  AppKit                              0x00007fff995c6658 -[NSSurface syncToViewUnconditionally] + 100
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  15  AppKit                              0x00007fff99c8efa8 __37-[NSSurface orderSurface:relativeTo:]_block_invoke + 44
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  16  AppKit                              0x00007fff99dbb659 NSPerformVisuallyAtomicChange + 147
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  17  AppKit                              0x00007fff995c652d -[NSSurface orderSurface:relativeTo:] + 160
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  18  AppKit                              0x00007fff99893ece NSOpenGLContextAttachOnScreenViewSurface + 183
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  19  AppKit                              0x00007fff99bd79ea __27-[NSOpenGLContext setView:]_block_invoke + 192
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  20  AppKit                              0x00007fff99dbb659 NSPerformVisuallyAtomicChange + 147
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  21  AppKit                              0x00007fff9987f204 -[NSOpenGLContext setView:] + 119
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  22  t                                   0x0000000105c4b161 _ZN55_$LT$$LP$A$C$$RP$$u20$as$u20$objc..MessageArguments$GT$6invoke17h6f5f17a63a23efb4E + 65
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  23  t                                   0x0000000105c4b095 _ZN4objc7message15send_unverified17hfd438a8fe0964f41E + 117
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  24  t                                   0x0000000105c50e94 _ZN77_$LT$$BP$mut$u20$objc..runtime..Object$u20$as$u20$appkit..NSOpenGLContext$GT$8setView_17hec2f1593f4550fccE + 196
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  25  t                                   0x0000000105c42f26 _ZN6glutin3api5cocoa6Window14create_context17h242a4ed1d8fbc52fE + 2310
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  26  t                                   0x0000000105c4061b _ZN6glutin3api5cocoa6Window3new17h5ef6e7b586e1eb93E + 2395
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  27  t                                   0x0000000105c49e68 _ZN6glutin6window45_$LT$impl$u20$WindowBuilder$LT$$u27$a$GT$$GT$5build17hb5e35d9ab9161406E + 472
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  28  t                                   0x0000000105aaca91 _ZN17gfx_window_glutin8init_raw17hf3bcb12f38d809acE + 817
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  29  t                                   0x00000001059b0653 _ZN17gfx_window_glutin4init17h945237be9808caf2E + 387
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  30  t                                   0x00000001059ae06f _ZN1t4main17ha67f568d8993899bE + 447
Oct 11 10:53:23  t[57492] <Warning>: void CGSUpdateManager::log() const:  31  t                                   0x0000000105ccfc43 _ZN3std10sys_common6unwind3try6try_fn17h09ba69fd13531e58E + 35
error: An unknown error occurred

This is a segfault (signal: 11, SIGSEGV). Do you have any idea why this might happen?

wgpurs branch freezes on Windows when selecting an item in the combo box

The freeze appears to be caused by display list corruption. I can reproduce this on Windows 10 just by selecting an item in this combo box. It does not freeze if the dropdown menu is closed by clicking anywhere else, for example. I've tried to create a minimal repro case, but it's too easy to change the behavior just by adding or removing widgets.

I can pause the executable in the VS debugger while its frozen. The nk_foreach() inside nk_convert() never breaks. The latter is called here, in the backend: https://github.com/snuk182/nuklear-backend-wgpurs/blob/42d85b916dbaee2d3ffcf640cd426dee3280ee9c/src/lib.rs#L254 And the former is internal to nk_convert(): https://github.com/vurtun/nuklear/blob/509c75b086351e82865f26a507235b60a63e1538/nuklear.h#L10341-L10458

This looks like display list corruption because I can see an obviously bad cmd->type while the display list is iterated inside nk_convert(), which falls into the default case and the iterator repeats from the beginning, endlessly.

I haven't been able to track down the source of the corruption. Part of the problem is lack of useful tools on Windows for tracking down undefined behavior. And because I cannot reproduce this behavior on macOS, I can't make use of the clang sanitizers to debug this. (I ran the C++ example with the sanitizers on macOS, but found nothing out of the ordinary. Couldn't get the Rust version to build with sanitizers though.)

This only happens on the wgpurs branch; I've also tested gdi, glium, and dx11 on the same Windows machine without trouble. The freeze does not happen at all on macOS in the wgpurs branch.

Error when run the built program

cargo run works, but there is error when run the program manually after cargo build.

▶ RUST_BACKTRACE=1 ./t
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', /checkout/src/libcore/result.rs:859
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:355
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:371
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:549
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:511
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:495
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:471
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:69
   9: core::result::unwrap_failed
             at /checkout/src/libcore/macros.rs:29
  10: <core::result::Result<T, E>>::unwrap
             at /checkout/src/libcore/result.rs:737
  11: t::icon_load
             at src/main.rs:88
  12: t::main
             at src/main.rs:160
  13: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  14: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:433
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:57
  15: main
  16: __libc_start_main
  17: _start

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.