Giter Club home page Giter Club logo

Comments (3)

springmeyer avatar springmeyer commented on June 18, 2024

tried a bunch of things to try to get better backtraces going, but failed. I compiled a debug node and that triggered line numbers for node but still not for node-fontnik:

Thread 4 Crashed:
0   fontnik.node                    0x00000001033075b9 node_fontnik::LoadAsync(uv_work_s*) + 4041
1   node                            0x000000010045b4f8 worker + 90 (threadpool.c:76)
2   node                            0x0000000100451b72 uv__thread_start + 25 (uv-common.c:323)
3   libsystem_pthread.dylib         0x00007fff8f136268 _pthread_body + 131
4   libsystem_pthread.dylib         0x00007fff8f1361e5 _pthread_start + 176
5   libsystem_pthread.dylib         0x00007fff8f13441d thread_start + 13

from node-fontnik.

lbud avatar lbud commented on June 18, 2024

@springmeyer could this have something to do with mapnik's memory allocation? https://github.com/mapbox/node-fontnik/blob/master/vendor/mapnik/src/font_engine_freetype.cpp#L130-L131

from node-fontnik.

springmeyer avatar springmeyer commented on June 18, 2024

@lbud I'm baffled on why I cannot get a better backtrace to show up in ~/Library/Logs/DiagnosticReports/. So, giving up on that for now - it would be nice but its not critical because there are other ways to figure out the line of the crash, notably lldb. So I did:

lldb -- node ./node_modules/.bin/_mocha test/test.js 
(lldb) r

And got:

* thread #5: tid = 0x2e2c84, 0x000000010320325f fontnik.node`node_fontnik::LoadAsync(req=<unavailable>) + 1103 at glyphs.cpp:259, stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
    frame #0: 0x000000010320325f fontnik.node`node_fontnik::LoadAsync(req=<unavailable>) + 1103 at glyphs.cpp:259
   256          points.erase(last, points.end());
   257  
   258          face.points = std::move(points);
-> 259          face.family_name = ft_face->family_name;
   260          face.style_name = ft_face->style_name;
   261  
   262          faces.push_back(std::move(face));

So that tells me that the crash is due to using a ft_face object that must not have been created.

I then took a pass at fixing this and a few other things: https://github.com/mapbox/node-fontnik/commits/overhaul

Will close this now because 1) I don't have any ideas on better backtraces, 2) we can use lldb if we hit another crash like this and 3) the original crash should be fixed.

from node-fontnik.

Related Issues (20)

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.