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

Uncaught "Finished up all reserved function pointers." #25

Closed
Joncom opened this Issue Jun 7, 2013 · 6 comments

Comments

Projects
None yet
3 participants
@Joncom
Copy link
Contributor

Joncom commented Jun 7, 2013

Error message: "Uncaught Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."

This occurs when calling the following function:

function getCanvasDebugDraw() {
    var debugDraw = new Box2D.b2Draw();

    Box2D.customizeVTable(debugDraw, [{
    original: Box2D.b2Draw.prototype.DrawSegment,
    replacement:
        function(ths, vert1, vert2, color) {
            alert('called');
        }
    }]);

    Box2D.customizeVTable(debugDraw, [{
    original: Box2D.b2Draw.prototype.DrawPolygon,
    replacement:
        function(ths, vertices, vertexCount, color) {
            alert('called');
        }
    }]);

    Box2D.customizeVTable(debugDraw, [{
    original: Box2D.b2Draw.prototype.DrawSolidPolygon,
    replacement:
        function(ths, vertices, vertexCount, color) {
            alert('called');
        }
    }]);

    Box2D.customizeVTable(debugDraw, [{
    original: Box2D.b2Draw.prototype.DrawCircle,
    replacement:
        function(ths, center, radius, color) {
            alert('called');
        }
    }]);

    Box2D.customizeVTable(debugDraw, [{
    original: Box2D.b2Draw.prototype.DrawSolidCircle,
    replacement:
        function(ths, center, radius, axis, color) {
            alert('called');
        }
    }]);

    Box2D.customizeVTable(debugDraw, [{
    original: Box2D.b2Draw.prototype.DrawTransform,
    replacement:
        function(ths, transform) {
            alert('called');
        }
    }]);

    return debugDraw;
}

Do I need to recompile Box2D to change this setting?

Edit: Yes, it appears I do.

@Joncom Joncom closed this Jun 7, 2013

@samowitsch

This comment has been minimized.

Copy link

samowitsch commented Sep 23, 2013

Why recompile? I have the same problem....

@Joncom

This comment has been minimized.

Copy link
Contributor Author

Joncom commented Sep 23, 2013

Because the setting that the error message says to change is a setting used only at compile time. If you know where in the final JavaScript file the setting takes effect, you could change it yourself and not recompile. However, I cannot remember where/what exactly to change...

@kripken

This comment has been minimized.

Copy link
Owner

kripken commented Sep 23, 2013

Should be functionPointers: .., can change it to functionPointers: new Array(1024) for example.

On Mon, Sep 23, 2013 at 2:14 PM, Jonathan Commins
notifications@github.comwrote:

Because the setting that the error message says to change is a setting
used only at compile time. If you know where in the final JavaScript file
the setting takes effect, you could change it yourself and not recompile.
However, I cannot remember where/what exactly to change...


Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-24955228
.

@samowitsch

This comment has been minimized.

Copy link

samowitsch commented Sep 26, 2013

"functionPointers:" ?

@Joncom

This comment has been minimized.

Copy link
Contributor Author

Joncom commented Sep 26, 2013

Yeah. Odd. I see functionPointers in my local copy of box2d.js, but not in the one in the latest repo. It's not there.

@kripken

This comment has been minimized.

Copy link
Owner

kripken commented Sep 27, 2013

Repo one might be minified, so harder to find - might need to rebuild it
then.

On Thu, Sep 26, 2013 at 4:41 PM, Jonathan Commins
notifications@github.comwrote:

Yeah. Odd. I see functionPointers in my local copy of box2d.js, but not
in the one in the latest repo. It's not there.


Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-25212732
.

@AbdealiJK AbdealiJK referenced this issue Aug 17, 2014

Open

Error #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.