Bitwise » Forums » Interested in bug reports yet?
wilberton
Andy Gill
18 posts
#14969 Interested in bug reports yet?
7 months ago Edited by Andy Gill on April 16, 2018, 8:28 p.m. Reason: Initial post

1
for(;;)


currently causes a seg-fault.

P.S. really enjoying it all so far!
pervognsen
Per Vognsen
49 posts / 1 project
#14971 Interested in bug reports yet?
7 months ago

Of course! Also feel free to file them as a GitHub issue.

I just pushed the fix for that bug. Thanks!
Maykeye
19 posts
#14999 Interested in bug reports yet?
6 months, 4 weeks ago

Does using strcpy_s is a) C11, not C99 b) not available in linux's gcc and

SDL_SetWindowResizable which doesn't exist yet in ubuntu 16.04LTS because its SDL too old counts as bug?
pervognsen
Per Vognsen
49 posts / 1 project
#15000 Interested in bug reports yet?
6 months, 4 weeks ago Edited by Per Vognsen on April 19, 2018, 3:27 a.m.

We're already using a smattering of C11 features (anonymous structs/unions and x[] arrays), so I thought using the safe string functions would be sufficiently portable. If GCC doesn't support them, I can get rid of them. Usually my constraint on modern C features is what MSVC will support since it usually lags by many years.

What version of SDL is in Ubuntu? I'm just getting started with Noir, so it's highly likely I'll end up using other API functions that might not be available. If it's not too ancient, I'll see if I can avoid using the newer functions.
Maykeye
19 posts
#15001 Interested in bug reports yet?
6 months, 4 weeks ago

pervognsen


What version of SDL is in Ubuntu? I'm just getting started with Noir, so it's highly likely I'll end up using other API functions that might not be available...


$ sudo apt install libsdl2-dev
libsdl2-dev is already the newest version (2.0.4+dfsg1-2ubuntu2).

SDL_SetWindowResizable is available since SDL 2.0.5. Prior versions seems need to use SDL_WINDOW_RESIZABLE flag instead.
pervognsen
Per Vognsen
49 posts / 1 project
#15002 Interested in bug reports yet?
6 months, 4 weeks ago Edited by Per Vognsen on April 19, 2018, 3:55 a.m.

Hrm. 2.0.4 is well over 2 years old and SDL has since had numerous bug fixes in addition to the couple of new features. Limiting resizability changes to window creation time isn't a huge burden but let me audit the other changes that were made since 2.0.4 to see if we'll be missing out on anything major. Thanks for the info.
Maykeye
19 posts
#15008 Interested in bug reports yet?
6 months, 4 weeks ago Edited by Maykeye on April 19, 2018, 2:40 p.m.

BTW,
1
2
3
4
5
6
  static bool init_window(void) {...
      extern void update_window();
      update_window();
}

static void update_window(void) {


Does it work in MSVC? Gcc and clang don't like that update_window is redefined from extern to static. They also not fans of
1
2
case SDL_KEYUP:
int key = sdl_scancode_to_noir_key[event.key.keysym.scancode]; 

due the fact int key=... is a decl, not a statement or an expression
pervognsen
Per Vognsen
49 posts / 1 project
#15010 Interested in bug reports yet?
6 months, 4 weeks ago

Both should be fixed in latest. I'm also going to start thinking about more serious build scaffolding for cross platform and third party libraries, which will be a work in progress.
pervognsen
Per Vognsen
49 posts / 1 project
#15013 Interested in bug reports yet?
6 months, 3 weeks ago Edited by Per Vognsen on April 20, 2018, 1:33 p.m.

Heads up: I added an explicit check for C11 or Visual Studio 2015 or later. Someone somehow managed to build Ion with VS 2013 I have no idea how the compound literals and designated initializers were accepted) but it generated garbage because it has enough C99 features to compile but its snprintf is busted, so I want to prevent that kind of confusion in the future.

The upshot for GCC and Clang users is that you'll need to build with -std=c11. We still only use a few C11 features, though, only anonymous structs/unions.
Maykeye
19 posts
#15055 Interested in bug reports yet?
6 months, 3 weeks ago

pervognsen
Hrm. 2.0.4 is well over 2 years old and SDL has since had numerous bug fixes in addition to the couple of new features. Limiting resizability changes to window creation time isn't a huge burden but let me audit the other changes that were made since 2.0.4 to see if we'll be missing out on anything major. Thanks for the info.


New Ubuntu LTS(18.04) should come out this week probably shipped with SDL2 version 2.0.8 on the board, and since it's LTS, supporting older LTSes may not be that necessary anymore.

Debian stable has 2.0.5 though. Enough for resizing window, but not for vulkan goodies.
pervognsen
Per Vognsen
49 posts / 1 project
#15076 Interested in bug reports yet?
6 months, 3 weeks ago Edited by Per Vognsen on April 25, 2018, 12:38 a.m.

Cool, that's good to know.

Heads up: There's been a major overhaul to the compiler to deal with packages. The workflow is infinitely more streamlined now, but you need to change a few things if you want your old code to still work. Set IONHOME to the ion directory that contains system_packages. The ion search paths default to $IONHOME/system_packages and the current working directory, followed by anything in the semicolon-separated IONPATH. Put all the .ion files for a single package in its own directory. You can see how the test1, test2, subtest1 and noir packages are laid out in the repo. The compiler itself also prints way more diagnosis messages so you can see what's going on. This will eventually be off by default unless you use a command line flag, but for now I'm leaving it on to help with bugs.