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

Crash adding a toonz raster level. Linux [$5 awarded] #591

Closed
ebarranco opened this issue Jul 7, 2016 · 25 comments
Closed

Crash adding a toonz raster level. Linux [$5 awarded] #591

ebarranco opened this issue Jul 7, 2016 · 25 comments

Comments

@ebarranco
Copy link

ebarranco commented Jul 7, 2016

Opentoonz Crash just adding a new toonz raster level:

https://dl.dropboxusercontent.com/u/69554201/OpentoonzLinuxRasterCrashBug.mp4


The $5 bounty on this issue has been claimed at Bountysource.

@ghost
Copy link

ghost commented Jul 8, 2016

Confirmed. I have just compiled the last source and it crashes whenever I add any kind of level other than the default. The error I get is:

opentoonz: /home/user/opentoonz/toonz/sources/toonz/sceneviewer.cpp:1641: void SceneViewer::drawScene(): Assertion `glGetError() == 0' failed.
Aborted (core dumped)

I'm using Fedora 24 64bit, under Gnome

@ideasman42
Copy link
Collaborator

Can't redo, possibly only effects certain graphics card/driver combinations.

Would be good to what that the GL error message is.

@ghost
Copy link

ghost commented Jul 10, 2016

Hey guys.

I have an Intel integrated GPU board with an dedicated nVidia optimus-enabled one. My lspciresults are:

Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev a1)

The crash error happens only with the Intel board. If I run opentoonz with optirun opentoonz I get another anomaly: the drawing window is cropped to a tiny rectangle, making it impossible to draw anything.

Back to the crash error on the Intel board, I have run it with strace opentoonz. I have trimmed the output to the latest lines of what happens after I try to create a new level different than the standard Toonz Vector Level. The output is too long, so I'm not sure if this trimmed version can help identify the issue.

futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\24\0\6\0\31\4\300\1\235\1\0\0\0\0\0\0\0\0\0\0\0\4\0\0", 24}], 1) = 24
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7ffc07529660, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7ffc07529664, FUTEX_WAIT_PRIVATE, 1, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\24\0\6\0\31\4\300\1f\1\0\0\4\0\0\0\0\0\0\0\0\4\0\0", 24}], 1) = 24
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7ffc07529610, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7ffc07529614, FUTEX_WAIT_PRIVATE, 1, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 0
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\2030\2\0\17\0\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\2030\2\0\4\0\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\2030\2\0\17\0\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\2030\2\0\4\0\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\2030\2\0\17\0\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\2030\2\0\4\0\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\2030\2\0\17\0\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"\2030\2\0\4\0\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8
futex(0x25ae398, FUTEX_WAKE_PRIVATE, 1) = 1
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8
ioctl(17, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffc07528e00) = 0
ioctl(17, DRM_IOCTL_I915_GEM_BUSY, 0x7ffc07528db0) = 0
ioctl(17, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffc07528da0) = 0
ioctl(17, DRM_IOCTL_I915_GEM_PWRITE, 0x7ffc07528e50) = 0
ioctl(17, DRM_IOCTL_I915_GEM_SW_FINISH, 0x7ffc07528e40) = 0
ioctl(17, DRM_IOCTL_I915_GEM_EXECBUFFER2, 0x7ffc07528dd0) = 0
ioctl(17, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffc07528dc0) = 0
ioctl(17, DRM_IOCTL_I915_GEM_BUSY, 0x7ffc07528d90) = 0
ioctl(17, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffc07528d80) = 0
ioctl(17, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7ffc07528da0) = 0
ioctl(17, DRM_IOCTL_I915_GEM_CREATE, 0x7ffc07527f50) = 0
ioctl(17, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffc07527fa0) = 0
ioctl(17, DRM_IOCTL_GEM_CLOSE, 0x7ffc07527f90) = 0
ioctl(17, DRM_IOCTL_I915_GEM_CREATE, 0x7ffc07527fb0) = 0
ioctl(17, DRM_IOCTL_I915_GEM_PWRITE, 0x7ffc07527ff0) = 0
ioctl(17, DRM_IOCTL_I915_GEM_CREATE, 0x7ffc07527ca0) = 0
ioctl(17, DRM_IOCTL_I915_GEM_SET_TILING, 0x7ffc07527c00) = 0
ioctl(17, DRM_IOCTL_I915_GEM_MMAP_GTT, 0x7ffc07527b90) = 0
mmap(NULL, 5242880, PROT_READ|PROT_WRITE, MAP_SHARED, 17, 0x10dcdc000) = 0x7f7416721000
ioctl(17, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7ffc07527be0) = 0
write(2, "opentoonz: /home/virgilio/Downlo"..., 167opentoonz: /home/virgilio/Downloads/opentoonz/opentoonz/toonz/sources/toonz/sceneviewer.cpp:1641: void SceneViewer::drawScene(): Assertion `glGetError() == 0' failed.
) = 167
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f743c079000
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(17637, 17637, SIGABRT)           = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=17637, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)

@janisozaur
Copy link
Contributor

@VirgilioVasconc can you re-format your comment with triple backtikcs or an indent of 4 spaces to get pre-formated block?

@ghost
Copy link

ghost commented Jul 10, 2016

@janisozaur done! Sorry for that. :)

@ebarranco
Copy link
Author

I have the issue in Manjaro, OpenSuse and Antergos. With open and proprietary drivers, My card is a AMD Radeon HD 5700 Series, Proprietary drivers 15.201.1151-150908a-188977E. How can I provide you with the GL error message @ideasman42 ? What I need to do to see that information?

@ideasman42
Copy link
Collaborator

Directly before the assert print the error string (there could be some utility to do this which is part of the assert).

eg: http://www.lighthouse3d.com/cg-topics/error-tracking-in-opengl/

@ghost
Copy link

ghost commented Jul 12, 2016

@ideasman42 gDEBugger didn't run on my Fedora 24 64-bit machine. I ran opentoonz with apitrace (https://apitrace.github.io/) and it has produced a binary file with all OpenGL warnings and errors from that action. If it helps, I have attached it here.

OpenToonz_1.trace.zip

@ghost ghost added the bug label Jul 14, 2016
@ideasman42
Copy link
Collaborator

ideasman42 commented Sep 28, 2016

Note, this isn't a crash, its caused by an assert This shouldn't impact release builds, since NDEBUG should be defined (tested and it is here).

While resolving the assert is nice, if this bug impacts anyone besides developers with debug builds - then theres a problem with CMake's configuration somewhere.

@ideasman42
Copy link
Collaborator

Tracked the problem down to glDisable resetting constants that may not be known by the OpenGL drivers.

This errors shows up with the nouveau drivers but not nvidias (on Linux),
think they could just be commented out - see #844

ideasman42 added a commit that referenced this issue Sep 28, 2016
@morevnaproject
Copy link
Contributor

Tested the latest master with AppImage build and the crash is still there. On the same machine other version (compiled in native environment) works fine (with NVidia proprietary drivers).

It is possible the issue is triggered by AppImage environment or library combination. Needs investigation.

@morevnaproject
Copy link
Contributor

@ideasman42 Can you please re-open this bug, or maybe it would be better to open a new one?

@ideasman42
Copy link
Collaborator

ideasman42 commented Oct 7, 2016

Please report a new bug, (including a back-trace of the error. or any other output).

Asserts shouldn't crash on release builds, possibly you're not using the right build-flags.

@ebarranco
Copy link
Author

I builded opentoonz today and this problem persists.

@ideasman42
Copy link
Collaborator

ideasman42 commented Oct 7, 2016

Re-opening, but someone who can redo will need to provide detailed information on what fails.
Since this now this "works-for-me".

@ebarranco also, are you using the app-image? could you try a local build to see if that works?

@morevnaproject
Copy link
Contributor

morevnaproject commented Oct 7, 2016

AppImage output:

$ /home/konstantin/studio/soft/OpenToonz.AppImage 
/tmp/.mount_Q2TOEL/opentoonz.desktop: warning: key "Categories" is a list and does not have a semicolon as trailing character, fixing
libpng warning: iCCP: known incorrect sRGB profile
plugin search directory:/home/konstantin/.config/OpenToonz/stuff/plugins
walkDirectory_: /home/konstantin/.config/OpenToonz/stuff/plugins
===== PluginLoadController::finished() =====
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
...
<<lot of complains from libpng about iCCP>>
...
libpng warning: iCCP: profile 'Photoshop ICC profile': 0h: PCS illuminant is not D50
libpng warning: iCCP: profile 'Photoshop ICC profile': 0h: PCS illuminant is not D50
<< here I choose "File" -> "New Level" -> "Toonz Raster Level" -> "OK" >>
terminate called after throwing an instance of 'TException'
Aborted (core dumped)

Important note: Only "Toonz Raster Level" causes crash. I can safely choose (and use) "Raster Level", "Toonz Vector Level" and "Scan Level" options in the level creation dialogue.

@ideasman42 Issue still appear as "closed" for me.

EDIT: Debug build not available for me right now, so can't provide full backtrace yet.

@ebarranco
Copy link
Author

ebarranco commented Oct 8, 2016

I'm not using app-image, I builded from git @ideasman42 and I have the same problem that @morevnaproject only Toonz Raster Level causes crash my program. I wish can do the debug for you, but I barely know what your talking about. I Need step by step instructions to do that.

@ideasman42 ideasman42 reopened this Oct 8, 2016
@ideasman42
Copy link
Collaborator

Re-opening, although I can't redo this bug.

@morevnaproject
Copy link
Contributor

morevnaproject commented Oct 8, 2016

@ideasman42 It seems the current issue have different origin, than the one reported by @VirgilioVasconc - in his report he had all levels failing (except "Toonz Vector Level"). In current case we have all levels working, except by "Toonz Raster Level". So, your fix is actually make effect.

@morevnaproject
Copy link
Contributor

I have posted a bounty for this issue - https://www.bountysource.com/issues/35816932-crash-adding-a-toonz-raster-level-linux

issue svg

@morevnaproject
Copy link
Contributor

@ideasman42 and @ebarranco, can you please post CMakeCache.txt file from your build directory? That way it is possible to compare environments and find differences. It is very likely that the error comes from some dependency library.

@ghost
Copy link

ghost commented Oct 8, 2016

Couldn't replicate it here. I've built it on a Fedora 24 64-bit machine on October 6th. I've tried to add all kinds of levels and everything worked fine. It has also apparently fixed the old lag on the brush strokes that happened after a few drawn lines. I'm on an Intel video card.

@ebarranco
Copy link
Author

here @morevnaproject
CMakeCache.txt

blackwarthog added a commit to morevnaproject/morevna-builds that referenced this issue Feb 10, 2017
blackwarthog pushed a commit to blackwarthog/opentoonz that referenced this issue Feb 10, 2017
@blackwarthog
Copy link
Collaborator

Files lzocompress and lzodecompress does not copies while make install. Copying these files to target bin directory solves the problem. So toonz raster level now works in appimage.

blackwarthog added a commit to blackwarthog/opentoonz that referenced this issue Feb 10, 2017
@ebarranco
Copy link
Author

@blackwarthog You are right! Is working now in the appimage version. Thanks!
opentoonzraster

@shun-iwasawa shun-iwasawa changed the title Crash adding a toonz raster level. Linux Crash adding a toonz raster level. Linux [$5 awarded] Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants