预告预告!今天决定把引擎更新到3.8.1。晚点来报告bug。

如题~:875: :875: :875: :882:

1赞

反馈1:
Undefined symbols for architecture arm64:
“_iconv_open”, referenced from:
cocos2d::FontAtlas::conversionU16TOGB2312(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&, std::__1::unordered_map<unsigned short, unsigned short, std::__1::hash, std::__1::equal_to, std::__1::allocator<std::__1::pair<unsigned short const, unsigned short> > >&) in libcocos2d iOS.a(CCFontAtlas.o)
“_iconv”, referenced from:
cocos2d::FontAtlas::conversionU16TOGB2312(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&, std::__1::unordered_map<unsigned short, unsigned short, std::__1::hash, std::__1::equal_to, std::__1::allocator<std::__1::pair<unsigned short const, unsigned short> > >&) in libcocos2d iOS.a(CCFontAtlas.o)
“_iconv_close”, referenced from:
cocos2d::FontAtlas::~FontAtlas() in libcocos2d iOS.a(CCFontAtlas.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决办法:
XCODE工程,若出现上面的错误,请在link library里添加libiconv2.4.0

反馈2:
如果Layout开启裁剪,并且包含多个ClippingNode或者ClippingRectangeNode子项, 那么这些子项的将会出现裁剪错乱,如果这些子项在Layout容器中移动的话,画面相当惊艳~
(PS: 这BUG算是陈年旧账了,还在3.4的时候我就反馈过这BUG)

解决办法:

void ClippingRectangleNode::onBeforeVisitScissor()
{
if (_clippingEnabled) {
glEnable(GL_SCISSOR_TEST);

    float scaleX = _scaleX;
    float scaleY = _scaleY;
    Node *parent = this->getParent();
    while (parent) {
        scaleX *= parent->getScaleX();
        scaleY *= parent->getScaleY();
        parent = parent->getParent();
    }

    const Point pos = convertToWorldSpace(Point(_clippingRegion.origin.x, _clippingRegion.origin.y));
    GLView* glView = Director::getInstance()->getOpenGLView();
    glView->setScissorInPoints(pos.x/* * scaleX*/ /*fix by xiaoz*/,
                               pos.y/* * scaleY*/,
                               _clippingRegion.size.width * scaleX,
                               _clippingRegion.size.height * scaleY);
}

}

ClippingNode还没来得急看。

反馈3:
若你用到unzip, 那么编译android的时候将会碰到下面问题:
…/external/unzip/unzip.cpp:1664:40: error: invalid conversion from ‘const z_crc_t* {aka const unsigned int*}’ to ‘const long unsigned int*’ -fpermissive]
s->pcrc_32_tab = get_crc_table();
^

解决办法:
将对应的代码改为
s->pcrc_32_tab = (const unsigned long*)get_crc_table();

1赞

我也遇到个bug 不知道你遇到没?
就是移植到手机上的时候:

楼主上git去提bug吧,在这题没卵用的。
传送门:https://github.com/cocos2d/cocos2d-x/issues

天坑cocos2dx引擎开发人员表示赞

楼主是从什么版本升到3.8.1的?

从3.6版本跟新

顺便报个bug:
版本: cocos2d-x 3.8.1
操作:

  1. cocos new -p com.x.xAct -l cpp -d . xAct
  2. 然后在 HelloWorldScene.h里面添加
    #include “cocos-ext.h”

USING_NS_CC;
USING_NS_CC_EXT;
这样几行;
3.编译工程

failed msg:
\cocos2d\extensions\gui\cccontrolextension\cccontrolutils.h(39): fatal error C1083: Cannot open include file: ‘extensions/ExtensionExport.h’: No such file or directory (…\Classes\HelloWorldScene.cpp)

\cocos2d\extensions\gui\cccontrolextension\cccontrolutils.h(39): fatal error C1083: Cannot open include file: ‘extensions/ExtensionExport.h’: No such file or directory (…\Classes\AppDelegate.cpp)

========================
https://github.com/cocos2d/cocos2d-x/issues/14133

这个只是你没给工程加上引擎路径导致的($(EngineRoot))

反馈:WebView控件在iPhone6、6Plus上显示有问题

我刚从 quick3.5 升级到3.8.1 集成完QUICK 修完楼主贡献的BUG 我也来贡献一下
IOS9 打光导致模型黑掉的BUG
cocos引擎 3d文件下 CCMesh.cpp
static void resetLightUniformValues()
{
const auto& conf = Configuration::getInstance();
int maxDirLight = conf->getMaxSupportDirLightInShader();
int maxPointLight = conf->getMaxSupportPointLightInShader();
int maxSpotLight = conf->getMaxSupportSpotLightInShader();

s_dirLightUniformColorValues.assign(maxDirLight, Vec3::ZERO);
s_dirLightUniformDirValues.assign(maxDirLight, Vec3::ZERO);

s_pointLightUniformColorValues.assign(maxPointLight, Vec3::ZERO);
s_pointLightUniformPositionValues.assign(maxPointLight, Vec3::ZERO);
s_pointLightUniformRangeInverseValues.assign(maxPointLight, 0.0f);

s_spotLightUniformColorValues.assign(maxSpotLight, Vec3::ZERO);
s_spotLightUniformPositionValues.assign(maxSpotLight, Vec3::ZERO);
s_spotLightUniformDirValues.assign(maxSpotLight, Vec3::ZERO);
s_spotLightUniformInnerAngleCosValues.assign(maxSpotLight, 0.0f); -->  s_spotLightUniformInnerAngleCosValues.assign(maxSpotLight, 1.0f);
s_spotLightUniformOuterAngleCosValues.assign(maxSpotLight, 0.0f);
s_spotLightUniformRangeInverseValues.assign(maxSpotLight, 0.0f);

}

楼主是如何升级引擎的?是可以直接把cocos2d文件夹替换过来就行么?

新建工程,再把老工程代码拉来

那xcode的工程文件呢?就只能一点一点重新设置回来么?

3.8.1播放骨骼动画异常,
动画使用dragonbones 2.2 编辑

cocostudio的骨骼动画不敢用啊,编辑点简单地UI动画还成

没有用cocostudio,使用的是dragonbones 2.2

什么样的异常?我也用的DB,还没升3.8.1呢,现在是3.7,没异常